cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2825
Views
0
Helpful
3
Replies

EEM Script to reset Dspfarms nightly

lstonesi
Cisco Employee
Cisco Employee

Hello,

I have been unsuccessful on my own in creating a EEM TCL script to catch, log and reset dspfarms that are down on a nightly basis.

This can be a EEM tcl script or applet that do the following:

1. Run the following command: "show sccp all | Begin MTP"

2. From the outout catch the Profile Identifier of the DSPFarm(s) that have KEEPALIVE_FAILED.

3. Log or append to flash file: If a failed DSPFarm was found log the date and Profile Identifier to the flash file.

4. Email the system admin that Profile Identifiers X, Y and Z were reset.

5. Reset the DSPFarms with KEEPALIVE_FAILED.

Here is an example of the "Show sccp all | Begin MTP" - The actually output is very large.

#    MTP Oper State: ACTIVE - Cause Code: KEEPALIVE_FAILED

#    Active Call Manager: NONE

#    TCP Link Status: CONNECTED, Profile Identifier: 21

#    Reported Max Streams: 1000, Reported Max OOS Streams: 0

#    Supported Codec: g729r8, Maximum Packetization Period: 60

#    Supported Codec: rfc2833 dtmf, Maximum Packetization Period: 30

#    Supported Codec: rfc2833 pass-thru, Maximum Packetization Period: 30

#    Supported Codec: inband-dtmf to rfc2833 conversion, Maximum Packetization Period: 30

#    TLS : ENABLED

#

#    MTP Oper State: ACTIVE - Cause Code: NONE

#    Active Call Manager: 10.97.212.48, Port Number: 2000

#    TCP Link Status: CONNECTED, Profile Identifier: 22

#    Reported Max Streams: 150, Reported Max OOS Streams: 0

#    Supported Codec: g711ulaw, Maximum Packetization Period: 30

#    Supported Codec: rfc2833 dtmf, Maximum Packetization Period: 30

#    Supported Codec: rfc2833 pass-thru, Maximum Packetization Period: 30

#    Supported Codec: inband-dtmf to rfc2833 conversion, Maximum Packetization Period: 30

#    TLS : ENABLED

#

#    MTP Oper State: ACTIVE - Cause Code: NONE

#    Active Call Manager: 10.97.83.32, Port Number: 2000

#    TCP Link Status: CONNECTED, Profile Identifier: 30

#    Reported Max Streams: 1000, Reported Max OOS Streams: 0

#    Supported Codec: g729r8, Maximum Packetization Period: 60

#    Supported Codec: rfc2833 dtmf, Maximum Packetization Period: 30

#    Supported Codec: rfc2833 pass-thru, Maximum Packetization Period: 30

#    Supported Codec: inband-dtmf to rfc2833 conversion, Maximum Packetization Period: 30

#    TLS : ENABLED

#

#    MTP Oper State: ACTIVE - Cause Code: KEEPALIVE_FAILED

#    Active Call Manager: NONE

#    TCP Link Status: CONNECTED, Profile Identifier: 31

#    Reported Max Streams: 1000, Reported Max OOS Streams: 0

#    Supported Codec: g729r8, Maximum Packetization Period: 60

#    Supported Codec: rfc2833 dtmf, Maximum Packetization Period: 30

#    Supported Codec: rfc2833 pass-thru, Maximum Packetization Period: 30

#    Supported Codec: inband-dtmf to rfc2833 conversion, Maximum Packetization Period: 30

#    TLS : ENABLED

Commands to reset the dspfarm profile:

#        WAIT XXX AMOUNT TIME

#        cli_exec $cli(fd) "enable"

#        cli_exec $cli(fd) "configure terminal"

#        cli_exec $cli(fd) "dspfarm profile " + $IDENT     <---- the Profile Identifier

#        cli_exec $cli(fd) "shutdown"

#        cli_exec $cli(fd) "no shutdown"

#        cli_exec $cli(fd) "end"

I would also have to run a command that would limit the EEM TCL or Applet from using all the memory resources on the router. This script will run on a 3945 with 15.0 and 15.1.

Hopefully, someone can help out with this. My attempts have failed and caused router reloads hence the requirement for memory management.

Thanks,

Lee

1 Accepted Solution

Accepted Solutions

This script should do what you want.  It requires you to set one environment variable in addition to the standard set of email variables like _email_server, _email_from, etc.

This will control where the log file is stored:

event manager environment dspfarm_log flash:dspfarm.log

View solution in original post

3 Replies 3

lstonesi
Cisco Employee
Cisco Employee

A small update:

5. Reset the DSPFarms with KEEPALIVE_FAILED at 1:00 am nightly.

This script should do what you want.  It requires you to set one environment variable in addition to the standard set of email variables like _email_server, _email_from, etc.

This will control where the log file is stored:

event manager environment dspfarm_log flash:dspfarm.log

Thanks for your help Joseph.

This script did the trick.

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: