Linux SSH Used Memory
From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
By default the SSH monitoring template for Linux devices does not include the display of Used memory, nor a data point to easily graph it. One solution, is to copy the original default template and modify it, then bind it to /Server/SSH/Linux.
- Copy the original default template and rename the memory graph Used Memory.
- Add a Graph Point for MemTotal to the Used Memory graph, but change the Line Type to None.
- Add a Custom Graph Definition with the following code:
CDEF:MinusBuffers=MemTotal-raw,Buffers-raw,- CDEF:MinusCached=MinusBuffers,Cached-raw,- CDEF:MemoryUsed=MinusCached,MemFree-raw,- STACK:MemoryUsed#CCCCCC:Used Memory COMMENT:cur\: GPRINT:MemoryUsed:LAST:%5.2lf%s COMMENT:avg\: GPRINT:MemoryUsed:AVERAGE:%5.2lf%s COMMENT:max\: GPRINT:MemoryUsed:MAX:%5.2lf%s\j LINE:MemTotal-raw#FF0000:Total Memory COMMENT:cur\: GPRINT:MemTotal-raw:LAST:%5.2lf%s COMMENT:avg\: GPRINT:MemTotal-raw:AVERAGE:%5.2lf%s COMMENT:max\: GPRINT:MemTotal-raw:MAX:%5.2lf%s\j
This will produce a graph that looks like this: