I'm trying to make a graph of used/free memory that is more presentable to project managers. To do this I would like to graph 'memory used by applications' with 'memory available'.
Memory Used by Applications
MemTotal - MemFree - MemShared - MemBuffers - MemCached
Memory Available
MemFree + MemShared + MemBuffered + MemCache
I am using the following in separate data templates which all are 'get snmp data'
Total Real (MemTotal)
[jburns@fralnxmgr6 ~]$ snmpwalk -v1 -c cacticom fralnxposapp6 .1.3.6.1.4.1.2021.4.5
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 8139056
Avail Real (MemFree)
[jburns@fralnxmgr6 ~]$ snmpwalk -v1 -c cacticom fralnxposapp6 .1.3.6.1.4.1.2021.4.6
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 45988
Mem Shared
[jburns@fralnxmgr6 ~]$ snmpwalk -v1 -c cacticom fralnxposapp6 .1.3.6.1.4.1.2021.4.13
UCD-SNMP-MIB::memShared.0 = INTEGER: 0
Mem Buffered
[jburns@fralnxmgr6 ~]$ snmpwalk -v1 -c cacticom fralnxposapp6 .1.3.6.1.4.1.2021.4.14
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 355376
Mem Cached
[jburns@fralnxmgr6 ~]$ snmpwalk -v1 -c cacticom fralnxposapp6 .1.3.6.1.4.1.2021.4.15
UCD-SNMP-MIB::memCached.0 = INTEGER: 4301520
I then defined a CDEF to calculate the 'memory used by applications definition' to be the following:
cdef=CURRENT_DATA_SOURCE,ALL_DATA_SOURCES_NODUPS,-,CURRENT_DATA_SOURCE,+
I then create a graph template which first uses the total real data source and uses the above CDEF (effectly subtract all data sources combined from total real, then add back in total real to that number...)
On top of these I am just simply stacking the other parameters with the same color, and attaching the label to the top one.
My graph isn't quite what I'm expecting...the numbers seem to be slightly off, and it isn't even at the top (mem avail + mem used should == total mem).
Is there an easier way to do this? Am I missing something?
Linux Memory Custom Graph
Moderators: Developers, Moderators
-
- Posts: 2
- Joined: Thu Sep 01, 2005 1:48 pm
Who is online
Users browsing this forum: No registered users and 1 guest