[rancid] rancid : how to filter clogin -x or -c outcome
heasley
heas at shrubbery.net
Mon Apr 20 16:12:54 UTC 2015
Sun, Apr 19, 2015 at 09:35:30AM +0200, alligator94:
> Hi,
>
>
>
> I very often use clogin -x or clogin -c to perform mass configuration
> updates. My concern is that clogin doesn't analyze the outcome of the
> command passed with -x or -d, so there is no easy way to know if the command
> has been successfully accepted by the device . For instance, some old cisco
> ios don't accept some commands.
>
> I have tried to use the clogin debug (-d) option, but it generates a huge
> amount of lines. I have also tested to open a log file (I am using teraterm)
> before running clogin, then to do a search but, it is not really easy
> because each time that you find an error condition, you need to look
> backward in the file to know which host the error message reports to.
Would par(1) help?
> I have also looked at the -s option but it looks complex to me.
>
>
>
> What would be nice to have is a way to pass a file to clogin as a parameter
> which would contain a list of keyword that you want to be extracted from the
> outcome.
>
> I am thinking to some words like :
>
> "Invalid"
>
> "Error"
>
> "timeout"
extracted from the rest of the o/p in what manner?
> If some of them are trapped during the clogin run, then they could be stored
> in a file $hostname_date_time.err.log
I think par(1) would indeed help you here. you could egrep the stuff you
want to extract (or awk, etc).
>
>
> Maybe there is an easy way to do it but I am not skilled with expect.
>
> Any help or comment is welcomed.
>
>
>
> Thanks
>
> Regards,
>
> Gilles
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
More information about the Rancid-discuss
mailing list