06-30-2022 05:16 AM
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
06-30-2022 07:35 AM
You need to provide some information, what device model , what IOS code it running?
***** Rate All Helpful Responses *****
06-30-2022 10:03 AM
06-30-2022 11:34 AM
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.
07-07-2022 09:17 AM
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.
07-07-2022 12:30 PM
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
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: