What is the proper syntax and usage for procfix?

"James Tanner" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello,

I'm trying to configure snmpd to automatically restart apache if the number
of processes falls below 2.

My specs:

[root@dhcp243-141 snmp]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
[root@dhcp243-141 snmp]# snmpd --version

NET-SNMP version:  5.3.1
Web:               http://www.net-snmp.org/
Email:             [email protected]


Lines I've added to /etc/snmpd.conf:

access notConfigGroup "" any noauth exact mib2 none none
proc httpd 9 2
#procfix httpd /etc/init.d/httpd restart
procfix httpd /bin/sh /etc/init.d/httpd restart

I've tested and retested this config and it doesn't appear to work. Killing
the apache processes doesn't appear to trigger any events.

This is my testing method:

[root@dhcp243-141 log]# snmpwalk -v 1 -c public localhost | grep http | grep
RunPath
HOST-RESOURCES-MIB::hrSWRunPath.7068 = STRING: "/usr/sbin/httpd"
HOST-RESOURCES-MIB::hrSWRunPath.7070 = STRING: "/usr/sbin/httpd"
HOST-RESOURCES-MIB::hrSWRunPath.7071 = STRING: "/usr/sbin/httpd"
HOST-RESOURCES-MIB::hrSWRunPath.7072 = STRING: "/usr/sbin/httpd"
HOST-RESOURCES-MIB::hrSWRunPath.7073 = STRING: "/usr/sbin/httpd"
HOST-RESOURCES-MIB::hrSWRunPath.7074 = STRING: "/usr/sbin/httpd"
HOST-RESOURCES-MIB::hrSWRunPath.7075 = STRING: "/usr/sbin/httpd"
HOST-RESOURCES-MIB::hrSWRunPath.7076 = STRING: "/usr/sbin/httpd"
HOST-RESOURCES-MIB::hrSWRunPath.7077 = STRING: "/usr/sbin/httpd"
[root@dhcp243-141 log]#

[root@dhcp243-141 snmp]# for i in `ps aux | grep httpd | grep -v grep | grep
-v tail | awk '{print $2}'`; do kill -9 $i ; done;
[root@dhcp243-141 snmp]# service httpd status
httpd dead but pid file exists

I read in a previous email to the list that snmpd takes a while to poll the
process table, but I have waited a couple hours without any change. Have I
missed something in my configs that is relevant to using procfix?

Regards,
James

-------------------------------------------------------------------------
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.