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

Not able to register a Simple script to capture high cpu usage

When attempting to register the TCL script on my ASR 9K I get an error:

event manager policy cpu_80.tcl username admin persist-time 3600 type user
!!% Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy cpu_80.tcl

::cisco::eem::event_register_wdsysmon sub1 cpu_tot op ge val 80

namespace import ::cisco::eem::*
namespace import ::cisco::lib::*

if [catch {cli_open} result] {
    error $result $errorInfo
} else {
    array set cli1 $result
}

cli_exec $cli1(fd) "term len 0"

cli_exec $cli1(fd) "show processes cpu location 0/RSP0/CPU0 | file append disk0a:/usr/cpucap.txt"

cli_exec $cli1(fd) "show processor cpu location 0/RSP1/CPU0 | file append disk0a:/usr/cpucap.txt"

cli_exec $cli1(fd) "show processor cpu location 0/0/CPU0 | file append disk0a:/usr/cpucap.txt"

cli_exec $cli1(fd) "show processor cpu location 0/1/CPU0 | file append disk0a:/usr/cpucap.txt"


catch {cli_close $cli(fd) $cli(tty_id)}

I'm able to register and run it as a manual script fine "::cisco::eem::event_register_none"

Thanks for your help.

3 REPLIES
Cisco Employee

You're missing the "period"

You're missing the "period" keyword in your event spec line.  You need to specify a polling period for wdsysmon (e.g., period 60).

New Member

Thanks Joe.  I added the

Thanks Joe.  I added the period 60, but it's still failing on registration.

::cisco::eem::event_register_wdsysmon sub1 cpu_tot op ge val 80 period 60

Cisco Employee

Depending on your version of

Depending on your version of code, you may need:

::cisco::eem::event_register_wdsysmon timewin 60 sub1 cpu_tot op ge val 80

19
Views
0
Helpful
3
Replies