[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] Display Cached Memory




Hi Jonathan,

the "cached" memory is already collected by Xymon (via "vmstat") and graphed
in vmstat.rrd. Unfortunately there seems to be no default graphing-defintion
to display the collected values.
As a quick hack the attached graphing-definition at the bottom can be used (see
the comment in the file for some details).

If you want to trigger an event based on the value of cached memory you can
fetch the collected values with the bb(1) "clientlog"-command and feed them to
a rrd:
    $ ~/server/bin/bb localhost "clientlog name-of-the-host section=vmstat"
    [vmstat]
    procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
     r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
     1  0    120  24664 245736  42392    0    0     0     8   40   48  1  1 98  0
     0  0    120  25704 245736  42376    0    0     0     7   42   49  1  1 98  0

HTH,

    Thomas

graphing-definition hack:
--- snipp ---
## graphing defintion to display of cached memory (based on [vmstat6] from
## Xymon-4.3.0_beta2)
## use by appending "TRENDS:*,vmstat:vmstat_cach" in bb-hosts for the hosts to
## display cached memory for:
[vmstat_cach]
    # This graph only works on some OS'es (Solaris)
    TITLE Memory (cache) Utilization
    YAXIS Size kB
    -b 1024
    DEF:free=vmstat.rrd:mem_free:AVERAGE
    CDEF:fr=free,1024,*
    DEF:cached=vmstat.rrd:mem_cach:AVERAGE
    CDEF:cach=cached,1024,*
    LINE2:fr#0000ff:Size of the free list
    LINE2:cach#00FF00:Size of cached memory
    COMMENT:\n
    GPRINT:fr:LAST:Size of the free list           \: %5.1lf%s (cur)
    GPRINT:fr:MAX: \: %5.1lf%s (max)
    GPRINT:fr:MIN: \: %5.1lf%s (min)
    GPRINT:fr:AVERAGE: \: %5.1lf%s (avg)\n
    GPRINT:cach:LAST:Currently cached memory \: %5.1lf%s (cur)
    GPRINT:cach:MAX: \: %5.1lf%s (max)
    GPRINT:cach:MIN: \: %5.1lf%s (min)
    GPRINT:cach:AVERAGE: \: %5.1lf%s (avg)\n
--- snipp ---

On Fri, 19 Feb 2010, Jonathan B. Horen wrote:

Has anyone patched Xymon so that cached memory is displayed together with
real, actual, and swap?

We have need of this (cluster compute nodes), and were wondering what it
would take to do so.




-- -------------------------------------------------------------------------
| IT-Beratung Eckert  | Hartkirchweg 54          | fon: +49 (0)761/ 594 9898
| Thomas Eckert       | 79111 Freiburg i.Br.     | fax: +49 (0)761/ 594 9899
|                     | Germany                  | http://www.it-eckert.de/