cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2109
Views
0
Helpful
2
Replies

High CPU Trigger for EEM Script

Jeffrey Simon
Level 1
Level 1

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

Joe Clarke
Cisco Employee
Cisco Employee

Add:

resource policy

user global HIGHCPU

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

Add:

resource policy

user global HIGHCPU

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

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: