Hmm. Very strange.

On Tuesday ... I was working with both the cisco_cc and cisco_catos
config scripts in an effort to try and resolve this Foundry config copy
problem.

It appears that sometime around 2pm EST (according the the tftpd dump
directory) that I did have a successful config grab, but the failure
point was putting it into the DB.

Now I have to backtrack and see where I succeeded in the config dump on
Tuesday so I can move forth.


On Wed, 2007-07-04 at 09:50 +1000, Craig Small wrote:

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

-- 
Jeffrey Singleton
Network Systems Administrator (Trusted Source)
Secure Computing Corporation
48000 North Point Parkway
Alpharetta, GA 30022
C: +1 770-820-2909
O: +1 678-904-3694
-------------------------------------------------------------------------
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

Reply via email to