Using SNMP to monitor remote processes and disk space

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Infrastructure Monitoring Using SNMP to monitor remote processes and disk space
# 1  
Old 11-30-2010
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

Last edited by jim mcnamara; 11-30-2010 at 04:01 PM.. Reason: moved for better visibility for SNMP
# 2  
Old 11-30-2010
If you dont know much about mibs and OIDs best option to start with is following command
Code:
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
Code:
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:
Code:
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
Code:
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
:P
This User Gave Thanks to mtomar For This Post:
# 3  
Old 11-30-2010
thanks so much!

is there a way to get the list of processes on a remote host via snmp?
# 4  
Old 11-30-2010
Here man ..

Code:
snmpwalk -v 1 -c public localhost hrSWRun

For disk usage u might also want to check following:
Code:
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Linux Total Processes - Why monitor it?

Hi Guys, Monitoring 'Total Processes' on Linux servers has been always something you 'should' do. My question is - why? Is it relevant anymore? If you monitor memory and cpu params, you have a pretty good idea about what's going on. Is the number of processes really matter? Thanks (1 Reply)
Discussion started by: DjDeaf
1 Replies

2. Shell Programming and Scripting

Script to monitor the disk space details in HP-UX

Hi, I need to monitor the disk space details in HP-UX . I need a command on how to display the information on below format File System Total_Space_KB Used_Space_KB Available_Space_KB %Used /u05 524288000 376235344 138799427 73% /u02 ... (0 Replies)
Discussion started by: ali560045
0 Replies

3. Ubuntu

How to monitor firefox processes?

Hi Team, I have over 100 users,working on LINUX machine & all they use firefox. I want to monitor traffic from every IP and mainly CPU USAGE TAKEN BY FIREFOX PROCESSES ON EACH MACHINE. Is there any tool which runs on lunux and will help me to monitor firefox processes of our entire LAN? ... (2 Replies)
Discussion started by: paragnehete
2 Replies

4. Infrastructure Monitoring

SNMP disk space - inaccurate numbers

on the remote server that im running the snmp command against, below is the information about the specific directory i'm concerned about: SIZE USED AVAIL 673G 483G 157G can someone explain to me why snmp is telling me the size of this filesystem is 176399584? ... (5 Replies)
Discussion started by: SkySmart
5 Replies

5. AIX

how to monitor deamon processes

we have several deamon processes which were killed for some unknown reasons. we have to bring the deamon back manually everytime. Deamons running on 2 identical instances. It is ok on one instance but be killed 3 or 4 times a day on another. Any idea how to monitor it? like who/how the processes be... (3 Replies)
Discussion started by: hamiltonhall
3 Replies

6. Shell Programming and Scripting

perl script to monitor 2 processes

I have two processes that I need to keep running. The first process is a server, the second is basically a canvas for creating images which get saved to a directory. So I plan on using launchd (Mac OS 10.5) on a server to check every minute or so to make sure two things are true: 1) Both apps... (3 Replies)
Discussion started by: Solerous
3 Replies

7. Shell Programming and Scripting

script to monitor disk space usage

Some times my disk space is used upto 100% due to the application logs . So this script is to monitor the disk space usage and wall message to the users about the disk space usage if it exceeds the limit set in the script. Here for example the limit is set to 80%. This job is added in cron to... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

8. Shell Programming and Scripting

Monitor Disk Space

I would like to monitor disk space on solaris system.Need script which will send email if the disk space exceeds 90%. Thanks -sam (3 Replies)
Discussion started by: sam786
3 Replies

9. Filesystems, Disks and Memory

Automatic monitor disk-space

Hello, I am trying to find a shell script to monitor diskspace of all the directories in the server. When the script encounteres a disk which above the treashold, I want an email notification. My system runs on AIX. Is there anybody around who can help me with such a script? ... (3 Replies)
Discussion started by: anuradha
3 Replies

10. Shell Programming and Scripting

Automatic monitor disk-space

Hello, I am trying to find a shell script to monitor diskspace. When the script encounteres a disk which above the treashold, I want an email notification. My system runs on a Sun Solaris. Is there anybode around who can help me with such a script? Norbert (3 Replies)
Discussion started by: nfbeerse
3 Replies
Login or Register to Ask a Question