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.

Cisco Employee

EEM Script to reset Dspfarms nightly

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

Everyone's tags (8)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: EEM Script to reset Dspfarms 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
3 REPLIES
Cisco Employee

EEM Script to reset Dspfarms nightly

A small update:

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

Cisco Employee

Re: EEM Script to reset Dspfarms 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
Cisco Employee

EEM Script to reset Dspfarms nightly

Thanks for your help Joseph.

This script did the trick.

1177
Views
0
Helpful
3
Replies