Some suggestions, when in doubt print out. Print each and every function return value to see what is going on. Also I would recommend that use use constants for the SNMP OIDs
define('FdyBlahServer', '1.2.3.4.5.6.9.0'); Use single quotes on both of them. One thing, you're using the 'a' type for your IP address but both my Alteon and Javier's Cisco plugins use a type s maybe give s a go? On Tue, Jul 03, 2007 at 03:34:09PM -0400, Jeffrey Singleton wrote: > // FOUNDRY-SN-AGENT-MIB Configuration Downloader Implementation > // successful (1), processing (18), timeout (6), bad access (11), > file-not-found (10) [....] > $result = snmp_get($ip,$rwcommunity,"$oid.9.0"); > if ($result != 1) return true; Hmm, to me that's the wrong result. You could have a slow switch! return value 18 should be ok I believe as it is thinking about it. I'd put the status into a logger command, have a look at the Alteon one. > while (($result == 1) and ($i++ < 30)) { > $result = snmp_get($ip,$rwcommunity,"$oid.9.0"); > sleep(2); > } > if (($result == 1) or (preg_match("/^successful/",$result))) > return true; > return false; > } I'd rewrite this, won't it be result=18 if it is thinking about it and result 1 means it is finished? $i=0 do { $result = snmp_get($ip,$rwcommunity,"$oid.9.0"); // debug("Foundry wait, host is $ip result is $result.\n"); if ($result == 1) return true; sleep(2); } while ($result == 18 && $i++ < 30); return false; -- Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5 http://www.enc.com.au/ csmall at : enc.com.au http://www.debian.org/ Debian GNU/Linux, software should be Free ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ jffnms-users mailing list jffnms-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jffnms-users