[rancid] Re: RANCID Debug Mode

Lance Vermilion rancid at gheek.net
Tue Nov 11 18:36:00 UTC 2008


Sean,

Try this. I am guessing you are not in the same directory as the
rancid script which means it will look in the directory which you are
executing it from to find the clogin script.

cd /usr/local/libexec/rancid/
./rancid -d <host>

On Tue, Nov 11, 2008 at 11:27 AM, Sean Murphy <smurphy at calarts.edu> wrote:
> It looks like there all in the same directory and rancid script does not
> show a path to clogin
>
> raphael# grep clogin rancid
> $timeo = 90;                            # clogin timeout in seconds
>   print STDERR "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if
> ($debug);
>   print STDOUT "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if
> ($log);
>       system "clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null >
> $host.raw 2>&1" || die "clogin failed for $host: $!\n";
>       open(INPUT, "< $host.raw") || die "clogin failed for $host: $!\n";
>       open(INPUT,"clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null |")
> || die "clogin failed for $host: $!\n";
>       print STDOUT ("$host clogin error: $_");
>       print STDERR ("$host clogin error: $_") if ($debug);
> raphael#
>
>
> raphael# ls -la /usr/local/libexec/rancid
> total 698
> drwxr-xr-x  2 root  wheel   1024 Nov 11 10:23 .
> drwxr-xr-x  3 root  wheel    512 Nov 10 18:08 ..
> -r-xr-xr-x  1 root  wheel  14384 Nov 10 18:08 agmrancid
> -r-xr-xr-x  1 root  wheel  14160 Nov 10 18:08 alogin
> -r-xr-xr-x  1 root  wheel   8479 Nov 10 18:08 arancid
> -r-xr-xr-x  1 root  wheel  17228 Nov 10 18:08 blogin
> -r-xr-xr-x  1 root  wheel   8180 Nov 10 18:08 brancid
> -r-xr-xr-x  1 root  wheel  35477 Nov 10 18:08 cat5rancid
> -r-xr-xr-x  1 root  wheel  24635 Nov 10 18:08 clogin
> -r-xr-xr-x  1 root  wheel  12451 Nov 10 18:08 control_rancid
> -r-xr-xr-x  1 root  wheel  21290 Nov 10 18:08 cssrancid
> -r-xr-xr-x  1 root  wheel  13129 Nov 10 18:08 elogin
> -r-xr-xr-x  1 root  wheel   8682 Nov 10 18:08 erancid
> -r-xr-xr-x  1 root  wheel  37646 Nov 10 18:08 f10rancid
> -r-xr-xr-x  1 root  wheel  18172 Nov 10 18:08 flogin
> -r-xr-xr-x  1 root  wheel   7711 Nov 10 18:08 fnrancid
> -r-xr-xr-x  1 root  wheel  12978 Nov 10 18:08 francid
> -r-xr-xr-x  1 root  wheel  20345 Nov 10 18:08 hlogin
> -r-xr-xr-x  1 root  wheel  12220 Nov 10 18:08 hpuifilter
> -r-xr-xr-x  1 root  wheel  16049 Nov 10 18:08 hrancid
> -r-xr-xr-x  1 root  wheel  13010 Nov 10 18:08 htlogin
> -r-xr-xr-x  1 root  wheel   7446 Nov 10 18:08 htrancid
> -r-xr-xr-x  1 root  wheel  18507 Nov 10 18:08 jerancid
> -r-xr-xr-x  1 root  wheel  14735 Nov 10 18:08 jlogin
> -r-xr-xr-x  1 root  wheel  20228 Nov 10 18:08 jrancid
> -r-xr-xr-x  1 root  wheel  23076 Nov 10 18:08 lg.cgi
> -r-xr-xr-x  1 root  wheel   6384 Nov 10 18:08 lgform.cgi
> -r-xr-xr-x  1 root  wheel  11870 Nov 10 18:08 mrancid
> -r-xr-xr-x  1 root  wheel  14588 Nov 10 18:08 nlogin
> -r-xr-xr-x  1 root  wheel   9676 Nov 10 18:08 nrancid
> -r-xr-xr-x  1 root  wheel  20307 Nov 10 18:08 nslogin
> -r-xr-xr-x  1 root  wheel   8538 Nov 10 18:08 nsrancid
> -r-xr-xr-x  1 root  wheel   4609 Nov 10 18:08 par
> -r-xr-xr-x  1 root  wheel  16956 Nov 10 18:08 prancid
> -r-xr-xr-x  1 root  wheel  59970 Nov 10 18:08 rancid
> -r-xr-xr-x  1 root  wheel   2954 Nov 10 18:08 rancid-cvs
> -r-xr-xr-x  1 root  wheel   1995 Nov 10 18:08 rancid-fe
> -r-xr-xr-x  1 root  wheel   3452 Nov 10 18:08 rancid-run
> -r-xr-xr-x  1 root  wheel  23562 Nov 10 18:08 rivlogin
> -r-xr-xr-x  1 root  wheel   9098 Nov 10 18:08 rivrancid
> -r-xr-xr-x  1 root  wheel  11416 Nov 10 18:08 rrancid
> -r-xr-xr-x  1 root  wheel  10566 Nov 10 18:08 srancid
> -r-xr-xr-x  1 root  wheel  14220 Nov 10 18:08 tntlogin
> -r-xr-xr-x  1 root  wheel   8084 Nov 10 18:08 tntrancid
> -r-xr-xr-x  1 root  wheel  14819 Nov 10 18:08 xrancid
> -r-xr-xr-x  1 root  wheel  11930 Nov 10 18:08 zrancid
> raphael#
>
>
>
> Lance Vermilion wrote:
>>
>> verify in your rancid script the location of clogin. (grep clogin
>> /usr/local/libexec/rancid/bin/rancid).
>>
>> Your rancid stuff should be located in the bin directory inside of
>> your rancid directory. Like so.
>>
>> /usr/local/libexec/rancid/bin/clogin
>>
>> you mentioned the following as your location to clogin
>>
>> /usr/local/libexec/rancid/clogin
>>
>> On Tue, Nov 11, 2008 at 9:57 AM, Sean Murphy <smurphy at calarts.edu> wrote:
>>
>>>
>>> OK I ran the command and received the following output.  I thought I
>>> could
>>> see it in real time like clogin unless this is an error.  I noticed that
>>> it
>>> said clogin not found but I can run that by itself and its fine.
>>>
>>>
>>> raphael# ./rancid -d 10.0.0.1
>>> executing clogin -t 90 -c"admin show version;show version;show redundancy
>>> secondary;show idprom backplane;show install active;admin show env
>>> all;show
>>> env all;show rsp chassis-info;show gsr chassis;show diag
>>> chassis-info;show
>>> boot;show bootvar;admin show variables boot;show variables boot;show
>>> flash;dir /all nvram:;dir /all bootflash:;dir /all slot0:;dir /all
>>> disk0:;dir /all slot1:;dir /all disk1:;dir /all slot2:;dir /all
>>> disk2:;dir
>>> /all harddisk:;dir /all harddiska:;dir /all harddiskb:;dir /all
>>> sup-bootflash:;dir /all sup-microcode:;dir /all slavenvram:;dir /all
>>> slavebootflash:;dir /all slaveslot0:;dir /all slavedisk0:;dir /all
>>> slaveslot1:;dir /all slavedisk1:;dir /all slaveslot2:;dir /all
>>> slavedisk2:;dir /all slavesup-bootflash:;dir /all sec-nvram:;dir /all
>>> sec-bootflash:;dir /all sec-slot0:;dir /all sec-disk0:;dir /all
>>> sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir /all
>>> sec-disk2:;show
>>> controllers;show controllers cbus;show diagbus;admin show diag;show
>>> diag;show module;show spe version;show c7200;show inventory raw;show vtp
>>> status;show vlan;show vlan-switch;show debug;show running-config;write
>>> term"
>>> 10.0.0.1
>>> clogin: not found
>>> 10.0.0.1: missed cmd(s): admin show diag,dir /all slavedisk2:,show rsp
>>> chassis-info,dir /all sec-slot2:,show diag,dir /all disk1:,show gsr
>>> chassis,dir /all sec-nvram:,show diag chassis-info,dir /all disk2:,dir
>>> /all
>>> sec-bootflash:,show spe version,dir /all slaveslot2:,dir /all disk0:,show
>>> install active,show bootvar,dir /all slaveslot0:,dir /all sec-slot1:,dir
>>> /all harddiska:,dir /all slavenvram:,show flash,dir /all sec-disk2:,dir
>>> /all
>>> slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
>>> variables
>>> boot,show boot,show inventory raw,dir /all slavedisk1:,show env all,show
>>> module,admin show env all,show controllers,admin show version,show
>>> diagbus,dir /all slavedisk0:,show debug,show idprom backplane,dir /all
>>> bootflash:,dir /all sec-slot0:,dir /all sec-disk1:,write term,show vtp
>>> status,dir /all sup-bootflash:,dir /all slot2:,dir /all harddisk:,dir
>>> /all
>>> slot0:,dir /all sup-microcode:,show vlan,dir /all slavebootflash:,show
>>> controllers cbus,dir /all slaveslot1:,dir /all nvram:,show version,show
>>> vlan-switch,admin show variables boot,show redundancy secondary,show
>>> running-config,show c7200,dir /all slot1:
>>> 10.0.0.1: missed cmd(s): admin show diag,dir /all slavedisk2:,show rsp
>>> chassis-info,dir /all sec-slot2:,show diag,dir /all disk1:,show gsr
>>> chassis,dir /all sec-nvram:,show diag chassis-info,dir /all disk2:,dir
>>> /all
>>> sec-bootflash:,show spe version,dir /all slaveslot2:,dir /all disk0:,show
>>> install active,show bootvar,dir /all slaveslot0:,dir /all sec-slot1:,dir
>>> /all harddiska:,dir /all slavenvram:,show flash,dir /all sec-disk2:,dir
>>> /all
>>> slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
>>> variables
>>> boot,show boot,show inventory raw,dir /all slavedisk1:,show env all,show
>>> module,admin show env all,show controllers,admin show version,show
>>> diagbus,dir /all slavedisk0:,show debug,show idprom backplane,dir /all
>>> bootflash:,dir /all sec-slot0:,dir /all sec-disk1:,write term,show vtp
>>> status,dir /all sup-bootflash:,dir /all slot2:,dir /all harddisk:,dir
>>> /all
>>> slot0:,dir /all sup-microcode:,show vlan,dir /all slavebootflash:,show
>>> controllers cbus,dir /all slaveslot1:,dir /all nvram:,show version,show
>>> vlan-switch,admin show variables boot,show redundancy secondary,show
>>> running-config,show c7200,dir /all slot1:
>>> 10.0.0.1: End of run not found
>>> 10.0.0.1: End of run not found
>>> !
>>> raphael#
>>>
>>>
>>> Lance Vermilion wrote:
>>>
>>> Sean,
>>>
>>> clogin is purely the login script. You must run "rancid -d <host>" to
>>> see what you are looking for.
>>>
>>> -Lance
>>>
>>> On Mon, Nov 10, 2008 at 6:11 PM, Sean Murphy <smurphy at calarts.edu> wrote:
>>>
>>>
>>> I am trying to see the entire RANCID process from beginning to end first
>>> with clogin and having it login run the config portion and finally
>>> logout.
>>>
>>> I have tried /usr/local/libexec/rancid/clogin 10.0.0.1
>>>
>>> This just shows the login portion.  Is there a way to see everything?
>>>
>>> Thanks.
>>> _______________________________________________
>>> Rancid-discuss mailing list
>>> Rancid-discuss at shrubbery.net
>>> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>>>
>>>
>>>
>>> _______________________________________________
>>> Rancid-discuss mailing list
>>> Rancid-discuss at shrubbery.net
>>> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>>>
>>>
>


More information about the Rancid-discuss mailing list