Re: [c-nsp] script
On 21 September 2016 at 12:10, Lijalem Fetenewrote: > Dears, > I want to login to hundreds of routers simultaneously in either telnet > /ssh and execute some command to each device and return the output. Is > there anyone to help me please ? If you actually want the command to be run in parallel across all the devices you can use Salt. If not and you are happy for this to be run in series you can use ciscocmd (an expect script, https://sourceforge.net/projects/cosi-nms/files/ciscocmd/), NAPALM (this is like expect but in Python, https://github.com/napalm-automation/napalm), RANCID (also builds on expect), Anisible (using SSH, https://www.ansible.com/) or write a multi-threaded wrappar in C/Go/Python. Cheers, James. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] script
Hi!. Use Phyton and paramiko library. David 2016-09-21 13:21 GMT+01:00 Ryan West: > > Hi, > > > On Sep 21, 2016, at 7:11 AM, Lijalem Fetene > wrote: > > > > Dears, > > I want to login to hundreds of routers simultaneously in either telnet > > /ssh and execute some command to each device and return the output. Is > > there anyone to help me please ? > > > > > > Rancid/clogin or trigger come to mind. > ___ > cisco-nsp mailing list cisco-nsp@puck.nether.net > https://puck.nether.net/mailman/listinfo/cisco-nsp > archive at http://puck.nether.net/pipermail/cisco-nsp/ > ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] script
Hi, > On Sep 21, 2016, at 7:11 AM, Lijalem Fetenewrote: > > Dears, > I want to login to hundreds of routers simultaneously in either telnet > /ssh and execute some command to each device and return the output. Is > there anyone to help me please ? > > Rancid/clogin or trigger come to mind. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
[c-nsp] script
Dears, I want to login to hundreds of routers simultaneously in either telnet /ssh and execute some command to each device and return the output. Is there anyone to help me please ? *Kind Regards* *Lijalem Fetene* ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
[c-nsp] Script to track memory leaks?
Hello routing-people out there, I am currently trying to track down a memory leak on a Cisco router and I'm wondering whether there is a script out there to collect sh proc mem periodically so that I get the chance to find out which process is leaking. Most likely BGP but who knows. Of course a script to collect sh proc mem is easy but I thought about one that e.g. generates RRDs from the processlist or something similar. Don't want to invite the wheel once again. Thanks Sascha ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
Do you have this feature available in your router ? http://www.cisco.com/en/US/docs/ios/fundamentals/configuration/guide/cf_mem-leak-detect.html#wp1027129 If not, you could run a script from a linux box with a remote ssh command and cut the output to your needs, and then feed it into a rrd file or whatever. But given the fact the command sh proc mem gives you a lot of colums/lines and they change all the time, you need to narrow down and pin a specific value you want to graph. If you have ssh available in your router, it's quite simple to get output using remote commands via ssh. Of course it needs a little tweaking first, but once done, it's very practical Using Ivan's howto you can achieve the required settings: http://blog.ioshints.info/2009/10/ssh-rsa-authentication-works-in-ios.html Then once it's done, you can run a command from any cli ssh client like this: ssh -i /path/to/id_rsa u...@your_router_address sh proc mem | grep BGP HTH Ziv -Original Message- From: cisco-nsp-boun...@puck.nether.net [mailto:cisco-nsp-boun...@puck.nether.net] On Behalf Of Sascha Pollok Sent: Monday, December 13, 2010 11:02 AM To: cisco-nsp@puck.nether.net Subject: [c-nsp] Script to track memory leaks? Hello routing-people out there, I am currently trying to track down a memory leak on a Cisco router and I'm wondering whether there is a script out there to collect sh proc mem periodically so that I get the chance to find out which process is leaking. Most likely BGP but who knows. Of course a script to collect sh proc mem is easy but I thought about one that e.g. generates RRDs from the processlist or something similar. Don't want to invite the wheel once again. Thanks Sascha ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. The information contained in this e-mail message and its attachments is confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender, and then delete the message from your computer. Thank you! This mail was sent via Mail-SeCure System. This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
Hello Ziv, thanks for your suggestions. Do you have this feature available in your router ? http://www.cisco.com/en/US/docs/ios/fundamentals/configuration/guide/cf_mem-leak-detect.html#wp1027129 At least not on the one leaking memory :) But thanks for the URL. If not, you could run a script from a linux box with a remote ssh command and cut the output to your needs, and then feed it into a rrd file or whatever. But given the fact the command sh proc mem gives you a lot of colums/lines and they change all the time, you need to narrow down and pin a specific value you want to graph. If you have ssh available in your router, it's quite simple to get output using remote commands via ssh. Of course it needs a little tweaking first, but once done, it's very practical Using Ivan's howto you can achieve the required settings: http://blog.ioshints.info/2009/10/ssh-rsa-authentication-works-in-ios.html Then once it's done, you can run a command from any cli ssh client like this: ssh -i /path/to/id_rsa u...@your_router_address sh proc mem | grep BGP We pull lots of different data through router's VTY every few minutes and use expect scripts for this. My question was whether there is an existing script to parse the output and fill RRDs or similar. I could still do it myself of course - which is what I'll be doing after lunch ;) Thanks Sascha HTH Ziv -Original Message- From: cisco-nsp-boun...@puck.nether.net [mailto:cisco-nsp-boun...@puck.nether.net] On Behalf Of Sascha Pollok Sent: Monday, December 13, 2010 11:02 AM To: cisco-nsp@puck.nether.net Subject: [c-nsp] Script to track memory leaks? Hello routing-people out there, I am currently trying to track down a memory leak on a Cisco router and I'm wondering whether there is a script out there to collect sh proc mem periodically so that I get the chance to find out which process is leaking. Most likely BGP but who knows. Of course a script to collect sh proc mem is easy but I thought about one that e.g. generates RRDs from the processlist or something similar. Don't want to invite the wheel once again. Thanks Sascha ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
[c-nsp] Script to track memory leaks
Perhaps you could use the ciscocmd package. I set up a 5 minute cron job to do the exact same thing. One nice thing is you can pipe the output from the router command into another command. Something like the below ./ciscocmd -u user - p password -h router_ip -c show mem | head or ./ciscocmd -u user - p password -h router_ip -c show mem | head outputfile and you can look through outputfile for variances. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
Hi, On Mon, Dec 13, 2010 at 01:25:29PM +0200, Ziv Leyes wrote: http://blog.ioshints.info/2009/10/ssh-rsa-authentication-works-in-ios.html Great to see this implemented. Does one of you know whether this is on the roadmap for SX* and SR* IOS? gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgp3yXXN7C0Kt.pgp Description: PGP signature ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
On 13/12/10 16:23, Gert Doering wrote: Hi, On Mon, Dec 13, 2010 at 01:25:29PM +0200, Ziv Leyes wrote: http://blog.ioshints.info/2009/10/ssh-rsa-authentication-works-in-ios.html Great to see this implemented. Does one of you know whether this is on the roadmap for SX* and SR* IOS? Pfft. Given I was told BGP selective address tracking is roadmapped in SX* for 2012 (!) the other day, despite having been in SR* since 2007, I conclude that *nothing* is on the roadmap for SX* until post-sup2T. I did ask about this feature a while back. Got no reply. It also reloaded the router one of my colleagues tried it on :o( ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
here's what you likely want to collect: sh ver sh proc mem sort sh mem dead totals sh mem dead show mem allocating-process totals with this sprinkled in periodically: Show mem debug leak sum Show mem debug leak chunk - Jared On Dec 13, 2010, at 4:02 AM, Sascha Pollok wrote: Hello routing-people out there, I am currently trying to track down a memory leak on a Cisco router and I'm wondering whether there is a script out there to collect sh proc mem periodically so that I get the chance to find out which process is leaking. Most likely BGP but who knows. Of course a script to collect sh proc mem is easy but I thought about one that e.g. generates RRDs from the processlist or something similar. Don't want to invite the wheel once again. Thanks Sascha ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/ ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
On 13/12/2010 16:23, Gert Doering wrote: On Mon, Dec 13, 2010 at 01:25:29PM +0200, Ziv Leyes wrote: http://blog.ioshints.info/2009/10/ssh-rsa-authentication-works-in-ios.html Great to see this implemented. oh, interesting. But is there any support for putting these keys into a tacacs+ server? Nick ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
Hi, On Mon, Dec 13, 2010 at 04:31:45PM +, Phil Mayers wrote: Does one of you know whether this is on the roadmap for SX* and SR* IOS? Pfft. Given I was told BGP selective address tracking is roadmapped in SX* for 2012 (!) the other day, despite having been in SR* since 2007, I conclude that *nothing* is on the roadmap for SX* until post-sup2T. Since rumors say that Sup2T will run IOS XE, the future looks quite exciting... It also reloaded the router one of my colleagues tried it on :o( Heh. That must be a bug in your SSH client, of course. gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgpvjHTGNyfbB.pgp Description: PGP signature ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
This can be automated with an Embedded Event Manager (EEM) Applet: In config mode, do: event manager applet MyPolicy event timer cron cron-entry @daily action 1.0 cli command enable action 2.0 cli command sh ver | redirect shVerFile action 3.0 cli command sh proc mem sort | shProcFile ... If you like, you can replace the @daily with @hourly, @weekly ...etc. or a complex cron entry. Something like 0-59/1 0-23/1 * * 0-7 A more sophisticated implementation can be done with Tcl scripts to run the cli commands, extract the data, then deliver it in any format you want. You can get help building these EEM applets with the Progrizon Policy Builder web-based tool at: http://www.progrizon.com/support/pb/pb.php You need to sign up which asks you to provides your email. mbaro...@progrizon.com Message: 4 Date: Mon, 13 Dec 2010 11:44:59 -0500 From: Jared Mauch ja...@puck.nether.net To: Sascha Pollok nsp-l...@pollok.net Cc: cisco-nsp@puck.nether.net Subject: Re: [c-nsp] Script to track memory leaks? Message-ID: dcd94875-5548-458f-97e3-397e2a745...@puck.nether.net Content-Type: text/plain; charset=us-ascii here's what you likely want to collect: sh ver sh proc mem sort sh mem dead totals sh mem dead show mem allocating-process totals with this sprinkled in periodically: Show mem debug leak sum Show mem debug leak chunk - Jared ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
On 13/12/2010 16:46, Gert Doering wrote: Since rumors say that Sup2T will run IOS XE, the future looks quite exciting... Is it true that the Sup2T will be shipping at around the same time as Duke Nukem Forever. Nick ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
No, its due with the first DNF expansion pack ;) - Reply message - From: Nick Hilliard n...@foobar.org Date: Mon, Dec 13, 2010 17:40 Subject: [c-nsp] Script to track memory leaks? To: Gert Doering g...@greenie.muc.de Cc: cisco-nsp@puck.nether.net cisco-nsp@puck.nether.net On 13/12/2010 16:46, Gert Doering wrote: Since rumors say that Sup2T will run IOS XE, the future looks quite exciting... Is it true that the Sup2T will be shipping at around the same time as Duke Nukem Forever. Nick ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/ ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
Hi, On Mon, Dec 13, 2010 at 05:36:38PM +, Nick Hilliard wrote: Is it true that the Sup2T will be shipping at around the same time as Duke Nukem Forever. That would be quite exciting - Amazon lists DNF as will be released on february 1st, 2011... gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgpzwHfww3KNY.pgp Description: PGP signature ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
On 13 Dec 2010, at 16:31, Phil Mayers p.may...@imperial.ac.uk wrote: On 13/12/10 16:23, Gert Doering wrote: Hi, On Mon, Dec 13, 2010 at 01:25:29PM +0200, Ziv Leyes wrote: http://blog.ioshints.info/2009/10/ssh-rsa-authentication-works-in-ios.html Great to see this implemented. Does one of you know whether this is on the roadmap for SX* and SR* IOS? Pfft. Given I was told BGP selective address tracking is roadmapped in SX* for 2012 (!) the other day, despite having been in SR* since 2007, I conclude that *nothing* is on the roadmap for SX* until post-sup2T. Well I've heard rumblings about ES support in SXJ, in Q1/Q2 2011. --Daniel Holme ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to track memory leaks?
Don't get all excited, it's 10G only. :/ On Mon, Dec 13, 2010 at 10:14 PM, Daniel Holme dan.ho...@gmail.com wrote: On 13 Dec 2010, at 16:31, Phil Mayers p.may...@imperial.ac.uk wrote: On 13/12/10 16:23, Gert Doering wrote: Hi, On Mon, Dec 13, 2010 at 01:25:29PM +0200, Ziv Leyes wrote: http://blog.ioshints.info/2009/10/ssh-rsa-authentication-works-in-ios.html Great to see this implemented. Does one of you know whether this is on the roadmap for SX* and SR* IOS? Pfft. Given I was told BGP selective address tracking is roadmapped in SX* for 2012 (!) the other day, despite having been in SR* since 2007, I conclude that *nothing* is on the roadmap for SX* until post-sup2T. Well I've heard rumblings about ES support in SXJ, in Q1/Q2 2011. --Daniel Holme ___ cisco-nsp mailing list cisco-...@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/ ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
[c-nsp] Script to backup a pix 6.3
Hi all, Is there anyone there who can send me a script (linux shell script, perl, python, expect...) to do a cisco pix 6.3 backup? If not I will create a new one, but I would be much better if I don't need to re-create the wheel again if someone can share a script. Regards. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to backup a pix 6.3
Hi Luismi, (stands for Luis Miguel?) There are a few useful links I've found for you: http://www.mangeek.com/portfolio/pixbackup.html http://3d2f.com/programs/1-918-kiwi-cattools-download.shtml http://www.networksecurityarchive.org/html/Firewalls/2004-09/msg00227.html Once I wrote a .vbs script for SecureCRT that takes care of it, but it needs manual running from within the session, let me know if you are interested. Ziv -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of luismi Sent: Thursday, July 10, 2008 12:39 PM To: cisco-nsp@puck.nether.net Subject: [c-nsp] Script to backup a pix 6.3 Hi all, Is there anyone there who can send me a script (linux shell script, perl, python, expect...) to do a cisco pix 6.3 backup? If not I will create a new one, but I would be much better if I don't need to re-create the wheel again if someone can share a script. Regards. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to backup a pix 6.3
On 10/07/2008, at 7:38 PM, luismi wrote: Is there anyone there who can send me a script (linux shell script, perl, python, expect...) to do a cisco pix 6.3 backup? RANCID supports the PIX. See http://shrubbery.net/rancid/ Nick ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: [c-nsp] Script to backup a pix 6.3
Thanks Ziv! El jue, 10-07-2008 a las 14:26 +0300, Ziv Leyes escribió: Hi Luismi, (stands for Luis Miguel?) There are a few useful links I've found for you: http://www.mangeek.com/portfolio/pixbackup.html http://3d2f.com/programs/1-918-kiwi-cattools-download.shtml http://www.networksecurityarchive.org/html/Firewalls/2004-09/msg00227.html Once I wrote a .vbs script for SecureCRT that takes care of it, but it needs manual running from within the session, let me know if you are interested. Ziv -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of luismi Sent: Thursday, July 10, 2008 12:39 PM To: cisco-nsp@puck.nether.net Subject: [c-nsp] Script to backup a pix 6.3 Hi all, Is there anyone there who can send me a script (linux shell script, perl, python, expect...) to do a cisco pix 6.3 backup? If not I will create a new one, but I would be much better if I don't need to re-create the wheel again if someone can share a script. Regards. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals computer viruses. ___ cisco-nsp mailing list cisco-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp archive at http://puck.nether.net/pipermail/cisco-nsp/