Snmp Process Monitoring Issue

Can someone please explain to me how come snmpwalk doesn't always find a running process that's on a remote server?

I prefer to use snmp to monitor processes remotely because this doesn't require me to put a script on that remote box. but the problem is, there are times that my snmp command will report that a certain process wasn't found, when in fact that process is running.

The script i run for this revolves around this command:

snmpwalk -v2c -c bla&@ blah.blah.net hrSWRunPath | egrep -ic oracle 

is there a better way to do this via snmp?

snmp is by definition NOT required to get an answer for every query. By default it uses a delivery system, UDP, not TCP, that is not guaranteed to complete the delivery.

The more usual way to get what you want using snmpwalk, this example assumes public is allowed

ok=1
cnt=0
while [ $ok -ne 0 ]
do
   snmpwalk -c public -v 2c  nodename [oid]
   ok=$?
   cnt=$cnt+1
   [ $cnt -eq 10 ]  && break;
   sleep 2
done | egrep -q 'pattern '
[ $? -ne 0 ]  &&  echo 'failure'

This is in effect partly because a busy system is allowed to disregard snmp requests.

You may want to use the DISMAN Event MIB and the built-in process monitoring facility, see for instance: snmpd.examples

HTH, Lo�c