[c-nsp] How to run a scheduled script to grab interface stats

Andrew Wentzell awentzell at gmail.com
Fri Nov 26 15:53:41 EST 2010


On Fri, Nov 26, 2010 at 11:43 AM, John Neiberger <jneiberger at gmail.com> wrote:
> I'd like to periodically (weekly, for example) gather certain
> interface stats via "show int" and then upload those stats via
> ftp/tftp/scp or whatever to a server. I'll then pull those stats into
> an Excel spreadsheet and parse them. What would be the best way to do
> this? Is this something that can be built in a TCL script and then run
> on a schedule? If you needed to do this, how would you do it? I have
> stats from multiple interfaces on six 7600s that I need to grab at
> least once a week.

I'd write an expect script to run the show command, then parse the
output with perl/python (or just write the whole thing in python and
use the pexpect module).  Dump all the data to a CSV file or whatever
you want. Run via a cron job as often as needed.


More information about the cisco-nsp mailing list