06-04-2012 10:10 AM
Hello,
I have a question regarding N5K/N7K devices CPU monitoring:
Let's say I see CPU spikes in "show proc cpu hist" command.
Is there any way I can verify what process caused the CPU spikes?
I know that I can see that using "show proc cpu" or "show process cpu sort", but that is not for the moment when I execute the command.
I'd like to know if I can verify the CPU utilization each process used in the past (let's say, 2 hours ago or 6 hours ago).
Thanking in advance, Udi Dahan.
06-05-2012 05:43 AM
Regarding answer to your question
"Is there any way I can verify what process caused the CPU spikes?"
You can achive this using EEM. You need to write and applet that poll correct OID from Cisco-PROCESS-MIB, if utilization is higher than certain value eg, 70% than action cli would be to collect
"show process cpu" and save it in bootflash i.e. show processes cpu sort >> bootflash:high_cpu.txt
event manager applet High_CPU
event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.6 get-type next entry-op ge entry-val 70 poll-interval 2
action 1.0 cli "show clock >> bootflash:high_cpu.txt"
action 2.0 cli "show processes cpu sort >> bootflash:high_cpu.txt"
06-05-2012 05:53 AM
Hi,
Thanks a lot for the response!
But besides EEM, is there any "simple" way (e.g show command) that I can use to achieve what I'm looking for?
Thanks.
06-17-2012 12:38 AM
Hi Ehud
Observed spikes can be displayed by two signs on sh proc cpu history": asterisk "*" of number sign (#)
Asterisk peaks means peak load which can last evel less than a second - but if it happens it will be shown int 60 sec diagram, and other diagrams, such peaks hard to troubleshoot as they're very short and even EEM not always can catch them. Also most of such spikes are caused by nx-os components running on the box: snmp, tacacs etc are snmp intensive processes and can cause such spikes.
Spikes displayed with number sign (#) reflect average load - and are more relevant to load on the box, they can be captured by EEM.
As Kruh said EEM is most convenient way to capture such spikes, but please remember that only n7k platform support EEM at the moment.
HTH,
Alex
06-14-2012 08:35 PM
Sh proc CPU sorted command will show you.
Sent from Cisco Technical Support iPhone App
06-18-2012 12:51 AM
Hi guys,
Thank you alll for the replies and for the kind assistance!
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