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

EEM ON ISR router

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
Cisco Employee

Re: EEM ON ISR router

What version of IOS is running on this router?

New Member

Re: EEM ON ISR router

version 12.4

Cisco Employee

Re: EEM ON ISR router

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

New Member

Re: EEM ON ISR router

Yes it is 2811 running

12.4T.

Thanks

Cisco Employee

Re: EEM ON ISR router

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

New Member

Re: EEM ON ISR 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!

Cisco Employee

Re: EEM ON ISR router

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.

New Member

Re: EEM ON ISR router

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?

Cisco Employee

Re: EEM ON ISR router

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

New Member

Re: EEM ON ISR router

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!

Cisco Employee

Re: EEM ON ISR router

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,

Hall of Fame Super Gold

Re: EEM ON ISR router

Nice one Joe (+5)!

1155
Views
5
Helpful
12
Replies