09-29-2009 06:41 AM
I'm using the TCL scripts that Joe Clarke produced in the conversation on shutting down unused ports from Aug 25. It appears like the script is running, and it even produces the susp_ports.dat file, but none of the ports are shut down. I tried it by setting the suspend_ports_days variable to 2 days, but after 4 days no ports have been shut down. Any suggestions?
Solved! Go to Solution.
10-01-2009 11:01 AM
09-29-2009 07:42 AM
Can you post your exact version of IOS, and the exact script you're using?
09-29-2009 08:03 AM
09-29-2009 09:27 AM
Post the output of:
show run | inc event manager environment
09-29-2009 09:39 AM
event manager environment suspend_ports_days 2
event manager environment suspend_ports_config flash:/susp_ports.dat
09-29-2009 09:51 AM
Okay, you have the policies configured to shutdown ports which have been operationally down for 2 days. But in the config file, these ports have only been down since 9/29 09:50:00. So they would need to still be down on 10/1 at 09:50:00 before they are shutdown.
09-29-2009 10:04 AM
I had the policy start at 00:00 on 9/26 and it has ran every day at midnight since then. Today when there were still no port shut down, I changed the cron time to 8:50 and ran it again to see if there would be some kind of error message to help troubleshoot. So, the policy has ran 5 times now, with no ports shutdown.
09-29-2009 10:27 AM
09-29-2009 10:57 AM
Thanks, I'll give it a try and let you know the result.
10-01-2009 04:37 AM
10-01-2009 10:56 AM
It looks like there is something in the script that the cli doesn't like. I turned on debug and ran the script, then advanced the clock 2 days and ran it again. The debug shows that it's trying to run "{interface FastEthernet0/1} shut" with the braces and the command is rejected. This is in lines 152 and 165 of the attachment.
10-01-2009 10:58 AM
Yeah, I have the analysis on my todo list. I should have some time to analyze the code in a little while. I'll post another update.
10-01-2009 11:01 AM
10-01-2009 12:14 PM
This works perfectly!! Thanks for your help.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide