cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
247
Views
0
Helpful
5
Replies

Scripts Wont Shutdown Interfaces Past One Day

tyler.smith
Beginner
Beginner

I found the attached scripts from another thread and implemented them onto a switch for testing and it worked from its original one day setting. When I try to configure the script to run every 11 days, giving users additional time from vacation and all, it wont execute and shut down the interfaces due to inactivity. Changing the configuration in the script and on the switch to match the days run time doesn't seem to function correctly. Any thoughts?

 

event manager environment suspend_ports_days 11
event manager environment suspend_ports_config flash:/susp_ports.dat
event manager directory user policy "flash:/policies"
event manager session cli username *USER*
event manager policy sl_suspend_ports.tcl
event manager policy tm_suspend_ports.tcl

5 Replies 5

balaji.bandi
VIP Guru VIP Guru
VIP Guru

You need to provide some information, what device model , what IOS code it running?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

2960X 152-7.E5

Georg Pauwen
VIP Master VIP Master
VIP Master

Hello,

 

you could try to set the variable below:

 

::cisco::eem::event_register_timer watchdog time 950400

 

instead of the cron timer. 950400 seconds equals 11 days.

The scripts work as is with everything in place. It is only when I go more than a few days it will not respond. The most I had it set to was 4 days and it worked as intended. It was only when I implemented the 11 days it no longer works. 

The tm_suspend_ports.tcl.txt  you posted here looks like it has been modified.   I see  SECS_IN_DAYS 1209600 but this value should be set SECS_IN_DAYS 86400.   Compare it to the script posted by the author in this post.  https://community.cisco.com/t5/network-management/eem-and-tcl-script-to-disable-inactive-ports/td-p/2226722

 

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:

Recognize Your Peers