better ucd/net-snmp memory usage -- update June 21 2009
Moderators: Developers, Moderators
Excellent, that fixed it!
Thanks!
Thanks!
Code: Select all
homefileserv ~ # cat /proc/meminfo
MemTotal: 1036564 kB
MemFree: 865200 kB
Buffers: 21236 kB
Cached: 42736 kB
SwapCached: 0 kB
Active: 119840 kB
Inactive: 38176 kB
HighTotal: 131008 kB
HighFree: 256 kB
LowTotal: 905556 kB
LowFree: 864944 kB
SwapTotal: 987988 kB
SwapFree: 987988 kB
Dirty: 36 kB
Writeback: 0 kB
Mapped: 105328 kB
Slab: 7832 kB
CommitLimit: 1506268 kB
Committed_AS: 304852 kB
PageTables: 744 kB
VmallocTotal: 114680 kB
VmallocUsed: 3440 kB
VmallocChunk: 111240 kB
any known problems with net-snmp 5.4?
out of the blue after upgrading net-snmp to 5.4 (on the cacti-box) I got all memory graphs at 100% real memory used and when trying the script I get output like that:
Any ideas what went wrong here and how to solve this?
thanks,
thomas
out of the blue after upgrading net-snmp to 5.4 (on the cacti-box) I got all memory graphs at 100% real memory used and when trying the script I get output like that:
Code: Select all
php ./netsnmp_memory_usage.php tcp:127.0.0.1, public, 1, , , 16109, 500
totalReal:3082408 availReal:0 totalSwap:0 availSwap:0 memBuffer:0 memCached:0 usedReal:3082408 usedSwap:0
thanks,
thomas
Hmm, I recompiled net-snmp now with lm_sensors but strange thing is, I didn't even have lm_sensors installed before.
Is that really required on the cacti-machine or more on the remote machines which are monitored.
restarted net-snmp on the cacti-machine now but I still get
guess I have to read up more how to enable lm_sensors if thats really what is needed here.
Is that really required on the cacti-machine or more on the remote machines which are monitored.
restarted net-snmp on the cacti-machine now but I still get
Code: Select all
snmpwalk -v 2c -c public 192.168.115.11 .1.3.6.1.4.1.2021.13.16
LM-SENSORS-MIB::lmSensors = No Such Object available on this agent at this OID
I have a problem whith this script ...
When i do
php -q netsnmp_memory_usage.php 127.0.0.1, public, 1, , , 161, 500
it give me that
totalReal:254848 availReal:19128 totalSwap:524280 availSwap:483900 memBuffer:10124 memCached:50516 usedReal:175080 usedSwap:40380
But the pooler write warning in the log , grph is showing nothing
What could i do ??
When i do
php -q netsnmp_memory_usage.php 127.0.0.1, public, 1, , , 161, 500
it give me that
totalReal:254848 availReal:19128 totalSwap:524280 availSwap:483900 memBuffer:10124 memCached:50516 usedReal:175080 usedSwap:40380
But the pooler write warning in the log , grph is showing nothing
Code: Select all
02/05/2007 08:35:02 PM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /opt/cacti/scripts/linux_memory.pl MemFree:, output: 13128
02/05/2007 08:35:04 PM - CMDPHP: Poller[0] Host[1] DS[107] CMD: php /opt/cacti/scripts/netsnmp_memory_usage.php 127.0.0.1, public, 1, , , 161, 500, output: U
02/05/2007 08:35:04 PM - CMDPHP: Poller[0] Host[1] DS[107] WARNING: Result from CMD not valid. Partial Result: Content-type: text/html
X-Powered-By: PHP/4.3.9
What could i do ??
- exploit-soget
- Posts: 40
- Joined: Tue Jan 23, 2007 5:31 am
I have exactly the same problem.
When I do this command :
/usr/local/bin/php netsnmp_memory_usage.php superexpl, public, 1, , , 161, 500
totalReal:2052988 availReal:43952 totalSwap:4200956 availSwap:4200944 memBuffer:317168 memCached:1017712 usedReal:674156 usedSwap:12
BUT NOTHING IS GRAPH AND RRDTOOL SAYS OK IN THE DEBUG MODE
When I do this command :
/usr/local/bin/php netsnmp_memory_usage.php superexpl, public, 1, , , 161, 500
totalReal:2052988 availReal:43952 totalSwap:4200956 availSwap:4200944 memBuffer:317168 memCached:1017712 usedReal:674156 usedSwap:12
BUT NOTHING IS GRAPH AND RRDTOOL SAYS OK IN THE DEBUG MODE
I'm also having the same problem that ts77 reported in his post of 1/31/07.
The PHP script is no longer reporting the proper values for availReal, totalSwap, availSwap, memBuffer, memCached, usedReal, and usedSwap. The only value that is accurate is totalReal.
Example:
If I manually walk the OIDs the script is checking for, I do get the proper values returned.
Examples:
Here the output of free:
Like ts77, this seems to have started immediately after an update to Net-SNMP 5.4. Downloading the updated script has not helped.
....
Actually, after looking over the script one more time and looking at what I pasted into this post, it looks like the Net-SNMP update has now caused all the OIDs to report "kB" after every value instead of just after totalReal.
After commenting out the IF/ELSE statement in the script so that all the OIDs get parsed, the output seems to be back to normal.
Not sure if this calls for a script update, or if I should just find a way to get snmp not to but kBs at the ends of those values.
The PHP script is no longer reporting the proper values for availReal, totalSwap, availSwap, memBuffer, memCached, usedReal, and usedSwap. The only value that is accurate is totalReal.
Example:
Code: Select all
$ php netsnmp_memory_usage.php 127.0.0.1, public, 2, , , 161, 500
totalReal:2067456 availReal:0 totalSwap:0 availSwap:0 memBuffer:0 memCached:0 usedReal:2067456 usedSwap:0
Examples:
Code: Select all
$ snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.2021.4.15.0
UCD-SNMP-MIB::memCached.0 = INTEGER: 1427728 kB
$ snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.2021.4.14.0
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 59492 kB
$ snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.2021.4.6.0
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 114640 kB
Code: Select all
$ free
total used free shared buffers cached
Mem: 2067456 1984120 83336 0 61224 1448452
-/+ buffers/cache: 474444 1593012
Swap: 1959920 220 1959700
....
Actually, after looking over the script one more time and looking at what I pasted into this post, it looks like the Net-SNMP update has now caused all the OIDs to report "kB" after every value instead of just after totalReal.
After commenting out the IF/ELSE statement in the script so that all the OIDs get parsed, the output seems to be back to normal.
Code: Select all
$ php netsnmp_memory_usage.php 127.0.0.1, public, 2, , , 161, 500
totalReal:2067456 availReal:72428 totalSwap:1959920 availSwap:1959700 memBuffer:62976 memCached:1471788 usedReal:460264 usedSwap:220
I have similar problemintellutions wrote:I haven't been able to get this report to work, or any other report that involves load average or memory stats. I just don't get any data back from certain MIBs. (ex: .1.3.6.1.4.1.2021.4.6.0)
An snmpwalk shows results such as:
UCD-SNMP-MIB::memAvailReal.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
Other stats and graphs work fine (ex: ethernet traffic) so I know I have snmp and cacti setup correctly.
Is there something I need to do/edit/upgrade on my servers to get these other stats?
I don't get anything from graph..
if i run php poller manualy i get :: ERROR: Not enough arguments
Im using centos 4.4 and net-snmp 5.1.2-11el4.7..also i have cacti 0.8.6j
how do i alter snmp cpnfiguration to allow viewing of mib data other than [system]?
change "netsnmp_memory_usage.php" from line 176 to the following to fix "0" output in newer net-snmp.
Code: Select all
#
# make sure the data only contains numbers
#
if (is_numeric($cmdoutput[$cmdoutputcount]) == FALSE) {
// #
// # the totalReal OID appends "KBytes" to the value, so eliminate it
// #
// if ($oid[$cmdoutputcount][0] == "totalReal") {
$cmdoutput[$cmdoutputcount] = intval($cmdoutput[$cmdoutputcount]);
// }
// else {
// $cmdoutput[$cmdoutputcount] = 0;
// }
}
Hi,
Does anyone having problem when graph memory on SuSe Linux 64GB ?
Apparently my graph shows that all 64GB is shown as Real Usage. There is no "Buffer", "Cache", "Free". This contradicts with my top command.
By the way, I use this template with RedHat ES 16GB with no problem.
Any suggestion is greatly appreciated.
Does anyone having problem when graph memory on SuSe Linux 64GB ?
Apparently my graph shows that all 64GB is shown as Real Usage. There is no "Buffer", "Cache", "Free". This contradicts with my top command.
By the way, I use this template with RedHat ES 16GB with no problem.
Any suggestion is greatly appreciated.
- Attachments
-
- All physical memory is shown as Real Usage
- suse_ucd_memory_usage.png (28.34 KiB) Viewed 12807 times
Who is online
Users browsing this forum: No registered users and 0 guests