On Tue, 2010-05-04 at 18:02 -0500, David Wright wrote:
> I was looking for a way to avoid a negative.
> pmchart is going funny with my stack chart and flipping to just
> the derived.
> mem.util.ncache_clean = mem.util.cache_clean - mem.util.shmem
> mem.util.mmapped = mem.util.mapped - mem.util.shmem
Does the value of the derived metric go just a little negative (due to
some rounding or timing issues in the calculation) or a lot negative
(suggesting the semantics of the operand metrics or the derived metric
is a little strange)?
The only solution within the current expression grammar would be
something like a new notnegative(x) function which returns 0 if the
value of x is less than zero, else the value of x. But this does seem
like something of a hack for a situation that I'm not sure is going to
be that common in general.