cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1788
Views
5
Helpful
12
Replies

EEM ON ISR router

ahmedbekhit
Level 1
Level 1

I want to configure the ISR router to Send the top 10 CPU and Memory Utilization every two hours to my email addess, I went through too many documents and I found a lot of solutions which are confusing me some of them using cron job, some of them Using OID and others using TCL Scripts.

Please assist me in the easiest way.

Thanks

12 Replies 12

Joe Clarke
Cisco Employee
Cisco Employee

What version of IOS is running on this router?

version 12.4

I figured that, but EXACTLY what version of 12.4?  Newer versions of 12.4T will mean a different EEM solution can be used.

Yes it is 2811 running

12.4T.

Thanks

EXACTLY what version?  Please post the "show version" output from this router.

HI again Joe,

Here you are the output of show version:

Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9_IVS-M), Version 12.4(11)T2, RELEASE SOFTWARE (fc4)

Thanks!

This EEM Tcl policy should do what you want.  Before installing it, you will need to set some environment variables, though:

# mem_cpu_time      : Number of seconds between executions of this policy.

#

# mem_cpu_num_lines : Number of lines to include in the output.

#

# _email_server     : SMTP server used to send email.

#

# _email_from       : Email address from which email will be sent.

#

# _email_to         : Email address(es) to which email will be sent.

#

# _email_cc         : (optional) Email address(es) to which email will be

#                     carbon copied.

For example, in "config t" mode:

event manager environment mem_cpu_time 7200

event manager environment mem_cpu_num_lines 10

event manager environment _email_server 10.1.1.1

event manager environment _email_from router@company.com

event manager environment _email_to user@company.com

event manager environment _email_cc otheruser@company.com

That configuration will run the policy every two hours, and send the top 10 lines of "show proc mem sorted" and "show proc cpu sorted" via email to user@company.com and otheruser@company.com.

Thanks Joe for the script, I will try it and get back to you; However; is there any direct commands that we can made without installing the TCL scripting?

No, not with your version of code.  You could do what you want without Tcl in 12.4(22)T or higher.

Thanks Alot Joe for the value info.

Can you tell me what is the compatible versions of 12.4 and what are the direct commands?

Thanks!

This policy will work on any device running 12.3(14)T or higher.  You must first copy the policy to the device (e.g. to flash:/policies on your ISR router).  Then, configure the router with the appropriate EEM user policy directory:

event manager directory user policy flash:/policies

Then, register the policy with the EEM server (again, from "config t" mode):

event manager policy tm_check_mem_cpu.tcl

Once those two commands are configured (and, of course, the policy has been copied to the device and you have set the environment variables I mentioned previously), the policy will be running,

Nice one Joe (+5)!

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:

Review Cisco Networking products for a $25 gift card