cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1868
Views
5
Helpful
5
Replies

N5K/N7K - Question about CPU monitoring

udid
Level 1
Level 1

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.

5 Replies 5

krun_shah
Level 1
Level 1

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"

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.

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

wes_ward
Level 1
Level 1

Sh proc CPU sorted command will show you.

Sent from Cisco Technical Support iPhone App

Hi guys,

Thank you alll for the replies and for the kind assistance!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: