Linux SSH Used Memory

From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

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.

  1. Copy the original default template and rename the memory graph Used Memory.
  2. Add a Graph Point for MemTotal to the Used Memory graph, but change the Line Type to None.
  3. 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:

Sshusedmemory.png