host-resources disk usage in bytes
"Deon van der Merwe" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi All, (new on list, have been using net-snmp with great success for 2years+) We run net-snmp 5.1.2 (and newer) on Linux (mostly Slackware and some Fedora). One of our servers ran out of diskspace last week and I could not understand why we did not get a trap notification. We query net-snmp for the diskusage and send traps based on that (*not* with snmptrapd). These are the fields that we use: HOST-RESOURCES-MIB::hrStorageIndex.4 = INTEGER: 4 HOST-RESOURCES-MIB::hrStorageType.4 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: / HOST-RESOURCES-MIB::hrStorageAllocationUnits.4 = INTEGER: 4096 Bytes HOST-RESOURCES-MIB::hrStorageSize.4 = INTEGER: 8517017 HOST-RESOURCES-MIB::hrStorageUsed.4 = INTEGER: 6661024 According to net-snmp disk usage percentage is: 78.20% Different than df, but df is also strange... [dvdm@kaus] df -B4096 Filesystem 4K-blocks Used Available Use% Mounted on /dev/sda3 8517017 6661036 1423331 83% / Again it reports 83% use, but if you do the calculation yourself you get: 78.20% which is the same as net-snmp... but what about this 83% then? Turns out that "used" (for both df and netsnmp) is the "files bytes used". The percentage calculated by df is done with the "inode bytes used". The question then: is there any place where net-snmp will report the "inode bytes used"? Should the "HOST-RESOURCES-MIB::hrStorageUsed" be changed to also include the inode size usage? Or perhaps there is a better/cleaner way of getting around this? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users