RE: how to monitor memory usage on freebsd systems

"Hampton, Michael" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <EAF1B930C18C7B47A40214DE42D82EE401218EC4@uklonip576.vital-group.com>
Both! It depends which storage you want to measure. In the example
bellow 1 = Physical Memory 2 = Virtual Memory (This may change for
different systems).
 
The number at the beginning (1 or 2) is the index.
 
If you do the following command you get a table output. Column 1 is the
index. It is this number you use.
 
EXAMPLE:
 
-bash-3.00$ snmptable -cMyString -v1 <IP ADDRESS> hrStorageTable
SNMP table: HOST-RESOURCES-MIB::hrStorageTable
 
 hrStorageIndex                                hrStorageType
hrStorageDescr hrStorageAllocationUnits hrStorageSize hrStorageUsed
hrStorageAllocationFailures
              1           HOST-RESOURCES-TYPES::hrStorageRam Physical
memory               1024 Bytes       1022188        993792
?
              3 HOST-RESOURCES-TYPES::hrStorageVirtualMemory  Virtual
memory               1024 Bytes       3053796        993792
?
              6         HOST-RESOURCES-TYPES::hrStorageOther  Memory
buffers               1024 Bytes        176756             ?
?
              7         HOST-RESOURCES-TYPES::hrStorageOther   Cached
memory               1024 Bytes        575888             ?
?
              8         HOST-RESOURCES-TYPES::hrStorageOther   Shared
memory               1024 Bytes             0             ?
?
             10 HOST-RESOURCES-TYPES::hrStorageVirtualMemory      Swap
space               1024 Bytes       2031608             0
?
             31     HOST-RESOURCES-TYPES::hrStorageFixedDisk
/               4096 Bytes      16672164       1411974
?
             32     HOST-RESOURCES-TYPES::hrStorageFixedDisk
/boot               1024 Bytes        101105         12120
?

and the command you used gives the total size of the Physical Memory.
-bash-3.00$ snmpwalk -cMyString -v1 <IP ADDRESS>
hrStorageTable.hrStorageEntry.hrStorageSize.1
HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 1022188
 
To get the used part of the Physical Memory, use:
 
-bash-3.00$ snmpwalk -cMyString -v1 <IP ADDRESS>
hrStorageTable.hrStorageEntry.hrStorageUsed.1
HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 993544

Hope this helps.

________________________________

From: [email protected]
[mailto:[email protected]] On Behalf Of Chee
Meng Gui
Sent: 11 August 2008 05:49
To: [email protected]
Subject: how to monitor memory usage on freebsd systems


Hi All

I am trying monitor memory usage on a few Freebsd systems.
Running net-snmp-5.4.1.2  on Freebsd 6.2 and 5.4.

Question: How to monitor memory usage from the snmp info?
Is it 
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.1 ? 
Or
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.2 ?
Or  something else?

Thank you.
Gui


A section of the snmpwalk results on one system:

.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageDescr.1 = STRING: Physical memor
y
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageDescr.2 = STRING: Real memory
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageDescr.3 = STRING: Virtual memory
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageDescr.6 = STRING: Memory Buffer
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageDescr.7 = STRING: Cached memory
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageDescr.8 = STRING: Shared virtual
 memory
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageDescr.9 = STRING: Shared real me
mory
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageDescr.10 = STRING: Swap space

....

.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.1 = INTEGER: 259673
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.2 = INTEGER: 253060
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.3 = INTEGER: 121646841
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.6 = INTEGER: 28448
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.7 = INTEGER: 8621
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.8 = INTEGER: 6310
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.9 = INTEGER: 3190
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.10 = INTEGER: 1310688
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.31 = INTEGER: 5077079
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.32 = INTEGER: 2
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.33 = INTEGER: 2538519
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.34 = INTEGER: 211119221
.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorage
Entry.hrStorageSize.35 = INTEGER: 15231318


-- 
Gui




http://www.vital-group.com      - Dedicated to business communications.
http://www.vital-storage.com    - Secure easy-to-use remote backups for business critical data.

The information contained in this message is intended for the addressee only and may contain confidential and/or privileged information.If you are not the addressee, please delete this message and notify the sender; you should not copy or distribute this message or disclose its contents to anyone.Any views or opinions expressed in this message are those of the author and do not necessarily represent those of The Vital International Group or any of its affiliates.No reliance may be placed on this message without written confirmation from an authorised representative of its contents.

Registered in England. Vital International Limited. Leigh House, Weald Road, Brentwood, Essex, CM14 4SX.Company registration number - 45022560. 

08/11/08 10:24:40

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.