I'm having a bit of trouble trying to get process.monitor to fail when it
should be:
[root@pager mon.d]# snmpwalk pager public
enterprises.ucdavis.prTable.prEntry
enterprises.ucdavis.prTable.prEntry.prIndex.1 = 1
enterprises.ucdavis.prTable.prEntry.prNames.1 = crond
enterprises.ucdavis.prTable.prEntry.prMin.1 = 0
enterprises.ucdavis.prTable.prEntry.prMax.1 = 0
enterprises.ucdavis.prTable.prEntry.prCount.1 = 0
enterprises.ucdavis.prTable.prEntry.prErrorFlag.1 = 1
enterprises.ucdavis.prTable.prEntry.prErrMessage.1 = No crond process
running.
enterprises.ucdavis.prTable.prEntry.prErrFix.1 = 0
enterprises.ucdavis.prTable.prEntry.prErrFixCmd.1 = /etc/rc.d/init.d/crond
start
[root@pager mon.d]# ./process.monitor -c public pager
[root@pager mon.d]# perl -d process.monitor -c public pager
Loading DB routines from perl5db.pl version 1.0402
Emacs support available.
Enter h or `h h' for help.
main::(process.monitor:42): $ENV{'MIBS'} = "UCD-SNMP-MIB";
DB<1> n
main::(process.monitor:44): getopts("c:");
DB<1> n
main::(process.monitor:45): $community = $opt_c || 'public';
DB<1>
main::(process.monitor:47): $RETVAL = 0;
DB<1>
main::(process.monitor:49): foreach $host (@ARGV) {
DB<1>
main::(process.monitor:50): $session = new SNMP::Session(DestHost
=> $host,
main::(process.monitor:51): Community
=> $community);
DB<1>
main::(process.monitor:52): if (!defined ($session)) {
DB<1>
main::(process.monitor:59): my $v = new SNMP::Varbind
(["prIndex"]);
DB<1>
main::(process.monitor:60): $session->getnext ($v);
DB<1>
main::(process.monitor:62): while (!$session->{"ErrorStr"} &&
$v->tag eq "prIndex") {
DB<1>
main::(process.monitor:84): if ($session->{"ErrorStr"}) {
DB<1>
main::(process.monitor:49): foreach $host (@ARGV) {
DB<1>
main::(process.monitor:90): if (@failures) {
DB<1>
main::(process.monitor:95): exit $RETVAL;
DB<1>
Debugged program terminated. Use q to quit or R to restart,
Any ideas?
--
//Derek Callaway <[EMAIL PROTECTED]> * Programmer: CISC, LLC - S@IRC
char *sites[]={"http://www.freezersearch.com/index.cfm?aff=dhc",
"http://www.ciscllc.com","http://www.freezemail.com",0}; /*KDR AB 249*/