cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
650
Views
0
Helpful
2
Replies
Highlighted
Beginner

High CPU Trigger for EEM Script

Hello, I am trying to have a simple EEM script triggered when a CPU spike is detected on the device...  I have tried several combinations but here is where I stand.

router#show run | sec resource

resource policy

  policy HIGHCPU global

   system

    cpu interrupt

     critical rising 10

    cpu process

     critical rising 10

    !

   !

  !

event resource policy "HIGHCPU"

router#show run | sec event

event manager session cli username "jsimon"

event manager applet HIGHCPU-ERM authorization bypass

event resource policy "HIGHCPU"

action 1.0 cli command "enable"

action 2.0 cli command "show proc cpu sorted 1min | ex 0.00"

action 3.0 syslog priority errors msg "$_cli_result"

I originally had critical rising 10 interum 10, but I can't get the script to trigger.  I passed enough traffic to have the CPU spike from 4% to 45% and the script did not trigger.  Anyone have any ideas what the problem could be?

Thanks,

Jeff

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Cisco Employee

High CPU Trigger for EEM Script

Add:

resource policy

user global HIGHCPU

2 REPLIES 2
Hall of Fame Cisco Employee

High CPU Trigger for EEM Script

Add:

resource policy

user global HIGHCPU

Beginner

High CPU Trigger for EEM Script

By far the fastest fix I have ever had.  Thank you ver much!

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards