05-09-2007 05:25 PM
Hi Netpros,
Ideally what I am trying to do is to collect interface stats periodically and damp that info in to a file which can then be reviewed later at the end of the day.
The 'script' pseudo code will look something like this:
1.- At a specific time, from a management PC start a ssh session to router A
2.- perform some specific commands
3.- dump the output in to file A.txt (if the file already exist, then add that information to the existing file and save the changes.
4.- finish the session
5.- After specific time .. go back to point 1.
How can I do this without using management tools such as LMS .. etc.
Your feedback is much appreciated.
Solved! Go to Solution.
05-09-2007 05:44 PM
Depending on the version of IOS on this device, you could script this entirely on the router using either TCL+kron or the Embedded Event Manager. You could then have the router keep this data in flash, or transfer it to a network server. For details on TCL in IOS can be found at http://www.cisco.com/en/US/products/sw/iosswrel/ps5207/products_feature_guide09186a00801a75a7.html and EEM details can be found at http://www.cisco.com/en/US/products/ps6441/products_configuration_guide_chapter09186a00807c676c.html .
If you wanted to use an external management machine, and you need to use SSH, your best bet is to go with Expect as there aren't too many good SSH scripting libraries. See http://expect.nist.gov/ for more details on expect.
For scheduling this to happen on Windows, look at using "at" (the command scheduler). For UNIX, you can use cron.
05-09-2007 05:44 PM
Depending on the version of IOS on this device, you could script this entirely on the router using either TCL+kron or the Embedded Event Manager. You could then have the router keep this data in flash, or transfer it to a network server. For details on TCL in IOS can be found at http://www.cisco.com/en/US/products/sw/iosswrel/ps5207/products_feature_guide09186a00801a75a7.html and EEM details can be found at http://www.cisco.com/en/US/products/ps6441/products_configuration_guide_chapter09186a00807c676c.html .
If you wanted to use an external management machine, and you need to use SSH, your best bet is to go with Expect as there aren't too many good SSH scripting libraries. See http://expect.nist.gov/ for more details on expect.
For scheduling this to happen on Windows, look at using "at" (the command scheduler). For UNIX, you can use cron.
05-12-2007 02:23 AM
Great .. Appreciate your comments .. I will definitely have a look at your links ...
Cheers
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide