Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

N5K/N7K - Question about CPU monitoring

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
Bronze

N5K/N7K - Question about CPU monitoring

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"

New Member

N5K/N7K - Question about CPU monitoring

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.

Cisco Employee

Re: N5K/N7K - Question about CPU monitoring

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

New Member

Re: N5K/N7K - Question about CPU monitoring

Sh proc CPU sorted command will show you.

Sent from Cisco Technical Support iPhone App

New Member

Re: N5K/N7K - Question about CPU monitoring

Hi guys,

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

1104
Views
5
Helpful
5
Replies