net-snmp System Memory Stats graph seems to be incorrect
JohnD Blackburn <[email protected]>
| Newsgroups | gmane.network.opennms.general |
|---|---|
| Message-ID | <DB6PR0602MB2902A594E2DFD627C025B9E2CB730@DB6PR0602MB2902.eurprd06.prod.outlook.com> |
While reviewing performance statistics on some of our servers, we noticed an anomaly with the System Memory Stats. The "Used (Other)" value is showing as a negative value. [cid:[email protected]] I'm wondering if this is because the definition of "usedBytes" is not quite correct, as it does not take into consideration the swap. usedBytes is currently defined as: CDEF:usedBytes=memtotalrealBytes,membufferBytes,-,memcachedBytes,-,memsharedBytes,-,memavailrealBytes,- \ I thought maybe it should be the following, however, I'm starting to wonder now, if the issue is the memsharedBytes value is throwing the calculation out? CDEF:usedBytes=memtotalrealBytes,memavailswapBytes,+,membufferBytes,-,memcachedBytes,-,memsharedBytes,-,memavailrealBytes,- \ All servers with graphs showing negative memory are running Oracle Linux 7.2, and net-snmp-5.7.2-24. They are also Oracle Database servers This is using the standard graph definition that comes with OpenNMS. From netsnmp-graph.properties: report.netsnmp.memStats.name=System Memory Stats report.netsnmp.memStats.columns=memAvailSwap,memTotalReal,memAvailReal,memBuffer,memCached,memShared report.netsnmp.memStats.type=nodeSnmp report.netsnmp.memStats.suppress=netsnmp.memStatsNoShared report.netsnmp.memStats.width=565 report.netsnmp.memStats.height=200 report.netsnmp.memStats.command=--title="System Memory Stats" \ --width 565 \ --height 200 \ --lower-limit 0 \ --base=1024 \ --vertical-label="Bytes" \ DEF:memavailswap={rrd1}:memAvailSwap:AVERAGE \ DEF:memtotalreal={rrd2}:memTotalReal:AVERAGE \ DEF:memavailreal={rrd3}:memAvailReal:AVERAGE \ DEF:membuffer={rrd4}:memBuffer:AVERAGE \ DEF:memcached={rrd5}:memCached:AVERAGE \ DEF:memshared={rrd6}:memShared:AVERAGE \ CDEF:memavailswapBytes=memavailswap,1024,* \ CDEF:memtotalrealBytes=memtotalreal,1024,* \ CDEF:memavailrealBytes=memavailreal,1024,* \ CDEF:membufferBytes=membuffer,1024,* \ CDEF:memcachedBytes=memcached,1024,* \ CDEF:memsharedBytes=memshared,UN,0,memshared,IF,1024,* \ CDEF:usedBytes=memtotalrealBytes,membufferBytes,-,memcachedBytes,-,memsharedBytes,-,memavailrealBytes,- \ AREA:usedBytes#c17d11:"Used (Other)" \ GPRINT:usedBytes:AVERAGE:" Avg \\: %8.2lf %s" \ GPRINT:usedBytes:MIN:"Min \\: %8.2lf %s" \ GPRINT:usedBytes:MAX:"Max \\: %8.2lf %s\\n" \ STACK:membufferBytes#edd400:"IO Buff Ram " \ GPRINT:membufferBytes:AVERAGE:" Avg \\: %8.2lf %s" \ GPRINT:membufferBytes:MIN:"Min \\: %8.2lf %s" \ GPRINT:membufferBytes:MAX:"Max \\: %8.2lf %s\\n" \ STACK:memsharedBytes#000a44:"Shared Mem " \ GPRINT:memsharedBytes:AVERAGE:" Avg \\: %8.2lf %s" \ GPRINT:membufferBytes:MIN:"Min \\: %8.2lf %s" \ GPRINT:membufferBytes:MAX:"Max \\: %8.2lf %s\\n" \ STACK:memsharedBytes#000a44:"Shared Mem " \ GPRINT:memsharedBytes:AVERAGE:" Avg \\: %8.2lf %s" \ GPRINT:memsharedBytes:MIN:"Min \\: %8.2lf %s" \ GPRINT:memsharedBytes:MAX:"Max \\: %8.2lf %s\\n" \ STACK:memcachedBytes#4e9a06:"Filesystem Cache" \ GPRINT:memcachedBytes:AVERAGE:"Avg \\: %8.2lf %s" \ GPRINT:memcachedBytes:MIN:"Min \\: %8.2lf %s" \ GPRINT:memcachedBytes:MAX:"Max \\: %8.2lf %s\\n" \ STACK:memavailrealBytes#8ae234:"Avail Real Mem" \ GPRINT:memavailrealBytes:AVERAGE:" Avg \\: %8.2lf %s" \ GPRINT:memavailrealBytes:MIN:"Min \\: %8.2lf %s" \ GPRINT:memavailrealBytes:MAX:"Max \\: %8.2lf %s\\n" \ STACK:memavailswapBytes#cc0000:"Total Swap " \ GPRINT:memavailswapBytes:AVERAGE:" Avg \\: %8.2lf %s" \ GPRINT:memavailswapBytes:MIN:"Min \\: %8.2lf %s" \ GPRINT:memavailswapBytes:MAX:"Max \\: %8.2lf %s\\n" \ LINE2:memtotalrealBytes#204a87:"Total Real Mem" \ GPRINT:memtotalrealBytes:AVERAGE:" Avg \\: %8.2lf %s" \ GPRINT:memtotalrealBytes:MIN:"Min \\: %8.2lf %s" \ GPRINT:memtotalrealBytes:MAX:"Max \\: %8.2lf %s\\n" Regards, John Blackburn. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-discuss mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-discuss
image002.jpg
(image/jpeg, 101.5 KB) - not displayed