cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7087
Views
0
Helpful
38
Replies

Monitoring dual core (Supervisor Engine 7-E) through EEM Script.

Sergio Gaytan
Level 1
Level 1

Hi,

I have a Cisco Catalyst 4500E Supervisor Engine 7-E and configured an EEM Script to monitor the dual core CPU Utilization through PRTG Network Monitor.

event manager applet dualcore authorization bypass

event timer cron cron-entry "* * * * 0-6"

!

action 100 cli command "en"

action 120 cli command "show process cpu | include five"

!

action 220 regexp "Core 0: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c0cpu5sec c0cpu1min c0cpu5min

action 240 if $_regexp_result eq 1

action 260 end

!

action 320 regexp "Core 1: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c1cpu5sec c1cpu1min c1cpu5min

action 340 if $_regexp_result eq 1

action 360 end

!

action 440 cli command "config t"

action 441 cli command "snmp mib expression owner cisco name c0cpu5sec"

action 442 cli command "expression $c0cpu5sec"

action 443 cli command "snmp mib expression owner cisco name c0cpu1min"

action 444 cli command "expression $c0cpu1min"

action 445 cli command "snmp mib expression owner cisco name c0cpu5min"

action 446 cli command "expression $c0cpu5min"

!

action 550 cli command "config t"

action 551 cli command "snmp mib expression owner cisco name c1cpu5sec"

action 552 cli command "expression $c1cpu5sec"

action 553 cli command "snmp mib expression owner cisco name c1cpu1min"

action 554 cli command "expression $c1cpu1min"

action 555 cli command "snmp mib expression owner cisco name c1cpu5min"

action 556 cli command "expression $c1cpu5min"

!

action 600 cli command "end"

!

end

It works fine but on the logging buffer there are a lot of %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:moncores) messages   -one per minute-   here an example:

Oct 29 17:54:01: %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:dualcore)

Oct 29 17:55:01: %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:dualcore)

Oct 29 17:56:01: %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:dualcore)

Oct 29 17:57:01: %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:dualcore)

I considered to use the logging suppress duplicates command to prevent the consecutive logging of more than one copy of the same system logging (syslog) message but it is only available to the Cisco IOS XR.

Someone could help me to determine if it is possible to avoid this messages through Embedded Syslog Manager, I tried to do that but

I was not successful.

Regards,

~Sergio

2 Accepted Solutions

Accepted Solutions

You found a bug in the converter.  Edit your script and remove the "set-type" token.  That should not have been in the converted Tcl code.

View solution in original post

Your "tester" is a RO string.  Configure:

snmp-server community tester RW

And then things should work.

View solution in original post

38 Replies 38

Joe Clarke
Cisco Employee
Cisco Employee

You could do this with ESM, or you could switch to using SNMP instead of CLI.  That would avoid the messages from being generated at all.  It would be easier and better to do this with SNMP as opposed to introducing more scripting.

Do you have something example to use SNMP instead of CLI....!?

I did not find information to monitor the dualcore throught SNMP.

Could you help me to improve this..!?

Regards,

~Sergio

Hi,

Someone could help me to avoid this messages through Embedded Syslog Manager, I have not found information to monitor BOTH cores to the Supervisor Engine 7-E.

Any ideas...!?!

~Sergio

Does the CISCO-PROCESS-MIB not give you both cores?  The MIB is  designed in such a way to provide details across multiple CPUs.  If not,  I was referring to transitioning your CLI actions to use the  EXPRESSION-MIB SNMP:

action 440 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 6

action 441 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 5

action  442 info type snmp oid  1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99  set-type string "$c0cpu5sec"

action 443 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 4

action 444 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 1

The 5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 is the decimal ASCII equivalent of cisco.c0cpu5sec.  You can use http://www.asciitable.com/ to find the values for the other expression names.  All you'll need to change is the "99.48.99.112.117.53.115.101.99" at the end.

Hi,

I did transitioned CLI actions to the EXPRESSION-MIB SNMP but I could not receive anything information about the dualcore utilization on the PRTG Network Monitor and received a lot of  %HA_EM-7-FMFD_SNMP_ERRCODE: fh_fd_snmp_errcode: Error status: 6 NO_ACCESS_ERROR: 1. messages on the WS-C4507.

Considering the initial EEM script, could ypu help me to avoid the  %SYS-5-CONFIG_I: Configured from console by  on vty0 (EEM:moncores)

messages using Embedded Syslog Manager.

Here some snmpwalk to validate that I could not get the OIDs to monitor both cores.

STEP 1     Only one value is given because there is only one physical cpu.


cpmCPUTotalPhysicalIndex

1.3.6.1.4.1.9.9.109.1.1.1.1.2

C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.4.1.9.9.109.1.1.1.1.2

SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.4000 = INTEGER: 4000

STEP 2

entPhysicalName

1.3.6.1.2.1.47.1.1.1.1.7

C:\usr>

C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.2.1.47.1.1.1.1.7.4000

SNMPv2-SMI::mib-2.47.1.1.1.1.7.4000 = STRING: "Linecard(slot 4)"

#sh mod

Chassis Type : WS-C4507R+E

Power consumed by backplane : 40 Watts

Mod Ports Card Type                              Model              Serial No.

---+-----+--------------------------------------+------------------+-----------

1    18  10GE (X2), 1000BaseX (SFP)             WS-X4606-X2-E      JAE151904JC

2    24  1000BaseX (SFP)                        WS-X4624-SFP-E     JAE152001AE

4     4  Sup 7-E 10GE (SFP+), 1000BaseX (SFP)   WS-X45-SUP7-E      CAT1522L0G1

5    48  10/100/1000BaseT (RJ45)V, Cisco/IEEE   WS-X4548-GB-RJ45V  JAE12067N8K

M MAC addresses                    Hw  Fw           Sw               Status

--+--------------------------------+---+------------+----------------+---------

1 e8b7.4880.e5db to e8b7.4880.e5ec 1.2                               Ok      

2 e8b7.48cc.6167 to e8b7.48cc.617e 1.2                               Ok      

4 4055.39d7.76c4 to 4055.39d7.76c7 1.0 15.0(1r)SG2  03.01.01.SG      Ok      

5 001e.f7da.d290 to 001e.f7da.d2bf 4.1                               Ok      

Mod  Redundancy role     Operating mode      Redundancy status

----+-------------------+-------------------+----------------------------------

4   Active Supervisor   SSO                 Active                           

#

STEP 3

cpmCPUTotal1minRev

1.3.6.1.4.1.9.9.109.1.1.1.1.7

C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.4.1.9.9.109.1.1.1.1.7

SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.7.4000 = Gauge32: 9

C:\usr>

ADDITIONAL INFORMATION

C:\usr>

C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.2.1.90

SNMPv2-SMI::mib-2.90.1.1.1.0 = INTEGER: 1

SNMPv2-SMI::mib-2.90.1.1.2.0 = Gauge32: 0

SNMPv2-SMI::mib-2.90.1.1.3.0 = Gauge32: 0

SNMPv2-SMI::mib-2.90.1.1.4.0 = Gauge32: 0

SNMPv2-SMI::mib-2.90.1.1.5.0 = Counter32: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = STRING: "9"

SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = STRING: "11"

SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = STRING: "8"

SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = STRING: "13"

SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = STRING: "13"

SNMPv2-SMI::mib-2.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = STRING: "11"

SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = INTEGER: 1

SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = INTEGER: 1

SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = INTEGER: 1

SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = INTEGER: 1

SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = INTEGER: 1

SNMPv2-SMI::mib-2.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = INTEGER: 1

SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = ""

SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = ""

SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = ""

SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = ""

SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = ""

SNMPv2-SMI::mib-2.90.1.2.1.1.5.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = ""

SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = INTEGER: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = INTEGER: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = INTEGER: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = INTEGER: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = INTEGER: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.6.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = INTEGER: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = OID: SNMPv2-SMI::zeroDotZero

SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = OID: SNMPv2-SMI::zeroDotZero

SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = OID: SNMPv2-SMI::zeroDotZero

SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = OID: SNMPv2-SMI::zeroDotZero

SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = OID: SNMPv2-SMI::zeroDotZero

SNMPv2-SMI::mib-2.90.1.2.1.1.7.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = OID: SNMPv2-SMI::zeroDotZero

SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = Counter32: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = Counter32: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = Counter32: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = Counter32: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = Counter32: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.8.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = Counter32: 0

SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 = INTEGER: 2

SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 = INTEGER: 2

SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 = INTEGER: 2

SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 = INTEGER: 2

SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 = INTEGER: 2

SNMPv2-SMI::mib-2.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 = INTEGER: 2

C:\usr>

C:\usr>snmpwalk -v 2c -c m4nc4rc0 10.20.91.2 1.3.6.1.2.1.47.1.1.1.1.2

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1 = STRING: "Cisco Systems, Inc. WS-C4507R+E 7 sl

ot switch "

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2 = STRING: "WS-C4507R+E 7 slot switch chassis sl

ot"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.3 = STRING: "WS-C4507R+E 7 slot switch chassis sl

ot"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.4 = STRING: "WS-C4507R+E 7 slot switch chassis sl

ot"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5 = STRING: "WS-C4507R+E 7 slot switch chassis sl

ot"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.6 = STRING: "WS-C4507R+E 7 slot switch chassis sl

ot"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.7 = STRING: "WS-C4507R+E 7 slot switch chassis sl

ot"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.8 = STRING: "WS-C4507R+E 7 slot switch chassis sl

ot"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.9 = STRING: " WS-C4507R+E 7 slot switch backplane

"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.10 = STRING: "Container of Fan Tray"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.11 = STRING: "FanTray"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.12 = STRING: "Container of Container of Power Sup

ply"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.13 = STRING: "Container of Power Supply"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.14 = STRING: "Power Supply ( AC 2800W )"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.15 = STRING: "Power Supply Fan Sensor"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.16 = STRING: "Container of Power Supply"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.19 = STRING: "Clock Module"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.20 = STRING: "Mux Buffers for Redundancy Logic"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.21 = STRING: "Mux Buffers for Redundancy Logic"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.22 = STRING: "Mux Buffers for Redundancy Logic"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.23 = STRING: "Mux Buffers for Redundancy Logic"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.24 = STRING: "Mux Buffers for Redundancy Logic"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1000 = STRING: "10GE (X2), 1000BaseX (SFP) with 6

10GE X2 ports"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1001 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1002 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1003 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1004 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1005 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1006 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2000 = STRING: "1000BaseX (SFP) with 24 SFP Ports

Jumbo Frame Support"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2001 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2002 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2003 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2004 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2005 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2006 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2007 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2008 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2009 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2010 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2011 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2012 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2013 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2014 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2015 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2016 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2017 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2018 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2019 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2020 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2021 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2022 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2023 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2024 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2047 = STRING: "1000BaseSX"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.2048 = STRING: "1000BaseSX"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.4000 = STRING: "Sup 7-E 10GE (SFP+), 1000BaseX (S

FP) with 4 SFP+ Ports"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.4001 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.4002 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.4003 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.4004 = STRING: "Port Container"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5000 = STRING: "10/100/1000BaseT (RJ45)V with 48

10/100/1000 baseT voice power ports (Cisco/IEEE)"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5001 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5002 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5003 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5004 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5005 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5006 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5007 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5008 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5009 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5010 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5011 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5012 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5013 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5014 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5015 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5016 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5017 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5018 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5019 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5020 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5021 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5022 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5023 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5024 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5025 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5026 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5027 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5028 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5029 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5030 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5031 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5032 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5033 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5034 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5035 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5036 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5037 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5038 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5039 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5040 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5041 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5042 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5043 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5044 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5045 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5046 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5047 = STRING: "Gigabit Ethernet Port"

SNMPv2-SMI::mib-2.47.1.1.1.1.2.5048 = STRING: "Gigabit Ethernet Port"

C:\usr>

When do you get this NO_ACCESS error?  On what action (i.e., on what OID)?  It looks like the expressions are being added, but you're not setting the value type correctly.  Post your latest policy.

event manager applet monitorsup7dualcore authorization bypass

event timer cron cron-entry "* * * * 0-6"

!

action 100 cli command "en"

action 120 cli command "show process cpu | include five"

!

action 220 regexp "Core 0: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c0cpu5sec c0cpu1min c0cpu5min

action 240 if $_regexp_result eq 1

action 260 end

!

action 320 regexp "Core 1: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c1cpu5sec c1cpu1min c1cpu5min

action 340 if $_regexp_result eq 1

action 360 end

!

action 440 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 6 community testmonitor

action 441 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 5 community testmonitor

action 442 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type string "$c0cpu5sec" community testmonitor

action 443 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 4 community testmonitor

action 444 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 1 community testmonitor

!

action 450 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 6 community testmonitor

action 451 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 5 community testmonitor

action 452 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type string "$c0cpu1min" community testmonitor

action 453 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 4 community testmonitor

action 454 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 1 community testmonitor

!

action 460 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 6 community testmonitor

action 461 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 5 community testmonitor

action 462 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type string "$c1cpu5min" community testmonitor

action 463 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 4 community testmonitor

action 464 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 1 community testmonitor

!

action 540 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 6 community testmonitor

action 541 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 5 community testmonitor

action 542 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type string "$c1cpu5sec" community testmonitor

action 543 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 4 community testmonitor

action 544 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 1 community testmonitor

!

action 550 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 6 community testmonitor

action 551 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 5 community testmonitor

action 552 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type string "$c1cpu1min" community testmonitor

action 553 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 4 community testmonitor

action 554 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 1 community testmonitor

!

action 560 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 6 community testmonitor

action 561 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 5 community testmonitor

action 562 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type string "$c1cpu5min" community testmonitor

action 563 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 4 community testmonitor

action 564 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 1 community testmonitor

!

action 600 cli command "end"

!

end

Everything from action 450 on is wrong.  You keep repeating the OID for expExpressionEntryStatus.  Make sure you're using the right OIDs for each value as you did in actions 440 through 444.  The only thing that needs to change in each of your blocks in the decimal encoded ASCII for the variable (e.g., c1cpu5min).

I fixed the error on the script but I have received the      %HA_EM-7-FMFD_SNMP_ERRCODE: fh_fd_snmp_errcode: Error status: 6 NO_ACCESS_ERROR: 1.     message again.

Here the latest policy:

event manager applet monitorsup7dualcore authorization bypass

event timer cron cron-entry "* * * * 0-6"

!

action 100 cli command "en"

action 120 cli command "show process cpu | include five"

!

action 220 regexp "Core 0: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c0cpu5sec c0cpu1min c0cpu5min

action 240 if $_regexp_result eq 1

action 260 end

!

action 320 regexp "Core 1: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c1cpu5sec c1cpu1min c1cpu5min

action 340 if $_regexp_result eq 1

action 360 end

!

action 440 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 6 community tester

action 441 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 5 community tester

action 442 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type string "$c0cpu5sec" community tester

action 443 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 4 community tester

action 444 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 1 community tester

!

action 450 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 6 community tester

action 451 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 5 community tester

action 452 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type string "$c0cpu1min" community tester

action 453 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 4 community tester

action 454 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 1 community tester

!

action 460 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 6 community tester

action 461 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 5 community tester

action 462 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type string "$c1cpu5min" community tester

action 463 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 4 community tester

action 464 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 1 community tester

!

action 540 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 6 community tester

action 541 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 5 community tester

action 542 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type string "$c1cpu5sec" community tester

action 543 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 4 community tester

action 544 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 1 community tester

!

action 550 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 6 community tester

action 551 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 5 community tester

action 552 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type string "$c1cpu1min" community tester

action 553 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 4 community tester

action 554 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 1 community tester

!

action 560 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 6 community tester

action 561 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 5 community tester

action 562 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type string "$c1cpu5min" community tester

action 563 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 4 community tester

action 564 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 1 community tester

!

action 600 cli command "end"

!

end

It looks like the problem is that applets are not expanding the variable (e.g., $c0cpu5sec).  However, if you convert to Tcl, this will work.  Go to http://www.marcuscom.com/convert_applet/ to conver the applet to Tcl.

I used the tclsh command when I run tcl commands from CLI but  the ::cisco::eem::event_register_timer cron cron_entry "* * * * 0-6"  command was recognized as invalid tcl command.

::cisco::eem::event_register_timer cron cron_entry "* * * * 0-6"

#

# This EEM tcl policy was generated by the EEM applet conversion # utility at http://www.marcuscom.com/convert_applet/

# using the following applet:

#

# event manager applet monitorsup7dualcore authorization bypass # event timer cron cron-entry "* * * * 0-6"

# !

# action 100 cli command "en"

# action 120 cli command "show process cpu | include five"

# !

# action 220 regexp "Core 0: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c0cpu5sec c0cpu1min c0cpu5min # action 240 if $_regexp_result eq 1 # action 260 end # !

# action 320 regexp "Core 1: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*" $_cli_result result c1cpu5sec c1cpu1min c1cpu5min # action 340 if $_regexp_result eq 1 # action 360 end # !

# action 440 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 6 community tester # action 441 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 5 community tester # action 442 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type string "$c0cpu5sec" community tester # action 443 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 4 community tester # action 444 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 1 community tester # !

# action 450 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 6 community tester # action 451 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 5 community tester # action 452 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type string "$c0cpu1min" community tester # action 453 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 4 community tester # action 454 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 1 community tester # !

# action 460 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 6 community tester # action 461 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 5 community tester # action 462 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type string "$c1cpu5min" community tester # action 463 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 4 community tester # action 464 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 1 community tester # !

# action 540 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 6 community tester # action 541 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 5 community tester # action 542 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type string "$c1cpu5sec" community tester # action 543 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 4 community tester # action 544 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 1 community tester # !

# action 550 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 6 community tester # action 551 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 5 community tester # action 552 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type string "$c1cpu1min" community tester # action 553 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 4 community tester # action 554 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 1 community tester # !

# action 560 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 6 community tester # action 561 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 5 community tester # action 562 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type string "$c1cpu5min" community tester # action 563 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 4 community tester # action 564 info type snmp oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 1 community tester # !

# action 600 cli command "end"

# !

# end

#

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

array set arr_einfo [event_reqinfo]

if [catch {cli_open} result] {

    error $result $errorInfo

} else {

    array set cli1 $result

}

if [catch {cli_exec $cli1(fd) "en"} _cli_result] {

    error $_cli_result $errorInfo

}

if [catch {cli_exec $cli1(fd) "show process cpu | include five"} _cli_result] {

    error $_cli_result $errorInfo

}

set _regexp_result [regexp {Core 0: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*} $_cli_result result c0cpu5sec c0cpu1min c0cpu5min] if {$_regexp_result == 1} { } set _regexp_result [regexp {Core 1: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*} $_cli_result result c1cpu5sec c1cpu1min c1cpu5min] if {$_regexp_result == 1} { } sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 6 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 5 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type string "$c0cpu5sec" community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 4 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99 set-type int 1 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 6 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 5 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type string "$c0cpu1min" community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 4 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.110 set-type int 1 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 6 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 5 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type string "$c1cpu5min" community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 4 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.110 set-type int 1 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 6 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 5 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type string "$c1cpu5sec" community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 4 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.115.101.99 set-type int 1 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 6 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 5 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type string "$c1cpu1min" community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 4 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.49.109.105.110 set-type int 1 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 6 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 5 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.3.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type string "$c1cpu5min" community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.4.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 4 community tester sys_reqinfo_snmp_set oid 1.3.6.1.2.1.90.1.2.1.1.9.5.99.105.115.99.111.9.99.49.99.112.117.53.109.105.110 set-type int 1 community tester if [catch {cli_exec $cli1(fd) "end"} _cli_result] {

    error $_cli_result $errorInfo

}

# Close open cli before exit.

catch {cli_close $cli1(fd) $cli1(tty_id)} result

Is there some method to run the EEM tcl policy...?!?!?! 

#tclsh

(tcl)#

(tcl)#::cisco::eem::event_register_timer cron cron_entry "* * * * 0-6"

invalid command name "::cisco::eem::event_register_timer"         ^

% Invalid input detected at '^' marker.

(tcl)#

(tcl)##

(tcl)##

(tcl)#$e authorization bypass # event timer cron cron-entry "* * * * 0-6"

(tcl)## !

(tcl)## action 100 cli command "en"

(tcl)## action 120 cli command "show process cpu | include five"

(tcl)## !

(tcl)#$c0cpu5min # action 240 if $_regexp_result eq 1 # action 260 end # !

(tcl)#$c1cpu5min # action 340 if $_regexp_result eq 1 # action 360 end # !

(tcl)#$1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.115.101.99    

(tcl)#$.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.49.109.105.1    

(tcl)#$.1.2.1.1.9.5.99.105.115.99.111.9.99.48.99.112.117.53.109.105.1    

(tcl)## action 600 cli command "end"

(tcl)## !

(tcl)## end

(tcl)##

(tcl)#

(tcl)#$05.110 set-type int 5 community tester sys_reqinfo_snmp_set     

+>

+>namespace import ::cisco::eem::*

+>namespace import ::cisco::lib::*

+>

+>array set arr_einfo [event_reqinfo]

+>

+>

+>if [catch {cli_open} result] {

+>    error $result $errorInfo

+>} else {

+>    array set cli1 $result

+>}

+>

+>if [catch {cli_exec $cli1(fd) "en"} _cli_result] {

+>    error $_cli_result $errorInfo

+>}

+>

+>$cli_exec $cli1(fd) "show process cpu | include five"} _cli_result] {     

+>    error $_cli_result $errorInfo

+>}

+>

+>$ {$_regexp_result == 1} { } set _regexp_result [regexp {Core 1: CPU util 

+>    error $_cli_result $errorInfo

+>}

+>

+>

+># Close open cli before exit.

+>catch {cli_close $cli1(fd) $cli1(tty_id)} result

+>

+>tclquit

+>

This is not a tclsh script.  It is an EEM Tcl policy.  Copy this script to your device and place it under, say bootflash:/policies and call it tm_monitor_cpu.tcl.  Then, configure:

event manager directory user policy bootflash:/policies

event manager policy tm_monitor_cpu.tcl

I tried it but I received this error:

(config)#event manager policy tm_monitor_cpu.tcl

EEM Register event failed:wrong # args: should be "set varName ?newValue?"

    while compiling

"set _regexp_result [regexp {Core 0: CPU utilization for five seconds: ([^%]+)%; one minute: ([^%]+)%; five minutes: ([^%]+)%.*} $_cli_result result c0..."

EEM configuration: failed to retrieve intermediate registration result for policy tm_monitor_cpu.tcl

(config)#

Could you help me to resolve it...?!

Regards,

It looks like you have a typo in the script.  If you used the generated version as-is, that shouldn't happen.  Post the script file you are using.

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: