Using SNMP to monitor remote processes and disk space

snmpget -v 1 -c COMMUNITYSTR hostname OID

what OIDs would I use to get information on all the processes and disk space information that are on a particular host.

where can i find out information on all of this?

thanks

If you dont know much about mibs and OIDs best option to start with is following command

snmpwalk -v 1 -c public localhost .

mind it output will be huge and messy but u will have everything. For best results redirect output to a file and then look for familiar values.
e.g.
Average load

snmpwalk -v 1 -c public localhost load
UCD-SNMP-MIB::laLoadFloat.1 = Opaque: Float: 15.886719
UCD-SNMP-MIB::laLoadFloat.2 = Opaque: Float: 15.601562
UCD-SNMP-MIB::laLoadFloat.3 = Opaque: Float: 15.335938

system uptime:

snmpwalk -v 1 -c public localhost sysuptime
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1862835767) 215 days, 14:32:37.67

you can compare these values while by cross checking with OS commands.
And Finally

snmpwalk -v 1 -c public localhost disk
UCD-DISKIO-MIB::diskIOIndex.1 = INTEGER: 1
UCD-DISKIO-MIB::diskIOIndex.2 = INTEGER: 2
UCD-DISKIO-MIB::diskIOIndex.3 = INTEGER: 3
UCD-DISKIO-MIB::diskIOIndex.4 = INTEGER: 4
UCD-DISKIO-MIB::diskIOIndex.5 = INTEGER: 5
UCD-DISKIO-MIB::diskIOIndex.6 = INTEGER: 6
UCD-DISKIO-MIB::diskIOIndex.7 = INTEGER: 7
UCD-DISKIO-MIB::diskIOIndex.8 = INTEGER: 8
UCD-DISKIO-MIB::diskIOIndex.9 = INTEGER: 9
UCD-DISKIO-MIB::diskIOIndex.10 = INTEGER: 10
UCD-DISKIO-MIB::diskIOIndex.11 = INTEGER: 11
UCD-DISKIO-MIB::diskIOIndex.12 = INTEGER: 12
UCD-DISKIO-MIB::diskIOIndex.13 = INTEGER: 13
UCD-DISKIO-MIB::diskIOIndex.14 = INTEGER: 14
UCD-DISKIO-MIB::diskIOIndex.15 = INTEGER: 15
UCD-DISKIO-MIB::diskIOIndex.16 = INTEGER: 16
UCD-DISKIO-MIB::diskIOIndex.17 = INTEGER: 17
UCD-DISKIO-MIB::diskIOIndex.18 = INTEGER: 18
UCD-DISKIO-MIB::diskIOIndex.19 = INTEGER: 19
UCD-DISKIO-MIB::diskIOIndex.20 = INTEGER: 20
UCD-DISKIO-MIB::diskIOIndex.21 = INTEGER: 21
UCD-DISKIO-MIB::diskIODevice.1 = STRING: sd0
UCD-DISKIO-MIB::diskIODevice.2 = STRING: sd1
UCD-DISKIO-MIB::diskIODevice.3 = STRING: md10
UCD-DISKIO-MIB::diskIODevice.4 = STRING: md20
UCD-DISKIO-MIB::diskIODevice.5 = STRING: md0
UCD-DISKIO-MIB::diskIODevice.6 = STRING: md16
UCD-DISKIO-MIB::diskIODevice.7 = STRING: md26
UCD-DISKIO-MIB::diskIODevice.8 = STRING: md6
UCD-DISKIO-MIB::diskIODevice.9 = STRING: md11
UCD-DISKIO-MIB::diskIODevice.10 = STRING: md21
UCD-DISKIO-MIB::diskIODevice.11 = STRING: md1
UCD-DISKIO-MIB::diskIODevice.12 = STRING: md13
UCD-DISKIO-MIB::diskIODevice.13 = STRING: md23
UCD-DISKIO-MIB::diskIODevice.14 = STRING: md3
UCD-DISKIO-MIB::diskIODevice.15 = STRING: md15
UCD-DISKIO-MIB::diskIODevice.16 = STRING: md25
UCD-DISKIO-MIB::diskIODevice.17 = STRING: md5
UCD-DISKIO-MIB::diskIODevice.18 = STRING: md17
UCD-DISKIO-MIB::diskIODevice.19 = STRING: md27
UCD-DISKIO-MIB::diskIODevice.20 = STRING: md7
UCD-DISKIO-MIB::diskIODevice.21 = STRING: sd3
UCD-DISKIO-MIB::diskIONRead.1 = Counter32: 3347280530
UCD-DISKIO-MIB::diskIONRead.2 = Counter32: 2236217242
UCD-DISKIO-MIB::diskIONRead.3 = Counter32: 433308160
UCD-DISKIO-MIB::diskIONRead.4 = Counter32: 428610048
UCD-DISKIO-MIB::diskIONRead.5 = Counter32: 861918208
UCD-DISKIO-MIB::diskIONRead.6 = Counter32: 2145613824
UCD-DISKIO-MIB::diskIONRead.7 = Counter32: 2143999488
UCD-DISKIO-MIB::diskIONRead.8 = Counter32: 4289613312
.......
.....

Output was too long so i pasted only few lines. Now you can search for OIDs / MIBs and get what u want.
I call it learning while doing
:stuck_out_tongue:

1 Like

thanks so much!

is there a way to get the list of processes on a remote host via snmp?

Here man ..

snmpwalk -v 1 -c public localhost hrSWRun

For disk usage u might also want to check following:

snmpwalk -v 1 -c public localhost hrStorage

But as i said before... do snmpwalk to your system.since some enterprise oids may be different.
it takes some time but u will get to it.