[c-nsp] Script to track memory leaks?

Ziv Leyes zivl at gilat.net
Mon Dec 13 06:25:29 EST 2010


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 user at your_router_address sh proc mem | grep BGP 

HTH
Ziv



-----Original Message-----
From: cisco-nsp-bounces at puck.nether.net [mailto:cisco-nsp-bounces at puck.nether.net] On Behalf Of Sascha Pollok
Sent: Monday, December 13, 2010 11:02 AM
To: cisco-nsp at 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 at 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.
************************************************************************************






More information about the cisco-nsp mailing list