Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Shutdown Ports not in use for a while with EEM Tcl

I have downloaded these 2 Tcl scripts from this previous discussion and from the sounds of it it's exactly what I've been looking for. But the problem is I'm new to EEM and have no idea how to go about putting these on the switches themselves. I've searched for configuration guides but to no prevail. Any help is greatly appreciated. Here's the link to previous discussion:

https://supportforums.cisco.com/thread/164684.pdf;jsessionid=EEEEE143342DAAB34706D608D5C4C920.node0

47 REPLIES
Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

Create a directory on flash called, for example, policies.  Then copy the policies into this directory.  Then configure the following:

event manager directory user policy flash:/policies

event manager policy POLNAME

Where POLNAME is the name of the policy to install (e.g. sl_suspend_ports.tcl).

But pay attention to the required environment variables.  If you use the policies I mentioned in this other discussion, you'll note that they require you to configure:

event manager environment suspend_ports_days

event manager environment suspend_ports_config

Be sure you properly set those variables.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

Thank you for the quick response and for being so helpful. I got the event manager policy tm_suspend_ports command to take but the sl_suspend_ports kicks back this error. I have put in these commands prior event manager environment suspend_ports_days 3 (we only want a 3 day window)
event manager environment suspend_ports_config flash:/susp_ports.dat but this database is not created in flash. Like I said before I'm no script write this is all jibberish to me.

Register event failed:missing close-bracket
    while compiling
"set results"
    ("while" body line 2)
    while compiling
"while { 1 } {
    set results [run_cli [list "show event manager policy pending | include tm_suspend_ports.tcl"]
    if { ! [regexp {tm_suspend_ports...."

Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy sl_suspend_ports.tcl

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

Please post the script you're trying to load.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

::cisco::eem::event_register_syslog pattern "LINEPROTO-5-UPDOWN" maxrum 600

#-

# Copyright (c) 2009 Joe Marcus Clarke <jclarke@cisco.com>

# All rights reserved.

#

# Redistribution and use in source and binary forms, with or without

# modification, are permitted provided that the following conditions

# are met:

# 1. Redistributions of source code must retain the above copyright

#    notice, this list of conditions and the following disclaimer.

# 2. Redistributions in binary form must reproduce the above copyright

#    notice, this list of conditions and the following disclaimer in the

#    documentation and/or other materials provided with the distribution.

#

# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND

# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE

# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS

# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY

#

# This policy listens for link up syslog messages, and removes the port from

# the list of down ports.

#

# This policy uses the following environment variables:

#

# suspend_ports_config      : Path to configuration file.

#

if { ![info exists suspend_ports_config] } {

    set result "ERROR: Policy cannot be run: variable suspend_ports_config has not been set"

    error $result $errorInfo

}

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

proc run_cli { clist } {

    set rbuf ""

    if {[llength $clist] < 1} {

    return -code ok $rbuf

    }

    if {[catch {cli_open} result]} {

        return -code error $result

    } else {

    array set cliarr $result

    }

    if {[catch {cli_exec $cliarr(fd) "enable"} result]} {

        return -code error $result

    }

    foreach cmd $clist {

    if {[catch {cli_exec $cliarr(fd) $cmd} result]} {

            return -code error $result

    }

    append rbuf $result

    }

    if {[catch {cli_close $cliarr(fd) $cliarr(tty_id)} result]} {

        puts "WARNING: $result"

    }

    return -code ok $rbuf

}

array set arr_einfo [event_reqinfo]

if { ! [regexp {Interface ([^,]+), changed state to up} $arr_einfo(msg) -> iface] } {

    exit

}

while { 1 } {

    set results [run_cli [list "show event manager policy pending | include tm_suspend_ports.tcl"]

    if { ! [regexp {tm_suspend_ports.tcl} $results] } {

    break

    }

    after 1000

}

if { [catch {open $shutdown_ports_config "r"} result] } {

    exit

}

set fd $result

set contents [read $fd]

close $fd

set contents [string trim $contents]

array set ports [split $contents]

if { [info exists ports($iface)] } {

    array unset ports $iface

    set fd [open $suspend_ports_config "w"]

    puts -nonewline $fd [array get ports]

    close $fd

}

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

This line:

set results [run_cli [list "show event manager policy pending | include tm_suspend_ports.tcl"]

Should read:

set results [run_cli [list "show event manager policy pending | include tm_suspend_ports.tcl"]]

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

Thank you very much for your help. I tried to run it but it kicked back another error but I compared the two scripts

and fixed it. It was the maxrun 600 at the top it says maxrum 600. Thanks again and hopefully in 3 days I'll see some results. I'm running it in a lab before we put it out to the rest of the devices.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

I came into work this morning hoping to be a happy camper but none of my ports are disabled, they all still say not connected. From the looks of it the script didn't shutdown the ports. Any ideas???

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

Do you have both the syslog and the timer policies registered?  The syslog policy will handle removing ports that come up, but the tm_suspend_ports.tcl policy is the one that shuts down ports.  What does your entire "event manager" config look like?  Was the file pointed to by the suspend_ports_config variable created?  If so, what are its contents?

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

Here is the Registered Policies:

No.  Class   Type    Event Type          Trap  Time Registered           Name
1    script  user    syslog              On    Tue Oct 12 08:39:36 2010  sl_suspend_ports.tcl
pattern {LINEPROTO-5-UPDOWN}
nice 0 queue-priority normal maxrun 600.000


2    script  user    timer cron          On    Tue Oct 12 08:40:08 2010  tm_suspend_ports.tcl
cron entry {0 0 * * *}
nice 0 queue-priority normal maxrun 600.000

Here's the "event manager" configurations:

event manager environment suspend_ports_days 1
event manager environment suspend_ports_config flash:/susp_ports.dat
event manager directory user policy "flash:/policies"
event manager policy sl_suspend_ports.tcl trap
event manager policy tm_suspend_ports.tcl trap

Here's the directory in flash:

Directory of flash:/policies/

    8  -rwx        4546   Oct 9 2010 23:25:42 +10:00  tm_suspend_ports.tcl
    9  -rwx        3204   Oct 9 2010 23:26:05 +10:00  sl_suspend_ports.tcl

Thanks so much for your help.

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

Okay, ports that have not been up within one day should get shutdown.  Post the flash:/susp_ports.dat file, and check the "show log" output for errors that may indicate the tm_ script is not running properly (this script should run at midnight every day).

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

I attached the suspend_ports.dat file. I didn't see anything in the logs referencing any errors.

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

This looks okay.  It appears that as of midnight on 10/14, the ports should have been shutdown.  Check the output of "show event manager history event" to make sure the tm_ policy is running.  You might also enable "debug event manager tcl cli" and wait for the policy to run again.  When it does, the logging buffer will have some more details.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

Here's the output of that command. I don't see the tm script running:

No.  Job Id      Status   Time of Event             Event Type          Name
1    1518        success  Thu Oct14  16:29:46 2010  syslog              script: sl_suspend_ports.tcl
2    1519        success  Thu Oct14  16:29:49 2010  syslog              script: sl_suspend_ports.tcl
3    1520        success  Thu Oct14  16:32:12 2010  syslog              script: sl_suspend_ports.tcl
4    1521        success  Thu Oct14  16:32:42 2010  syslog              script: sl_suspend_ports.tcl
5    1522        success  Thu Oct14  16:44:09 2010  syslog              script: sl_suspend_ports.tcl
6    1523        success  Thu Oct14  16:44:11 2010  syslog              script: sl_suspend_ports.tcl
7    1524        success  Thu Oct14  16:45:43 2010  syslog              script: sl_suspend_ports.tcl
8    1525        success  Thu Oct14  16:45:45 2010  syslog              script: sl_suspend_ports.tcl
9    1526        success  Thu Oct14  16:49:25 2010  syslog              script: sl_suspend_ports.tcl
10   1527        success  Thu Oct14  16:49:28 2010  syslog              script: sl_suspend_ports.tcl

I started the debug and it just so happens they swapped me to graveyard shift so I'll be able to see it tonight.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

I've attached the debug output, it truncated 20+ lines. It looks like it runs it just

doesn't disable the ports. It sucks having to wait everyday until midnight I wish I could run it whenever I want while troubleshooting.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

I'll post tonights output when the script runs again.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

The debug output was the same as last night. Here's the show even man hist event:

No.  Job Id      Status   Time of Event             Event Type          Name
1    1981        success  Fri Oct15  18:06:28 2010  syslog              script: sl_suspend_ports.tcl
2    1982        success  Fri Oct15  19:07:50 2010  syslog              script: sl_suspend_ports.tcl
3    1983        success  Fri Oct15  19:07:52 2010  syslog              script: sl_suspend_ports.tcl
4    1984        success  Fri Oct15  19:27:40 2010  syslog              script: sl_suspend_ports.tcl
5    1985        success  Fri Oct15  19:27:41 2010  syslog              script: sl_suspend_ports.tcl
6    1986        success  Fri Oct15  19:28:17 2010  syslog              script: sl_suspend_ports.tcl
7    1987        success  Fri Oct15  19:28:47 2010  syslog              script: sl_suspend_ports.tcl
8    1988        success  Fri Oct15  19:44:59 2010  syslog              script: sl_suspend_ports.tcl
9    1989        success  Fri Oct15  19:45:01 2010  syslog              script: sl_suspend_ports.tcl
10   1990        success  Sat Oct16  00:00:00 2010  timer cron          script: tm_suspend_ports.tcl

Still didn't disable the ports. I've attached the susp_ports.dat again.

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

Here is a debug version that can be run manually.  Register this version (don't just copy it to the device, you actually need to re-register it).  Then run:

event manager run tm_suspend_ports.tcl

Post the output.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

Here's the output from running the script. Below that is the log file.


XXX: Looking at iface FastEthernet1/0/1
XXX: line 'FastEthernet1/0/1 unassigned YES unset up up' is up
XXX: FastEthernet1/0/1 not found in array
XXX: Looking at iface FastEthernet1/0/2
XXX: line 'FastEthernet1/0/2 unassigned YES unset up up' is up
XXX: FastEthernet1/0/2 not found in array
XXX: Looking at iface FastEthernet1/0/3
XXX: line 'FastEthernet1/0/3 unassigned YES unset down down' is down
XXX: FastEthernet1/0/3 not found in array
XXX: Adding FastEthernet1/0/3 to ports array
XXX: Looking at iface FastEthernet1/0/4
XXX: line 'FastEthernet1/0/4 unassigned YES unset up up' is up
XXX: FastEthernet1/0/4 not found in array
XXX: Looking at iface FastEthernet1/0/5
XXX: line 'FastEthernet1/0/5 unassigned YES unset up up' is up
XXX: FastEthernet1/0/5 not found in array
XXX: Looking at iface FastEthernet1/0/6
XXX: line 'FastEthernet1/0/6 unassigned YES unset down down' is down
XXX: FastEthernet1/0/6 not found in array
XXX: Adding FastEthernet1/0/6 to ports array
XXX: Looking at iface FastEthernet1/0/7
XXX: line 'FastEthernet1/0/7 unassigned YES unset up up' is up
XXX: FastEthernet1/0/7 not found in array
XXX: Looking at iface FastEthernet1/0/8
XXX: line 'FastEthernet1/0/8 unassigned YES unset up up' is up
XXX: FastEthernet1/0/8 not found in array
XXX: Looking at iface FastEthernet1/0/9
XXX: line 'FastEthernet1/0/9 unassigned YES unset up up' is up
XXX: FastEthernet1/0/9 not found in array
XXX: Looking at iface FastEthernet1/0/10
XXX: line 'FastEthernet1/0/10 unassigned YES unset up up' is up
XXX: FastEthernet1/0/10 not found in array
XXX: Looking at iface FastEthernet1/0/11
XXX: line 'FastEthernet1/0/11 unassigned YES unset up up' is up
XXX: FastEthernet1/0/11 not found in array
XXX: Looking at iface FastEthernet1/0/12
XXX: line 'FastEthernet1/0/12 unassigned YES unset down down' is down
XXX: FastEthernet1/0/12 not found in array
XXX: Adding FastEthernet1/0/12 to ports array
XXX: Looking at iface FastEthernet1/0/13
XXX: line 'FastEthernet1/0/13 unassigned YES unset down down' is down
XXX: FastEthernet1/0/13 not found in array
XXX: Adding FastEthernet1/0/13 to ports array
XXX: Looking at iface FastEthernet1/0/14
XXX: line 'FastEthernet1/0/14 unassigned YES unset up up' is up
XXX: FastEthernet1/0/14 not found in array
XXX: Looking at iface FastEthernet1/0/15
XXX: line 'FastEthernet1/0/15 unassigned YES unset up up' is up
XXX: FastEthernet1/0/15 not found in array
XXX: Looking at iface FastEthernet1/0/16
XXX: line 'FastEthernet1/0/16 unassigned YES unset up up' is up
XXX: FastEthernet1/0/16 not found in array
XXX: Looking at iface FastEthernet1/0/17
XXX: line 'FastEthernet1/0/17 unassigned YES unset up up' is up
XXX: FastEthernet1/0/17 not found in array
XXX: Looking at iface FastEthernet1/0/18
XXX: line 'FastEthernet1/0/18 unassigned YES unset up up' is up
XXX: FastEthernet1/0/18 not found in array
XXX: Looking at iface FastEthernet1/0/19
XXX: line 'FastEthernet1/0/19 unassigned YES unset down down' is down
XXX: FastEthernet1/0/19 not found in array
XXX: Adding FastEthernet1/0/19 to ports array
XXX: Looking at iface FastEthernet1/0/20
XXX: line 'FastEthernet1/0/20 unassigned YES unset down down' is down
XXX: FastEthernet1/0/20 not found in array
XXX: Adding FastEthernet1/0/20 to ports array
XXX: Looking at iface FastEthernet1/0/21
XXX: line 'FastEthernet1/0/21 unassigned YES unset down down' is down
XXX: FastEthernet1/0/21 not found in array
XXX: Adding FastEthernet1/0/21 to ports array
XXX: Looking at iface FastEthernet1/0/22
XXX: line 'FastEthernet1/0/22 unassigned YES unset up up' is up
XXX: FastEthernet1/0/22 not found in array
XXX: Looking at iface FastEthernet1/0/23
XXX: line 'FastEthernet1/0/23 unassigned YES unset down down' is down
XXX: FastEthernet1/0/23 not found in array
XXX: Adding FastEthernet1/0/23 to ports array
XXX: Looking at iface FastEthernet1/0/24
XXX: line 'FastEthernet1/0/24 unassigned YES unset down down' is down
XXX: FastEthernet1/0/24 not found in array
XXX: Adding FastEthernet1/0/24 to ports array
XXX: Looking at iface FastEthernet1/0/25
XXX: line 'FastEthernet1/0/25 unassigned YES unset down down' is down
XXX: FastEthernet1/0/25 not found in array
XXX: Adding FastEthernet1/0/25 to ports array
XXX: Looking at iface FastEthernet1/0/26
XXX: line 'FastEthernet1/0/26 unassigned YES unset up up' is up
XXX: FastEthernet1/0/26 not found in array
XXX: Looking at iface FastEthernet1/0/27
XXX: line 'FastEthernet1/0/27 unassigned YES unset up up' is up
XXX: FastEthernet1/0/27 not found in array
XXX: Looking at iface FastEthernet1/0/28
XXX: line 'FastEthernet1/0/28 unassigned YES unset up up' is up
XXX: FastEthernet1/0/28 not found in array
XXX: Looking at iface FastEthernet1/0/29
XXX: line 'FastEthernet1/0/29 unassigned YES unset down down' is down
XXX: FastEthernet1/0/29 not found in array
XXX: Adding FastEthernet1/0/29 to ports array
XXX: Looking at iface FastEthernet1/0/30
XXX: line 'FastEthernet1/0/30 unassigned YES unset down down' is down
XXX: FastEthernet1/0/30 not found in array
XXX: Adding FastEthernet1/0/30 to ports array
XXX: Looking at iface FastEthernet1/0/31
XXX: line 'FastEthernet1/0/31 unassigned YES unset down down' is down
XXX: FastEthernet1/0/31 not found in array
XXX: Adding FastEthernet1/0/31 to ports array
XXX: Looking at iface FastEthernet1/0/32
XXX: line 'FastEthernet1/0/32 unassigned YES unset down down' is down
XXX: FastEthernet1/0/32 not found in array
XXX: Adding FastEthernet1/0/32 to ports array
XXX: Looking at iface FastEthernet1/0/33
XXX: line 'FastEthernet1/0/33 unassigned YES unset up up' is up
XXX: FastEthernet1/0/33 not found in array
XXX: Looking at iface FastEthernet1/0/34
XXX: line 'FastEthernet1/0/34 unassigned YES unset up up' is up
XXX: FastEthernet1/0/34 not found in array
XXX: Looking at iface FastEthernet1/0/35
XXX: line 'FastEthernet1/0/35 unassigned YES unset up up' is up
XXX: FastEthernet1/0/35 not found in array
XXX: Looking at iface FastEthernet1/0/36
XXX: line 'FastEthernet1/0/36 unassigned YES unset down down' is down
XXX: FastEthernet1/0/36 not found in array
XXX: Adding FastEthernet1/0/36 to ports array
XXX: Looking at iface FastEthernet1/0/37
XXX: line 'FastEthernet1/0/37 unassigned YES unset up up' is up
XXX: FastEthernet1/0/37 not found in array
XXX: Looking at iface FastEthernet1/0/38
XXX: line 'FastEthernet1/0/38 unassigned YES unset down down' is down
XXX: FastEthernet1/0/38 not found in array
XXX: Adding FastEthernet1/0/38 to ports array
XXX: Looking at iface FastEthernet1/0/39
XXX: line 'FastEthernet1/0/39 unassigned YES unset down down' is down
XXX: FastEthernet1/0/39 not found in array
XXX: Adding FastEthernet1/0/39 to ports array
XXX: Looking at iface FastEthernet1/0/40
XXX: line 'FastEthernet1/0/40 unassigned YES unset down down' is down
XXX: FastEthernet1/0/40 not found in array
XXX: Adding FastEthernet1/0/40 to ports array
XXX: Looking at iface FastEthernet1/0/41
XXX: line 'FastEthernet1/0/41 unassigned YES unset up up' is up
XXX: FastEthernet1/0/41 not found in array
XXX: Looking at iface FastEthernet1/0/42
XXX: line 'FastEthernet1/0/42 unassigned YES unset down down' is down
XXX: FastEthernet1/0/42 not found in array
XXX: Adding FastEthernet1/0/42 to ports array
XXX: Looking at iface FastEthernet1/0/43
XXX: line 'FastEthernet1/0/43 unassigned YES unset down down' is down
XXX: FastEthernet1/0/43 not found in array
XXX: Adding FastEthernet1/0/43 to ports array
XXX: Looking at iface FastEthernet1/0/44
XXX: line 'FastEthernet1/0/44 unassigned YES unset up up' is up
XXX: FastEthernet1/0/44 not found in array
XXX: Looking at iface FastEthernet1/0/45
XXX: line 'FastEthernet1/0/45 unassigned YES unset up up' is up
XXX: FastEthernet1/0/45 not found in array
XXX: Looking at iface FastEthernet1/0/46
XXX: line 'FastEthernet1/0/46 unassigned YES unset down down' is down
XXX: FastEthernet1/0/46 not found in array
XXX: Adding FastEthernet1/0/46 to ports array
XXX: Looking at iface FastEthernet1/0/47
XXX: line 'FastEthernet1/0/47 unassigned YES unset up up' is up
XXX: FastEthernet1/0/47 not found in array
XXX: Looking at iface FastEthernet1/0/48
XXX: line 'FastEthernet1/0/48 unassigned YES unset down down' is down
XXX: FastEthernet1/0/48 not found in array
XXX: Adding FastEthernet1/0/48 to ports array
XXX: Looking at iface GigabitEthernet1/0/1
XXX: line 'GigabitEthernet1/0/1 unassigned YES unset up up' is up
XXX: GigabitEthernet1/0/1 not found in array
XXX: Looking at iface GigabitEthernet1/0/2
XXX: line 'GigabitEthernet1/0/2 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet1/0/2 not found in array
XXX: Looking at iface GigabitEthernet1/0/3
XXX: line 'GigabitEthernet1/0/3 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet1/0/3 not found in array
XXX: Looking at iface GigabitEthernet1/0/4
XXX: line 'GigabitEthernet1/0/4 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet1/0/4 not found in array
XXX: Looking at iface FastEthernet2/0/1
XXX: line 'FastEthernet2/0/1 unassigned YES unset down down' is down
XXX: FastEthernet2/0/1 not found in array
XXX: Adding FastEthernet2/0/1 to ports array
XXX: Looking at iface FastEthernet2/0/2
XXX: line 'FastEthernet2/0/2 unassigned YES unset down down' is down
XXX: FastEthernet2/0/2 not found in array
XXX: Adding FastEthernet2/0/2 to ports array
XXX: Looking at iface FastEthernet2/0/3
XXX: line 'FastEthernet2/0/3 unassigned YES unset down down' is down
XXX: FastEthernet2/0/3 not found in array
XXX: Adding FastEthernet2/0/3 to ports array
XXX: Looking at iface FastEthernet2/0/4
XXX: line 'FastEthernet2/0/4 unassigned YES unset down down' is down
XXX: FastEthernet2/0/4 not found in array
XXX: Adding FastEthernet2/0/4 to ports array
XXX: Looking at iface FastEthernet2/0/5
XXX: line 'FastEthernet2/0/5 unassigned YES unset down down' is down
XXX: FastEthernet2/0/5 not found in array
XXX: Adding FastEthernet2/0/5 to ports array
XXX: Looking at iface FastEthernet2/0/6
XXX: line 'FastEthernet2/0/6 unassigned YES unset down down' is down
XXX: FastEthernet2/0/6 not found in array
XXX: Adding FastEthernet2/0/6 to ports array
XXX: Looking at iface FastEthernet2/0/7
XXX: line 'FastEthernet2/0/7 unassigned YES unset down down' is down
XXX: FastEthernet2/0/7 not found in array
XXX: Adding FastEthernet2/0/7 to ports array
XXX: Looking at iface FastEthernet2/0/8
XXX: line 'FastEthernet2/0/8 unassigned YES unset down down' is down
XXX: FastEthernet2/0/8 not found in array
XXX: Adding FastEthernet2/0/8 to ports array
XXX: Looking at iface FastEthernet2/0/9
XXX: line 'FastEthernet2/0/9 unassigned YES unset up up' is up
XXX: FastEthernet2/0/9 not found in array
XXX: Looking at iface FastEthernet2/0/10
XXX: line 'FastEthernet2/0/10 unassigned YES unset down down' is down
XXX: FastEthernet2/0/10 not found in array
XXX: Adding FastEthernet2/0/10 to ports array
XXX: Looking at iface FastEthernet2/0/11
XXX: line 'FastEthernet2/0/11 unassigned YES unset down down' is down
XXX: FastEthernet2/0/11 not found in array
XXX: Adding FastEthernet2/0/11 to ports array
XXX: Looking at iface FastEthernet2/0/12
XXX: line 'FastEthernet2/0/12 unassigned YES unset down down' is down
XXX: FastEthernet2/0/12 not found in array
XXX: Adding FastEthernet2/0/12 to ports array
XXX: Looking at iface FastEthernet2/0/13
XXX: line 'FastEthernet2/0/13 unassigned YES unset down down' is down
XXX: FastEthernet2/0/13 not found in array
XXX: Adding FastEthernet2/0/13 to ports array
XXX: Looking at iface FastEthernet2/0/14
XXX: line 'FastEthernet2/0/14 unassigned YES unset down down' is down
XXX: FastEthernet2/0/14 not found in array
XXX: Adding FastEthernet2/0/14 to ports array
XXX: Looking at iface FastEthernet2/0/15
XXX: line 'FastEthernet2/0/15 unassigned YES unset down down' is down
XXX: FastEthernet2/0/15 not found in array
XXX: Adding FastEthernet2/0/15 to ports array
XXX: Looking at iface FastEthernet2/0/16
XXX: line 'FastEthernet2/0/16 unassigned YES unset down down' is down
XXX: FastEthernet2/0/16 not found in array
XXX: Adding FastEthernet2/0/16 to ports array
XXX: Looking at iface FastEthernet2/0/17
XXX: line 'FastEthernet2/0/17 unassigned YES unset down down' is down
XXX: FastEthernet2/0/17 not found in array
XXX: Adding FastEthernet2/0/17 to ports array
XXX: Looking at iface FastEthernet2/0/18
XXX: line 'FastEthernet2/0/18 unassigned YES unset down down' is down
XXX: FastEthernet2/0/18 not found in array
XXX: Adding FastEthernet2/0/18 to ports array
XXX: Looking at iface FastEthernet2/0/19
XXX: line 'FastEthernet2/0/19 unassigned YES unset up up' is up
XXX: FastEthernet2/0/19 not found in array
XXX: Looking at iface FastEthernet2/0/20
XXX: line 'FastEthernet2/0/20 unassigned YES unset down down' is down
XXX: FastEthernet2/0/20 not found in array
XXX: Adding FastEthernet2/0/20 to ports array
XXX: Looking at iface FastEthernet2/0/21
XXX: line 'FastEthernet2/0/21 unassigned YES unset down down' is down
XXX: FastEthernet2/0/21 not found in array
XXX: Adding FastEthernet2/0/21 to ports array
XXX: Looking at iface FastEthernet2/0/22
XXX: line 'FastEthernet2/0/22 unassigned YES unset down down' is down
XXX: FastEthernet2/0/22 not found in array
XXX: Adding FastEthernet2/0/22 to ports array
XXX: Looking at iface FastEthernet2/0/23
XXX: line 'FastEthernet2/0/23 unassigned YES unset down down' is down
XXX: FastEthernet2/0/23 not found in array
XXX: Adding FastEthernet2/0/23 to ports array
XXX: Looking at iface FastEthernet2/0/24
XXX: line 'FastEthernet2/0/24 unassigned YES unset up up' is up
XXX: FastEthernet2/0/24 not found in array
XXX: Looking at iface FastEthernet2/0/25
XXX: line 'FastEthernet2/0/25 unassigned YES unset down down' is down
XXX: FastEthernet2/0/25 not found in array
XXX: Adding FastEthernet2/0/25 to ports array
XXX: Looking at iface FastEthernet2/0/26
XXX: line 'FastEthernet2/0/26 unassigned YES unset down down' is down
XXX: FastEthernet2/0/26 not found in array
XXX: Adding FastEthernet2/0/26 to ports array
XXX: Looking at iface FastEthernet2/0/27
XXX: line 'FastEthernet2/0/27 unassigned YES unset down down' is down
XXX: FastEthernet2/0/27 not found in array
XXX: Adding FastEthernet2/0/27 to ports array
XXX: Looking at iface FastEthernet2/0/28
XXX: line 'FastEthernet2/0/28 unassigned YES unset down down' is down
XXX: FastEthernet2/0/28 not found in array
XXX: Adding FastEthernet2/0/28 to ports array
XXX: Looking at iface FastEthernet2/0/29
XXX: line 'FastEthernet2/0/29 unassigned YES unset down down' is down
XXX: FastEthernet2/0/29 not found in array
XXX: Adding FastEthernet2/0/29 to ports array
XXX: Looking at iface FastEthernet2/0/30
XXX: line 'FastEthernet2/0/30 unassigned YES unset down down' is down
XXX: FastEthernet2/0/30 not found in array
XXX: Adding FastEthernet2/0/30 to ports array
XXX: Looking at iface FastEthernet2/0/31
XXX: line 'FastEthernet2/0/31 unassigned YES unset down down' is down
XXX: FastEthernet2/0/31 not found in array
XXX: Adding FastEthernet2/0/31 to ports array
XXX: Looking at iface FastEthernet2/0/32
XXX: line 'FastEthernet2/0/32 unassigned YES unset up up' is up
XXX: FastEthernet2/0/32 not found in array
XXX: Looking at iface FastEthernet2/0/33
XXX: line 'FastEthernet2/0/33 unassigned YES unset down down' is down
XXX: FastEthernet2/0/33 not found in array
XXX: Adding FastEthernet2/0/33 to ports array
XXX: Looking at iface FastEthernet2/0/34
XXX: line 'FastEthernet2/0/34 unassigned YES unset down down' is down
XXX: FastEthernet2/0/34 not found in array
XXX: Adding FastEthernet2/0/34 to ports array
XXX: Looking at iface FastEthernet2/0/35
XXX: line 'FastEthernet2/0/35 unassigned YES unset down down' is down
XXX: FastEthernet2/0/35 not found in array
XXX: Adding FastEthernet2/0/35 to ports array
XXX: Looking at iface FastEthernet2/0/36
XXX: line 'FastEthernet2/0/36 unassigned YES unset down down' is down
XXX: FastEthernet2/0/36 not found in array
XXX: Adding FastEthernet2/0/36 to ports array
XXX: Looking at iface FastEthernet2/0/37
XXX: line 'FastEthernet2/0/37 unassigned YES unset down down' is down
XXX: FastEthernet2/0/37 not found in array
XXX: Adding FastEthernet2/0/37 to ports array
XXX: Looking at iface FastEthernet2/0/38
XXX: line 'FastEthernet2/0/38 unassigned YES unset down down' is down
XXX: FastEthernet2/0/38 not found in array
XXX: Adding FastEthernet2/0/38 to ports array
XXX: Looking at iface FastEthernet2/0/39
XXX: line 'FastEthernet2/0/39 unassigned YES unset up up' is up
XXX: FastEthernet2/0/39 not found in array
XXX: Looking at iface FastEthernet2/0/40
XXX: line 'FastEthernet2/0/40 unassigned YES unset up up' is up
XXX: FastEthernet2/0/40 not found in array
XXX: Looking at iface FastEthernet2/0/41
XXX: line 'FastEthernet2/0/41 unassigned YES unset down down' is down
XXX: FastEthernet2/0/41 not found in array
XXX: Adding FastEthernet2/0/41 to ports array
XXX: Looking at iface FastEthernet2/0/42
XXX: line 'FastEthernet2/0/42 unassigned YES unset down down' is down
XXX: FastEthernet2/0/42 not found in array
XXX: Adding FastEthernet2/0/42 to ports array
XXX: Looking at iface FastEthernet2/0/43
XXX: line 'FastEthernet2/0/43 unassigned YES unset down down' is down
XXX: FastEthernet2/0/43 not found in array
XXX: Adding FastEthernet2/0/43 to ports array
XXX: Looking at iface FastEthernet2/0/44
XXX: line 'FastEthernet2/0/44 unassigned YES unset down down' is down
XXX: FastEthernet2/0/44 not found in array
XXX: Adding FastEthernet2/0/44 to ports array
XXX: Looking at iface FastEthernet2/0/45
XXX: line 'FastEthernet2/0/45 unassigned YES unset up up' is up
XXX: FastEthernet2/0/45 not found in array
XXX: Looking at iface FastEthernet2/0/46
XXX: line 'FastEthernet2/0/46 unassigned YES unset up up' is up
XXX: FastEthernet2/0/46 not found in array
XXX: Looking at iface FastEthernet2/0/47
XXX: line 'FastEthernet2/0/47 unassigned YES unset up up' is up
XXX: FastEthernet2/0/47 not found in array
XXX: Looking at iface FastEthernet2/0/48
XXX: line 'FastEthernet2/0/48 unassigned YES unset up up' is up
XXX: FastEthernet2/0/48 not found in array
XXX: Looking at iface GigabitEthernet2/0/1
XXX: line 'GigabitEthernet2/0/1 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet2/0/1 not found in array
XXX: Looking at iface GigabitEthernet2/0/2
XXX: line 'GigabitEthernet2/0/2 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet2/0/2 not found in array
XXX: Looking at iface GigabitEthernet2/0/3
XXX: line 'GigabitEthernet2/0/3 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet2/0/3 not found in array
XXX: Looking at iface GigabitEthernet2/0/4
XXX: line 'GigabitEthernet2/0/4 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet2/0/4 not found in array
XXX: Looking at iface FastEthernet3/0/1
XXX: line 'FastEthernet3/0/1 unassigned YES unset up up' is up
XXX: FastEthernet3/0/1 not found in array
XXX: Looking at iface FastEthernet3/0/2
XXX: line 'FastEthernet3/0/2 unassigned YES unset down down' is down
XXX: FastEthernet3/0/2 not found in array
XXX: Adding FastEthernet3/0/2 to ports array
XXX: Looking at iface FastEthernet3/0/3
XXX: line 'FastEthernet3/0/3 unassigned YES unset up up' is up
XXX: FastEthernet3/0/3 not found in array
XXX: Looking at iface FastEthernet3/0/4
XXX: line 'FastEthernet3/0/4 unassigned YES unset down down' is down
XXX: FastEthernet3/0/4 not found in array
XXX: Adding FastEthernet3/0/4 to ports array
XXX: Looking at iface FastEthernet3/0/5
XXX: line 'FastEthernet3/0/5 unassigned YES unset up up' is up
XXX: FastEthernet3/0/5 not found in array
XXX: Looking at iface FastEthernet3/0/6
XXX: line 'FastEthernet3/0/6 unassigned YES unset up up' is up
XXX: FastEthernet3/0/6 not found in array
XXX: Looking at iface FastEthernet3/0/7
XXX: line 'FastEthernet3/0/7 unassigned YES unset up up' is up
XXX: FastEthernet3/0/7 not found in array
XXX: Looking at iface FastEthernet3/0/8
XXX: line 'FastEthernet3/0/8 unassigned YES unset up up' is up
XXX: FastEthernet3/0/8 not found in array
XXX: Looking at iface FastEthernet3/0/9
XXX: line 'FastEthernet3/0/9 unassigned YES unset down down' is down
XXX: FastEthernet3/0/9 not found in array
XXX: Adding FastEthernet3/0/9 to ports array
XXX: Looking at iface FastEthernet3/0/10
XXX: line 'FastEthernet3/0/10 unassigned YES unset down down' is down
XXX: FastEthernet3/0/10 not found in array
XXX: Adding FastEthernet3/0/10 to ports array
XXX: Looking at iface FastEthernet3/0/11
XXX: line 'FastEthernet3/0/11 unassigned YES unset down down' is down
XXX: FastEthernet3/0/11 not found in array
XXX: Adding FastEthernet3/0/11 to ports array
XXX: Looking at iface FastEthernet3/0/12
XXX: line 'FastEthernet3/0/12 unassigned YES unset up up' is up
XXX: FastEthernet3/0/12 not found in array
XXX: Looking at iface FastEthernet3/0/13
XXX: line 'FastEthernet3/0/13 unassigned YES unset down down' is down
XXX: FastEthernet3/0/13 not found in array
XXX: Adding FastEthernet3/0/13 to ports array
XXX: Looking at iface FastEthernet3/0/14
XXX: line 'FastEthernet3/0/14 unassigned YES unset down down' is down
XXX: FastEthernet3/0/14 not found in array
XXX: Adding FastEthernet3/0/14 to ports array
XXX: Looking at iface FastEthernet3/0/15
XXX: line 'FastEthernet3/0/15 unassigned YES unset up up' is up
XXX: FastEthernet3/0/15 not found in array
XXX: Looking at iface FastEthernet3/0/16
XXX: line 'FastEthernet3/0/16 unassigned YES unset down down' is down
XXX: FastEthernet3/0/16 not found in array
XXX: Adding FastEthernet3/0/16 to ports array
XXX: Looking at iface FastEthernet3/0/17
XXX: line 'FastEthernet3/0/17 unassigned YES unset down down' is down
XXX: FastEthernet3/0/17 not found in array
XXX: Adding FastEthernet3/0/17 to ports array
XXX: Looking at iface FastEthernet3/0/18
XXX: line 'FastEthernet3/0/18 unassigned YES unset up up' is up
XXX: FastEthernet3/0/18 not found in array
XXX: Looking at iface FastEthernet3/0/19
XXX: line 'FastEthernet3/0/19 unassigned YES unset down down' is down
XXX: FastEthernet3/0/19 not found in array
XXX: Adding FastEthernet3/0/19 to ports array
XXX: Looking at iface FastEthernet3/0/20
XXX: line 'FastEthernet3/0/20 unassigned YES unset up up' is up
XXX: FastEthernet3/0/20 not found in array
XXX: Looking at iface FastEthernet3/0/21
XXX: line 'FastEthernet3/0/21 unassigned YES unset down down' is down
XXX: FastEthernet3/0/21 not found in array
XXX: Adding FastEthernet3/0/21 to ports array
XXX: Looking at iface FastEthernet3/0/22
XXX: line 'FastEthernet3/0/22 unassigned YES unset down down' is down
XXX: FastEthernet3/0/22 not found in array
XXX: Adding FastEthernet3/0/22 to ports array
XXX: Looking at iface FastEthernet3/0/23
XXX: line 'FastEthernet3/0/23 unassigned YES unset down down' is down
XXX: FastEthernet3/0/23 not found in array
XXX: Adding FastEthernet3/0/23 to ports array
XXX: Looking at iface FastEthernet3/0/24
XXX: line 'FastEthernet3/0/24 unassigned YES unset up up' is up
XXX: FastEthernet3/0/24 not found in array
XXX: Looking at iface FastEthernet3/0/25
XXX: line 'FastEthernet3/0/25 unassigned YES unset up up' is up
XXX: FastEthernet3/0/25 not found in array
XXX: Looking at iface FastEthernet3/0/26
XXX: line 'FastEthernet3/0/26 unassigned YES unset down down' is down
XXX: FastEthernet3/0/26 not found in array
XXX: Adding FastEthernet3/0/26 to ports array
XXX: Looking at iface FastEthernet3/0/27
XXX: line 'FastEthernet3/0/27 unassigned YES unset up up' is up
XXX: FastEthernet3/0/27 not found in array
XXX: Looking at iface FastEthernet3/0/28
XXX: line 'FastEthernet3/0/28 unassigned YES unset down down' is down
XXX: FastEthernet3/0/28 not found in array
XXX: Adding FastEthernet3/0/28 to ports array
XXX: Looking at iface FastEthernet3/0/29
XXX: line 'FastEthernet3/0/29 unassigned YES unset up up' is up
XXX: FastEthernet3/0/29 not found in array
XXX: Looking at iface FastEthernet3/0/30
XXX: line 'FastEthernet3/0/30 unassigned YES unset down down' is down
XXX: FastEthernet3/0/30 not found in array
XXX: Adding FastEthernet3/0/30 to ports array
XXX: Looking at iface FastEthernet3/0/31
XXX: line 'FastEthernet3/0/31 unassigned YES unset down down' is down
XXX: FastEthernet3/0/31 not found in array
XXX: Adding FastEthernet3/0/31 to ports array
XXX: Looking at iface FastEthernet3/0/32
XXX: line 'FastEthernet3/0/32 unassigned YES unset down down' is down
XXX: FastEthernet3/0/32 not found in array
XXX: Adding FastEthernet3/0/32 to ports array
XXX: Looking at iface FastEthernet3/0/33
XXX: line 'FastEthernet3/0/33 unassigned YES unset up up' is up
XXX: FastEthernet3/0/33 not found in array
XXX: Looking at iface FastEthernet3/0/34
XXX: line 'FastEthernet3/0/34 unassigned YES unset up up' is up
XXX: FastEthernet3/0/34 not found in array
XXX: Looking at iface FastEthernet3/0/35
XXX: line 'FastEthernet3/0/35 unassigned YES unset down down' is down
XXX: FastEthernet3/0/35 not found in array
XXX: Adding FastEthernet3/0/35 to ports array
XXX: Looking at iface FastEthernet3/0/36
XXX: line 'FastEthernet3/0/36 unassigned YES unset down down' is down
XXX: FastEthernet3/0/36 not found in array
XXX: Adding FastEthernet3/0/36 to ports array
XXX: Looking at iface FastEthernet3/0/37
XXX: line 'FastEthernet3/0/37 unassigned YES unset down down' is down
XXX: FastEthernet3/0/37 not found in array
XXX: Adding FastEthernet3/0/37 to ports array
XXX: Looking at iface FastEthernet3/0/38
XXX: line 'FastEthernet3/0/38 unassigned YES unset down down' is down
XXX: FastEthernet3/0/38 not found in array
XXX: Adding FastEthernet3/0/38 to ports array
XXX: Looking at iface FastEthernet3/0/39
XXX: line 'FastEthernet3/0/39 unassigned YES unset down down' is down
XXX: FastEthernet3/0/39 not found in array
XXX: Adding FastEthernet3/0/39 to ports array
XXX: Looking at iface FastEthernet3/0/40
XXX: line 'FastEthernet3/0/40 unassigned YES unset up up' is up
XXX: FastEthernet3/0/40 not found in array
XXX: Looking at iface FastEthernet3/0/41
XXX: line 'FastEthernet3/0/41 unassigned YES unset down down' is down
XXX: FastEthernet3/0/41 not found in array
XXX: Adding FastEthernet3/0/41 to ports array
XXX: Looking at iface FastEthernet3/0/42
XXX: line 'FastEthernet3/0/42 unassigned YES unset down down' is down
XXX: FastEthernet3/0/42 not found in array
XXX: Adding FastEthernet3/0/42 to ports array
XXX: Looking at iface FastEthernet3/0/43
XXX: line 'FastEthernet3/0/43 unassigned YES unset down down' is down
XXX: FastEthernet3/0/43 not found in array
XXX: Adding FastEthernet3/0/43 to ports array
XXX: Looking at iface FastEthernet3/0/44
XXX: line 'FastEthernet3/0/44 unassigned YES unset down down' is down
XXX: FastEthernet3/0/44 not found in array
XXX: Adding FastEthernet3/0/44 to ports array
XXX: Looking at iface FastEthernet3/0/45
XXX: line 'FastEthernet3/0/45 unassigned YES unset up up' is up
XXX: FastEthernet3/0/45 not found in array
XXX: Looking at iface FastEthernet3/0/46
XXX: line 'FastEthernet3/0/46 unassigned YES unset up up' is up
XXX: FastEthernet3/0/46 not found in array
XXX: Looking at iface FastEthernet3/0/47
XXX: line 'FastEthernet3/0/47 unassigned YES unset down down' is down
XXX: FastEthernet3/0/47 not found in array
XXX: Adding FastEthernet3/0/47 to ports array
1287181296Process Forced Exit- MAXRUN timer expired.
    ("foreach" body line 1)
    invoked from within
"foreach line [split $result "\n"] {
    set line [string trim $line]
    regsub -all {\s+} $line " " line
    set elems [split $line]
    set iface [l..."
    invoked from within
"$slave eval $Contents"
    (procedure "eval_script" line 7)
    invoked from within
"eval_script slave $scriptname"
    invoked from within
"if {$security_level == 1} {       #untrusted script
     interp create -safe slave
     interp share {} stdin slave
     interp share {} stdout slave
..."
    (file "tmpsys:/lib/tcl/base.tcl" line 50)
Tcl policy execute failed: 1287181296Process Forced Exit- MAXRUN timer expired.

LOG FILE:

Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/1      unassigned      YES unset  up                    up   

Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/2      unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/3      unassigned      YES unset  down                  down  
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/4      unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/5      unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/6      unassigned      YES unset  down                  down  
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/7      unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/8      unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/9      unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/10     unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/11     unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/12     unassigned      YES unset  down                  down 

Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/13     unassigned      YES unset  down                  down  
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/14     unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/15     unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/16     unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/17     unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/18     unassigned      YES unset  up                    up    
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/19     unassigned      YES unset  down                  down  
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : OUT : FastEthernet1/0/20     unassigned      YES unset  down                  down  
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : CTL : 20+ lines read from cli_read, debug output truncated.
Oct 16 08:21:37: %HA_EM-6-LOG: tm_suspend_ports2.tcl : DEBUG(cli_lib) : CTL : cli_close called.

I have a feeling its truncating the good stuff. Is there a way to make it output everything and not truncate the rest of the lines or is that what the onscreen stuff from above is?

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

Whoops, forgot to bump the maxrun time.  Try this version.  You do not need to leave debugging enabled.  The XXX output from the script will be sufficient.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

The XXX output:

XXX: Looking at iface FastEthernet1/0/1
XXX: line 'FastEthernet1/0/1 unassigned YES unset up up' is up
XXX: FastEthernet1/0/1 not found in array
XXX: Looking at iface FastEthernet1/0/2
XXX: line 'FastEthernet1/0/2 unassigned YES unset up up' is up
XXX: FastEthernet1/0/2 not found in array
XXX: Looking at iface FastEthernet1/0/3
XXX: line 'FastEthernet1/0/3 unassigned YES unset down down' is down
XXX: FastEthernet1/0/3 not found in array
XXX: Adding FastEthernet1/0/3 to ports array
XXX: Looking at iface FastEthernet1/0/4
XXX: line 'FastEthernet1/0/4 unassigned YES unset up up' is up
XXX: FastEthernet1/0/4 not found in array
XXX: Looking at iface FastEthernet1/0/5
XXX: line 'FastEthernet1/0/5 unassigned YES unset up up' is up
XXX: FastEthernet1/0/5 not found in array
XXX: Looking at iface FastEthernet1/0/6
XXX: line 'FastEthernet1/0/6 unassigned YES unset down down' is down
XXX: FastEthernet1/0/6 not found in array
XXX: Adding FastEthernet1/0/6 to ports array
XXX: Looking at iface FastEthernet1/0/7
XXX: line 'FastEthernet1/0/7 unassigned YES unset up up' is up
XXX: FastEthernet1/0/7 not found in array
XXX: Looking at iface FastEthernet1/0/8
XXX: line 'FastEthernet1/0/8 unassigned YES unset up up' is up
XXX: FastEthernet1/0/8 not found in array
XXX: Looking at iface FastEthernet1/0/9
XXX: line 'FastEthernet1/0/9 unassigned YES unset up up' is up
XXX: FastEthernet1/0/9 not found in array
XXX: Looking at iface FastEthernet1/0/10
XXX: line 'FastEthernet1/0/10 unassigned YES unset up up' is up
XXX: FastEthernet1/0/10 not found in array
XXX: Looking at iface FastEthernet1/0/11
XXX: line 'FastEthernet1/0/11 unassigned YES unset up up' is up
XXX: FastEthernet1/0/11 not found in array
XXX: Looking at iface FastEthernet1/0/12
XXX: line 'FastEthernet1/0/12 unassigned YES unset down down' is down
XXX: FastEthernet1/0/12 not found in array
XXX: Adding FastEthernet1/0/12 to ports array
XXX: Looking at iface FastEthernet1/0/13
XXX: line 'FastEthernet1/0/13 unassigned YES unset down down' is down
XXX: FastEthernet1/0/13 not found in array
XXX: Adding FastEthernet1/0/13 to ports array
XXX: Looking at iface FastEthernet1/0/14
XXX: line 'FastEthernet1/0/14 unassigned YES unset up up' is up
XXX: FastEthernet1/0/14 not found in array
XXX: Looking at iface FastEthernet1/0/15
XXX: line 'FastEthernet1/0/15 unassigned YES unset up up' is up
XXX: FastEthernet1/0/15 not found in array
XXX: Looking at iface FastEthernet1/0/16
XXX: line 'FastEthernet1/0/16 unassigned YES unset up up' is up
XXX: FastEthernet1/0/16 not found in array
XXX: Looking at iface FastEthernet1/0/17
XXX: line 'FastEthernet1/0/17 unassigned YES unset up up' is up
XXX: FastEthernet1/0/17 not found in array
XXX: Looking at iface FastEthernet1/0/18
XXX: line 'FastEthernet1/0/18 unassigned YES unset up up' is up
XXX: FastEthernet1/0/18 not found in array
XXX: Looking at iface FastEthernet1/0/19
XXX: line 'FastEthernet1/0/19 unassigned YES unset down down' is down
XXX: FastEthernet1/0/19 not found in array
XXX: Adding FastEthernet1/0/19 to ports array
XXX: Looking at iface FastEthernet1/0/20
XXX: line 'FastEthernet1/0/20 unassigned YES unset down down' is down
XXX: FastEthernet1/0/20 not found in array
XXX: Adding FastEthernet1/0/20 to ports array
XXX: Looking at iface FastEthernet1/0/21
XXX: line 'FastEthernet1/0/21 unassigned YES unset down down' is down
XXX: FastEthernet1/0/21 not found in array
XXX: Adding FastEthernet1/0/21 to ports array
XXX: Looking at iface FastEthernet1/0/22
XXX: line 'FastEthernet1/0/22 unassigned YES unset up up' is up
XXX: FastEthernet1/0/22 not found in array
XXX: Looking at iface FastEthernet1/0/23
XXX: line 'FastEthernet1/0/23 unassigned YES unset down down' is down
XXX: FastEthernet1/0/23 not found in array
XXX: Adding FastEthernet1/0/23 to ports array
XXX: Looking at iface FastEthernet1/0/24
XXX: line 'FastEthernet1/0/24 unassigned YES unset down down' is down
XXX: FastEthernet1/0/24 not found in array
XXX: Adding FastEthernet1/0/24 to ports array
XXX: Looking at iface FastEthernet1/0/25
XXX: line 'FastEthernet1/0/25 unassigned YES unset down down' is down
XXX: FastEthernet1/0/25 not found in array
XXX: Adding FastEthernet1/0/25 to ports array
XXX: Looking at iface FastEthernet1/0/26
XXX: line 'FastEthernet1/0/26 unassigned YES unset up up' is up
XXX: FastEthernet1/0/26 not found in array
XXX: Looking at iface FastEthernet1/0/27
XXX: line 'FastEthernet1/0/27 unassigned YES unset up up' is up
XXX: FastEthernet1/0/27 not found in array
XXX: Looking at iface FastEthernet1/0/28
XXX: line 'FastEthernet1/0/28 unassigned YES unset up up' is up
XXX: FastEthernet1/0/28 not found in array
XXX: Looking at iface FastEthernet1/0/29
XXX: line 'FastEthernet1/0/29 unassigned YES unset down down' is down
XXX: FastEthernet1/0/29 not found in array
XXX: Adding FastEthernet1/0/29 to ports array
XXX: Looking at iface FastEthernet1/0/30
XXX: line 'FastEthernet1/0/30 unassigned YES unset down down' is down
XXX: FastEthernet1/0/30 not found in array
XXX: Adding FastEthernet1/0/30 to ports array
XXX: Looking at iface FastEthernet1/0/31
XXX: line 'FastEthernet1/0/31 unassigned YES unset down down' is down
XXX: FastEthernet1/0/31 not found in array
XXX: Adding FastEthernet1/0/31 to ports array
XXX: Looking at iface FastEthernet1/0/32
XXX: line 'FastEthernet1/0/32 unassigned YES unset down down' is down
XXX: FastEthernet1/0/32 not found in array
XXX: Adding FastEthernet1/0/32 to ports array
XXX: Looking at iface FastEthernet1/0/33
XXX: line 'FastEthernet1/0/33 unassigned YES unset up up' is up
XXX: FastEthernet1/0/33 not found in array
XXX: Looking at iface FastEthernet1/0/34
XXX: line 'FastEthernet1/0/34 unassigned YES unset up up' is up
XXX: FastEthernet1/0/34 not found in array
XXX: Looking at iface FastEthernet1/0/35
XXX: line 'FastEthernet1/0/35 unassigned YES unset up up' is up
XXX: FastEthernet1/0/35 not found in array
XXX: Looking at iface FastEthernet1/0/36
XXX: line 'FastEthernet1/0/36 unassigned YES unset down down' is down
XXX: FastEthernet1/0/36 not found in array
XXX: Adding FastEthernet1/0/36 to ports array
XXX: Looking at iface FastEthernet1/0/37
XXX: line 'FastEthernet1/0/37 unassigned YES unset up up' is up
XXX: FastEthernet1/0/37 not found in array
XXX: Looking at iface FastEthernet1/0/38
XXX: line 'FastEthernet1/0/38 unassigned YES unset down down' is down
XXX: FastEthernet1/0/38 not found in array
XXX: Adding FastEthernet1/0/38 to ports array
XXX: Looking at iface FastEthernet1/0/39
XXX: line 'FastEthernet1/0/39 unassigned YES unset down down' is down
XXX: FastEthernet1/0/39 not found in array
XXX: Adding FastEthernet1/0/39 to ports array
XXX: Looking at iface FastEthernet1/0/40
XXX: line 'FastEthernet1/0/40 unassigned YES unset down down' is down
XXX: FastEthernet1/0/40 not found in array
XXX: Adding FastEthernet1/0/40 to ports array
XXX: Looking at iface FastEthernet1/0/41
XXX: line 'FastEthernet1/0/41 unassigned YES unset up up' is up
XXX: FastEthernet1/0/41 not found in array
XXX: Looking at iface FastEthernet1/0/42
XXX: line 'FastEthernet1/0/42 unassigned YES unset down down' is down
XXX: FastEthernet1/0/42 not found in array
XXX: Adding FastEthernet1/0/42 to ports array
XXX: Looking at iface FastEthernet1/0/43
XXX: line 'FastEthernet1/0/43 unassigned YES unset down down' is down
XXX: FastEthernet1/0/43 not found in array
XXX: Adding FastEthernet1/0/43 to ports array
XXX: Looking at iface FastEthernet1/0/44
XXX: line 'FastEthernet1/0/44 unassigned YES unset up up' is up
XXX: FastEthernet1/0/44 not found in array
XXX: Looking at iface FastEthernet1/0/45
XXX: line 'FastEthernet1/0/45 unassigned YES unset up up' is up
XXX: FastEthernet1/0/45 not found in array
XXX: Looking at iface FastEthernet1/0/46
XXX: line 'FastEthernet1/0/46 unassigned YES unset down down' is down
XXX: FastEthernet1/0/46 not found in array
XXX: Adding FastEthernet1/0/46 to ports array
XXX: Looking at iface FastEthernet1/0/47
XXX: line 'FastEthernet1/0/47 unassigned YES unset up up' is up
XXX: FastEthernet1/0/47 not found in array
XXX: Looking at iface FastEthernet1/0/48
XXX: line 'FastEthernet1/0/48 unassigned YES unset down down' is down
XXX: FastEthernet1/0/48 not found in array
XXX: Adding FastEthernet1/0/48 to ports array
XXX: Looking at iface GigabitEthernet1/0/1
XXX: line 'GigabitEthernet1/0/1 unassigned YES unset up up' is up
XXX: GigabitEthernet1/0/1 not found in array
XXX: Looking at iface GigabitEthernet1/0/2
XXX: line 'GigabitEthernet1/0/2 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet1/0/2 not found in array
XXX: Looking at iface GigabitEthernet1/0/3
XXX: line 'GigabitEthernet1/0/3 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet1/0/3 not found in array
XXX: Looking at iface GigabitEthernet1/0/4
XXX: line 'GigabitEthernet1/0/4 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet1/0/4 not found in array
XXX: Looking at iface FastEthernet2/0/1
XXX: line 'FastEthernet2/0/1 unassigned YES unset down down' is down
XXX: FastEthernet2/0/1 not found in array
XXX: Adding FastEthernet2/0/1 to ports array
XXX: Looking at iface FastEthernet2/0/2
XXX: line 'FastEthernet2/0/2 unassigned YES unset down down' is down
XXX: FastEthernet2/0/2 not found in array
XXX: Adding FastEthernet2/0/2 to ports array
XXX: Looking at iface FastEthernet2/0/3
XXX: line 'FastEthernet2/0/3 unassigned YES unset down down' is down
XXX: FastEthernet2/0/3 not found in array
XXX: Adding FastEthernet2/0/3 to ports array
XXX: Looking at iface FastEthernet2/0/4
XXX: line 'FastEthernet2/0/4 unassigned YES unset down down' is down
XXX: FastEthernet2/0/4 not found in array
XXX: Adding FastEthernet2/0/4 to ports array
XXX: Looking at iface FastEthernet2/0/5
XXX: line 'FastEthernet2/0/5 unassigned YES unset down down' is down
XXX: FastEthernet2/0/5 not found in array
XXX: Adding FastEthernet2/0/5 to ports array
XXX: Looking at iface FastEthernet2/0/6
XXX: line 'FastEthernet2/0/6 unassigned YES unset down down' is down
XXX: FastEthernet2/0/6 not found in array
XXX: Adding FastEthernet2/0/6 to ports array
XXX: Looking at iface FastEthernet2/0/7
XXX: line 'FastEthernet2/0/7 unassigned YES unset down down' is down
XXX: FastEthernet2/0/7 not found in array
XXX: Adding FastEthernet2/0/7 to ports array
XXX: Looking at iface FastEthernet2/0/8
XXX: line 'FastEthernet2/0/8 unassigned YES unset down down' is down
XXX: FastEthernet2/0/8 not found in array
XXX: Adding FastEthernet2/0/8 to ports array
XXX: Looking at iface FastEthernet2/0/9
XXX: line 'FastEthernet2/0/9 unassigned YES unset up up' is up
XXX: FastEthernet2/0/9 not found in array
XXX: Looking at iface FastEthernet2/0/10
XXX: line 'FastEthernet2/0/10 unassigned YES unset down down' is down
XXX: FastEthernet2/0/10 not found in array
XXX: Adding FastEthernet2/0/10 to ports array
XXX: Looking at iface FastEthernet2/0/11
XXX: line 'FastEthernet2/0/11 unassigned YES unset down down' is down
XXX: FastEthernet2/0/11 not found in array
XXX: Adding FastEthernet2/0/11 to ports array
XXX: Looking at iface FastEthernet2/0/12
XXX: line 'FastEthernet2/0/12 unassigned YES unset down down' is down
XXX: FastEthernet2/0/12 not found in array
XXX: Adding FastEthernet2/0/12 to ports array
XXX: Looking at iface FastEthernet2/0/13
XXX: line 'FastEthernet2/0/13 unassigned YES unset down down' is down
XXX: FastEthernet2/0/13 not found in array
XXX: Adding FastEthernet2/0/13 to ports array
XXX: Looking at iface FastEthernet2/0/14
XXX: line 'FastEthernet2/0/14 unassigned YES unset down down' is down
XXX: FastEthernet2/0/14 not found in array
XXX: Adding FastEthernet2/0/14 to ports array
XXX: Looking at iface FastEthernet2/0/15
XXX: line 'FastEthernet2/0/15 unassigned YES unset down down' is down
XXX: FastEthernet2/0/15 not found in array
XXX: Adding FastEthernet2/0/15 to ports array
XXX: Looking at iface FastEthernet2/0/16
XXX: line 'FastEthernet2/0/16 unassigned YES unset down down' is down
XXX: FastEthernet2/0/16 not found in array
XXX: Adding FastEthernet2/0/16 to ports array
XXX: Looking at iface FastEthernet2/0/17
XXX: line 'FastEthernet2/0/17 unassigned YES unset down down' is down
XXX: FastEthernet2/0/17 not found in array
XXX: Adding FastEthernet2/0/17 to ports array
XXX: Looking at iface FastEthernet2/0/18
XXX: line 'FastEthernet2/0/18 unassigned YES unset down down' is down
XXX: FastEthernet2/0/18 not found in array
XXX: Adding FastEthernet2/0/18 to ports array
XXX: Looking at iface FastEthernet2/0/19
XXX: line 'FastEthernet2/0/19 unassigned YES unset up up' is up
XXX: FastEthernet2/0/19 not found in array
XXX: Looking at iface FastEthernet2/0/20
XXX: line 'FastEthernet2/0/20 unassigned YES unset down down' is down
XXX: FastEthernet2/0/20 not found in array
XXX: Adding FastEthernet2/0/20 to ports array
XXX: Looking at iface FastEthernet2/0/21
XXX: line 'FastEthernet2/0/21 unassigned YES unset down down' is down
XXX: FastEthernet2/0/21 not found in array
XXX: Adding FastEthernet2/0/21 to ports array
XXX: Looking at iface FastEthernet2/0/22
XXX: line 'FastEthernet2/0/22 unassigned YES unset down down' is down
XXX: FastEthernet2/0/22 not found in array
XXX: Adding FastEthernet2/0/22 to ports array
XXX: Looking at iface FastEthernet2/0/23
XXX: line 'FastEthernet2/0/23 unassigned YES unset down down' is down
XXX: FastEthernet2/0/23 not found in array
XXX: Adding FastEthernet2/0/23 to ports array
XXX: Looking at iface FastEthernet2/0/24
XXX: line 'FastEthernet2/0/24 unassigned YES unset up up' is up
XXX: FastEthernet2/0/24 not found in array
XXX: Looking at iface FastEthernet2/0/25
XXX: line 'FastEthernet2/0/25 unassigned YES unset down down' is down
XXX: FastEthernet2/0/25 not found in array
XXX: Adding FastEthernet2/0/25 to ports array
XXX: Looking at iface FastEthernet2/0/26
XXX: line 'FastEthernet2/0/26 unassigned YES unset down down' is down
XXX: FastEthernet2/0/26 not found in array
XXX: Adding FastEthernet2/0/26 to ports array
XXX: Looking at iface FastEthernet2/0/27
XXX: line 'FastEthernet2/0/27 unassigned YES unset down down' is down
XXX: FastEthernet2/0/27 not found in array
XXX: Adding FastEthernet2/0/27 to ports array
XXX: Looking at iface FastEthernet2/0/28
XXX: line 'FastEthernet2/0/28 unassigned YES unset down down' is down
XXX: FastEthernet2/0/28 not found in array
XXX: Adding FastEthernet2/0/28 to ports array
XXX: Looking at iface FastEthernet2/0/29
XXX: line 'FastEthernet2/0/29 unassigned YES unset down down' is down
XXX: FastEthernet2/0/29 not found in array
XXX: Adding FastEthernet2/0/29 to ports array
XXX: Looking at iface FastEthernet2/0/30
XXX: line 'FastEthernet2/0/30 unassigned YES unset down down' is down
XXX: FastEthernet2/0/30 not found in array
XXX: Adding FastEthernet2/0/30 to ports array
XXX: Looking at iface FastEthernet2/0/31
XXX: line 'FastEthernet2/0/31 unassigned YES unset down down' is down
XXX: FastEthernet2/0/31 not found in array
XXX: Adding FastEthernet2/0/31 to ports array
XXX: Looking at iface FastEthernet2/0/32
XXX: line 'FastEthernet2/0/32 unassigned YES unset up up' is up
XXX: FastEthernet2/0/32 not found in array
XXX: Looking at iface FastEthernet2/0/33
XXX: line 'FastEthernet2/0/33 unassigned YES unset down down' is down
XXX: FastEthernet2/0/33 not found in array
XXX: Adding FastEthernet2/0/33 to ports array
XXX: Looking at iface FastEthernet2/0/34
XXX: line 'FastEthernet2/0/34 unassigned YES unset down down' is down
XXX: FastEthernet2/0/34 not found in array
XXX: Adding FastEthernet2/0/34 to ports array
XXX: Looking at iface FastEthernet2/0/35
XXX: line 'FastEthernet2/0/35 unassigned YES unset down down' is down
XXX: FastEthernet2/0/35 not found in array
XXX: Adding FastEthernet2/0/35 to ports array
XXX: Looking at iface FastEthernet2/0/36
XXX: line 'FastEthernet2/0/36 unassigned YES unset down down' is down
XXX: FastEthernet2/0/36 not found in array
XXX: Adding FastEthernet2/0/36 to ports array
XXX: Looking at iface FastEthernet2/0/37
XXX: line 'FastEthernet2/0/37 unassigned YES unset down down' is down
XXX: FastEthernet2/0/37 not found in array
XXX: Adding FastEthernet2/0/37 to ports array
XXX: Looking at iface FastEthernet2/0/38
XXX: line 'FastEthernet2/0/38 unassigned YES unset down down' is down
XXX: FastEthernet2/0/38 not found in array
XXX: Adding FastEthernet2/0/38 to ports array
XXX: Looking at iface FastEthernet2/0/39
XXX: line 'FastEthernet2/0/39 unassigned YES unset up up' is up
XXX: FastEthernet2/0/39 not found in array
XXX: Looking at iface FastEthernet2/0/40
XXX: line 'FastEthernet2/0/40 unassigned YES unset up up' is up
XXX: FastEthernet2/0/40 not found in array
XXX: Looking at iface FastEthernet2/0/41
XXX: line 'FastEthernet2/0/41 unassigned YES unset down down' is down
XXX: FastEthernet2/0/41 not found in array
XXX: Adding FastEthernet2/0/41 to ports array
XXX: Looking at iface FastEthernet2/0/42
XXX: line 'FastEthernet2/0/42 unassigned YES unset down down' is down
XXX: FastEthernet2/0/42 not found in array
XXX: Adding FastEthernet2/0/42 to ports array
XXX: Looking at iface FastEthernet2/0/43
XXX: line 'FastEthernet2/0/43 unassigned YES unset down down' is down
XXX: FastEthernet2/0/43 not found in array
XXX: Adding FastEthernet2/0/43 to ports array
XXX: Looking at iface FastEthernet2/0/44
XXX: line 'FastEthernet2/0/44 unassigned YES unset down down' is down
XXX: FastEthernet2/0/44 not found in array
XXX: Adding FastEthernet2/0/44 to ports array
XXX: Looking at iface FastEthernet2/0/45
XXX: line 'FastEthernet2/0/45 unassigned YES unset up up' is up
XXX: FastEthernet2/0/45 not found in array
XXX: Looking at iface FastEthernet2/0/46
XXX: line 'FastEthernet2/0/46 unassigned YES unset up up' is up
XXX: FastEthernet2/0/46 not found in array
XXX: Looking at iface FastEthernet2/0/47
XXX: line 'FastEthernet2/0/47 unassigned YES unset up up' is up
XXX: FastEthernet2/0/47 not found in array
XXX: Looking at iface FastEthernet2/0/48
XXX: line 'FastEthernet2/0/48 unassigned YES unset up up' is up
XXX: FastEthernet2/0/48 not found in array
XXX: Looking at iface GigabitEthernet2/0/1
XXX: line 'GigabitEthernet2/0/1 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet2/0/1 not found in array
XXX: Looking at iface GigabitEthernet2/0/2
XXX: line 'GigabitEthernet2/0/2 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet2/0/2 not found in array
XXX: Looking at iface GigabitEthernet2/0/3
XXX: line 'GigabitEthernet2/0/3 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet2/0/3 not found in array
XXX: Looking at iface GigabitEthernet2/0/4
XXX: line 'GigabitEthernet2/0/4 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet2/0/4 not found in array
XXX: Looking at iface FastEthernet3/0/1
XXX: line 'FastEthernet3/0/1 unassigned YES unset up up' is up
XXX: FastEthernet3/0/1 not found in array
XXX: Looking at iface FastEthernet3/0/2
XXX: line 'FastEthernet3/0/2 unassigned YES unset down down' is down
XXX: FastEthernet3/0/2 not found in array
XXX: Adding FastEthernet3/0/2 to ports array
XXX: Looking at iface FastEthernet3/0/3
XXX: line 'FastEthernet3/0/3 unassigned YES unset up up' is up
XXX: FastEthernet3/0/3 not found in array
XXX: Looking at iface FastEthernet3/0/4
XXX: line 'FastEthernet3/0/4 unassigned YES unset down down' is down
XXX: FastEthernet3/0/4 not found in array
XXX: Adding FastEthernet3/0/4 to ports array
XXX: Looking at iface FastEthernet3/0/5
XXX: line 'FastEthernet3/0/5 unassigned YES unset up up' is up
XXX: FastEthernet3/0/5 not found in array
XXX: Looking at iface FastEthernet3/0/6
XXX: line 'FastEthernet3/0/6 unassigned YES unset up up' is up
XXX: FastEthernet3/0/6 not found in array
XXX: Looking at iface FastEthernet3/0/7
XXX: line 'FastEthernet3/0/7 unassigned YES unset up up' is up
XXX: FastEthernet3/0/7 not found in array
XXX: Looking at iface FastEthernet3/0/8
XXX: line 'FastEthernet3/0/8 unassigned YES unset up up' is up
XXX: FastEthernet3/0/8 not found in array
XXX: Looking at iface FastEthernet3/0/9
XXX: line 'FastEthernet3/0/9 unassigned YES unset down down' is down
XXX: FastEthernet3/0/9 not found in array
XXX: Adding FastEthernet3/0/9 to ports array
XXX: Looking at iface FastEthernet3/0/10
XXX: line 'FastEthernet3/0/10 unassigned YES unset down down' is down
XXX: FastEthernet3/0/10 not found in array
XXX: Adding FastEthernet3/0/10 to ports array
XXX: Looking at iface FastEthernet3/0/11
XXX: line 'FastEthernet3/0/11 unassigned YES unset down down' is down
XXX: FastEthernet3/0/11 not found in array
XXX: Adding FastEthernet3/0/11 to ports array
XXX: Looking at iface FastEthernet3/0/12
XXX: line 'FastEthernet3/0/12 unassigned YES unset up up' is up
XXX: FastEthernet3/0/12 not found in array
XXX: Looking at iface FastEthernet3/0/13
XXX: line 'FastEthernet3/0/13 unassigned YES unset down down' is down
XXX: FastEthernet3/0/13 not found in array
XXX: Adding FastEthernet3/0/13 to ports array
XXX: Looking at iface FastEthernet3/0/14
XXX: line 'FastEthernet3/0/14 unassigned YES unset down down' is down
XXX: FastEthernet3/0/14 not found in array
XXX: Adding FastEthernet3/0/14 to ports array
XXX: Looking at iface FastEthernet3/0/15
XXX: line 'FastEthernet3/0/15 unassigned YES unset up up' is up
XXX: FastEthernet3/0/15 not found in array
XXX: Looking at iface FastEthernet3/0/16
XXX: line 'FastEthernet3/0/16 unassigned YES unset down down' is down
XXX: FastEthernet3/0/16 not found in array
XXX: Adding FastEthernet3/0/16 to ports array
XXX: Looking at iface FastEthernet3/0/17
XXX: line 'FastEthernet3/0/17 unassigned YES unset down down' is down
XXX: FastEthernet3/0/17 not found in array
XXX: Adding FastEthernet3/0/17 to ports array
XXX: Looking at iface FastEthernet3/0/18
XXX: line 'FastEthernet3/0/18 unassigned YES unset up up' is up
XXX: FastEthernet3/0/18 not found in array
XXX: Looking at iface FastEthernet3/0/19
XXX: line 'FastEthernet3/0/19 unassigned YES unset down down' is down
XXX: FastEthernet3/0/19 not found in array
XXX: Adding FastEthernet3/0/19 to ports array
XXX: Looking at iface FastEthernet3/0/20
XXX: line 'FastEthernet3/0/20 unassigned YES unset up up' is up
XXX: FastEthernet3/0/20 not found in array
XXX: Looking at iface FastEthernet3/0/21
XXX: line 'FastEthernet3/0/21 unassigned YES unset down down' is down
XXX: FastEthernet3/0/21 not found in array
XXX: Adding FastEthernet3/0/21 to ports array
XXX: Looking at iface FastEthernet3/0/22
XXX: line 'FastEthernet3/0/22 unassigned YES unset down down' is down
XXX: FastEthernet3/0/22 not found in array
XXX: Adding FastEthernet3/0/22 to ports array
XXX: Looking at iface FastEthernet3/0/23
XXX: line 'FastEthernet3/0/23 unassigned YES unset down down' is down
XXX: FastEthernet3/0/23 not found in array
XXX: Adding FastEthernet3/0/23 to ports array
XXX: Looking at iface FastEthernet3/0/24
XXX: line 'FastEthernet3/0/24 unassigned YES unset up up' is up
XXX: FastEthernet3/0/24 not found in array
XXX: Looking at iface FastEthernet3/0/25
XXX: line 'FastEthernet3/0/25 unassigned YES unset up up' is up
XXX: FastEthernet3/0/25 not found in array
XXX: Looking at iface FastEthernet3/0/26
XXX: line 'FastEthernet3/0/26 unassigned YES unset down down' is down
XXX: FastEthernet3/0/26 not found in array
XXX: Adding FastEthernet3/0/26 to ports array
XXX: Looking at iface FastEthernet3/0/27
XXX: line 'FastEthernet3/0/27 unassigned YES unset up up' is up
XXX: FastEthernet3/0/27 not found in array
XXX: Looking at iface FastEthernet3/0/28
XXX: line 'FastEthernet3/0/28 unassigned YES unset down down' is down
XXX: FastEthernet3/0/28 not found in array
XXX: Adding FastEthernet3/0/28 to ports array
XXX: Looking at iface FastEthernet3/0/29
XXX: line 'FastEthernet3/0/29 unassigned YES unset up up' is up
XXX: FastEthernet3/0/29 not found in array
XXX: Looking at iface FastEthernet3/0/30
XXX: line 'FastEthernet3/0/30 unassigned YES unset down down' is down
XXX: FastEthernet3/0/30 not found in array
XXX: Adding FastEthernet3/0/30 to ports array
XXX: Looking at iface FastEthernet3/0/31
XXX: line 'FastEthernet3/0/31 unassigned YES unset down down' is down
XXX: FastEthernet3/0/31 not found in array
XXX: Adding FastEthernet3/0/31 to ports array
XXX: Looking at iface FastEthernet3/0/32
XXX: line 'FastEthernet3/0/32 unassigned YES unset down down' is down
XXX: FastEthernet3/0/32 not found in array
XXX: Adding FastEthernet3/0/32 to ports array
XXX: Looking at iface FastEthernet3/0/33
XXX: line 'FastEthernet3/0/33 unassigned YES unset up up' is up
XXX: FastEthernet3/0/33 not found in array
XXX: Looking at iface FastEthernet3/0/34
XXX: line 'FastEthernet3/0/34 unassigned YES unset up up' is up
XXX: FastEthernet3/0/34 not found in array
XXX: Looking at iface FastEthernet3/0/35
XXX: line 'FastEthernet3/0/35 unassigned YES unset down down' is down
XXX: FastEthernet3/0/35 not found in array
XXX: Adding FastEthernet3/0/35 to ports array
XXX: Looking at iface FastEthernet3/0/36
XXX: line 'FastEthernet3/0/36 unassigned YES unset down down' is down
XXX: FastEthernet3/0/36 not found in array
XXX: Adding FastEthernet3/0/36 to ports array
XXX: Looking at iface FastEthernet3/0/37
XXX: line 'FastEthernet3/0/37 unassigned YES unset down down' is down
XXX: FastEthernet3/0/37 not found in array
XXX: Adding FastEthernet3/0/37 to ports array
XXX: Looking at iface FastEthernet3/0/38
XXX: line 'FastEthernet3/0/38 unassigned YES unset down down' is down
XXX: FastEthernet3/0/38 not found in array
XXX: Adding FastEthernet3/0/38 to ports array
XXX: Looking at iface FastEthernet3/0/39
XXX: line 'FastEthernet3/0/39 unassigned YES unset down down' is down
XXX: FastEthernet3/0/39 not found in array
XXX: Adding FastEthernet3/0/39 to ports array
XXX: Looking at iface FastEthernet3/0/40
XXX: line 'FastEthernet3/0/40 unassigned YES unset up up' is up
XXX: FastEthernet3/0/40 not found in array
XXX: Looking at iface FastEthernet3/0/41
XXX: line 'FastEthernet3/0/41 unassigned YES unset down down' is down
XXX: FastEthernet3/0/41 not found in array
XXX: Adding FastEthernet3/0/41 to ports array
XXX: Looking at iface FastEthernet3/0/42
XXX: line 'FastEthernet3/0/42 unassigned YES unset down down' is down
XXX: FastEthernet3/0/42 not found in array
XXX: Adding FastEthernet3/0/42 to ports array
XXX: Looking at iface FastEthernet3/0/43
XXX: line 'FastEthernet3/0/43 unassigned YES unset down down' is down
XXX: FastEthernet3/0/43 not found in array
XXX: Adding FastEthernet3/0/43 to ports array
XXX: Looking at iface FastEthernet3/0/44
XXX: line 'FastEthernet3/0/44 unassigned YES unset down down' is down
XXX: FastEthernet3/0/44 not found in array
XXX: Adding FastEthernet3/0/44 to ports array
XXX: Looking at iface FastEthernet3/0/45
XXX: line 'FastEthernet3/0/45 unassigned YES unset up up' is up
XXX: FastEthernet3/0/45 not found in array
XXX: Looking at iface FastEthernet3/0/46
XXX: line 'FastEthernet3/0/46 unassigned YES unset up up' is up
XXX: FastEthernet3/0/46 not found in array
XXX: Looking at iface FastEthernet3/0/47
XXX: line 'FastEthernet3/0/47 unassigned YES unset down down' is down
XXX: FastEthernet3/0/47 not found in array
XXX: Adding FastEthernet3/0/47 to ports array
XXX: Looking at iface FastEthernet3/0/48
XXX: line 'FastEthernet3/0/48 unassigned YES unset down down' is down
XXX: FastEthernet3/0/48 not found in array
XXX: Adding FastEthernet3/0/48 to ports array
XXX: Looking at iface GigabitEthernet3/0/1
XXX: line 'GigabitEthernet3/0/1 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet3/0/1 not found in array
XXX: Looking at iface GigabitEthernet3/0/2
XXX: line 'GigabitEthernet3/0/2 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet3/0/2 not found in array
XXX: Looking at iface GigabitEthernet3/0/3
XXX: line 'GigabitEthernet3/0/3 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet3/0/3 not found in array
XXX: Looking at iface GigabitEthernet3/0/4
XXX: line 'GigabitEthernet3/0/4 unassigned YES unset administratively down down' is admin down
XXX: GigabitEthernet3/0/4 not found in array
XXX: Looking at iface EBN-23002-3#
XXX: Line 'EBN-23002-3#' is not valid

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

I believe this version will fix the problem.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

I've attached the output for that one.

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

It's working, but you'll either need to wait for tomorrow, or load the dat file you attached to this thread a few days ago to see ports get shutdown.  In the meantime, where is the script with all debugging removed and the original ED line restored.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

The original script is still on the switch. I loaded the old .bat file but it didn't disable the ports. So I will wait until tomorrow to see what happens. Should I take all but the original script off the switch or can I leave the debugging script with the XXX outputs on there?

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

If you take the latest script with the XXX code, copy .dat file from a few days ago, and run the script, the ports should shutdown.  Alternatively, you can load the latest script I just sent with all of the debugging removed, wait until tomorrow, and all of the down ports should be shutdown.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

Ok. I copied the .dat from a few days ago and ran the XXX script and got this in the log but still didn't shut down. I will load the script that you just posted and wait until tomorrow unless this output tells you anything:

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet3/0/9 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/20 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/21 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet3/0/47 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/22 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet3/0/48 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/23 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/25 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/26 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/27 since it was last used on Tue Oct 12 00:00:01 guam 2010

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/28 since it was last used on Tue Oct 12 00:00:01 guam 2010

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

I just checked the log and go this: It looks like its trying to disable the ports but it doesn't.

Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet3/0/9 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/20 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/21 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet3/0/47 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/22 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet3/0/48 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/23 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/25 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/26 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/27 since it was last used on Tue Oct 12 00:00:01 guam 2010
Oct 16 10:03:37: %HA_EM-6-LOG: tm_suspend_ports4.tcl: Shutting down port FastEthernet2/0/28 since it was last used on Tue Oct 12 00:00:01 guam 2010

Cisco Employee

Re: Shutdown Ports not in use for a while with EEM Tcl

Re-enable "debug event manager tcl cli", test the script, and post the output.

New Member

Re: Shutdown Ports not in use for a while with EEM Tcl

Here it is: This is just a snippit. I was going to take out the {} but I didn't want to screw up the script.

Oct 16 10:54:20: %HA_EM-6-LOG: tm_suspend_ports4.tcl : DEBUG(cli_lib) : IN : EBN-23002-3(config)#{interface FastEthernet2/0/27} shut

Oct 16 10:54:20: %HA_EM-6-LOG: tm_suspend_ports4.tcl : DEBUG(cli_lib) : OUT : ^

Oct 16 10:54:20: %HA_EM-6-LOG: tm_suspend_ports4.tcl : DEBUG(cli_lib) : OUT : % Invalid input detected at '^' marker.

Oct 16 10:54:20: %HA_EM-6-LOG: tm_suspend_ports4.tcl : DEBUG(cli_lib) : OUT :

Oct 16 10:54:20: %HA_EM-6-LOG: tm_suspend_ports4.tcl : DEBUG(cli_lib) : OUT : EBN-23002-3(config)#

Oct 16 10:54:20: %HA_EM-6-LOG: tm_suspend_ports4.tcl : DEBUG(cli_lib) : IN : EBN-23002-3(config)#{interface FastEthernet2/0/28} shut

Oct 16 10:54:20: %HA_EM-6-LOG: tm_suspend_ports4.tcl : DEBUG(cli_lib) : OUT : ^

Oct 16 10:54:20: %HA_EM-6-LOG: tm_suspend_ports4.tcl : DEBUG(cli_lib) : OUT : % Invalid input detected at '^' marker.

2880
Views
75
Helpful
47
Replies
CreatePlease to create content