EEM TCL cli_read_line returns whole output

I'm writing a script that excutes some show commands with cli_write, the idea is to use cli_read_line to parse output one line at time, then using cli_read_drain after done reading the results of interest.
However, cli_read_line always returns the entire command output, potentially thousands of characters. In other words, it behaves same as cli_read.
That is slowing down and complicating the script. Using IOS 15.1(4)M1.
Is there a way to make cli_read_line work as per documentation ?

Unfortunately, the cli_read* functions are not non-blocking, and thus cli_read_line will not work the way you want.  I'm pushing to add more true send/expect like functionality to the cli_lib functions in a future release of EEM.  In the meantime, you might try:
cli_read_pattern $fd ".*"
To read anything.  Then parse the return into lines and iterate over them.  I had to do something similar in my EASy Remote Command shell tool to get around the limitations in cli_read_line.

Similar Messages

  • EEM TCL script configuration issue

    Hi Experts,
    I need help with an EEM TCL script for the CRS platform that generates a SYSLOG message after the CPU reaches a threshold value and then stays over the threshold value for 15 minutes, I've already tryied several thing and the last TCL script that I tested generated the SYSLOG message when the CPU reaches the threshold but I can't seem to find any way to make it wait the 15 min over the threshold and then generate the message.
    My current script looks like this:
    ::cisco::eem::event_register_wdsysmon timewin 900 sub1 cpu_tot op ge val 70
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    array set event_details [event_reqinfo]
    action_syslog msg "sub1 is $event_details(sub1)"
    action_syslog msg "High CPU threshold value over 70%"
    puts ok
    I've tryied using the 'period' option for the 'cpu_tot' variable but the TCL script was'nt recognized and couldn't be registered, and I'm using the 'timewin' option here but it seems to be wrong as it says it's the time it has for multiple sub-events to ocurr in order for the script to execute.
    timewin
    (Optional) Time window within which all of the subevents have to occur in order for an event to be generated and is specified in SSSSSSSSSS[.MMM] format. SSSSSSSSSS format must be an integer representing seconds between 0 and 4294967295 inclusive. MMM format must be an integer representing milliseconds between 0 and 999).
    Also, the 'period' option I believe wouldn't have worked because I understand that it referrs to the time period that the script will take to monitor the CPU:
    •1. cpu_tot [op gt|ge|eq|ne|lt|le] [val ?] [period ?]
    op
    (Optional) Comparison operator that is used to compare the collected total system CPU usage sample percentage with the specified percentage value. If true, an event is raised.
    val
    (Optional) Percentage value in which the average CPU usage during the sample period is compared.
    period
    (Optional) Time period for averaging the collection of samples and is specified in SSSSSSSSSS[.MMM] format. SSSSSSSSSS format must be an integer representing seconds between 0 and 4294967295, inclusive. MMM format must be an integer representing milliseconds between 0 and 999. If this argument is not specified, the most recent sample is used.
    As I said, I couldn't try this because the script send an error when I tried to register using the following line:
    ::cisco::eem::event_register_wdsysmon sub1 cpu_tot op ge val 70 period 900
    This is the error message that appeared:
    RP/0/RP0/CPU0:CRS(config)#event manager policy test.tcl username cisco
    RP/0/RP0/CPU0:CRS(config)#commit
    Thu Aug 29 12:35:43.569 CDT
    % Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed' from this session to view the errors
    RP/0/RP0/CPU0:CRS(config)#sh conf fail
    Thu Aug 29 12:35:52.427 CDT
    !! SEMANTIC ERRORS: This configuration was rejected by
    !! the system due to semantic errors. The individual
    !! errors with each failed configuration command can be
    !! found below.
    event manager policy test.tcl username cisco persist-time 3600
    !!% Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy test.tcl
    end
    Anyway, to make this work I understand that I need nested TCL scripts that do the following:
    •1. Monitor the CPU and when it reaches the threshold install another TCL policy that counts down 15 min.
    •2. If the second TCL policy reaches zero then it should generate the SYSLOG message.
    •3. Monitor the CPU while this is running and if it falls below the threshold it should stop the second TCL policy.
    I don't know how I can acomplish this so if anyone can help me with this or show me another way to do this I would really appreciate it.
    Thanks in advance for all your help!

    Neither option is likely to do what you want.  The timewin is for correlating multiple events, and period is the polling interval.  What you want is to create a timer when the CPU is first detected as being high, countdown 15 minutes, then alert you.  You can do this with a nested EEM policy.  For example, you can add the following to your existing policy:
    proc get_pol_dir { fd } {
        set res {}
        set output [cli_exec $fd "show event manager directory user policy"]
        set output [string trim $output]
        regsub -all "\r\n" $output "\n" result
        set lines [split $result "\n"]
        foreach line $lines {
            if { $line == "" } {
                continue
            if { ! [regexp {\s} $line] && ! [regexp {#$} $line] } {
                set res $line
                break
        if { $res == {} } {
            return -code error "The user policy directory has not been configured"
        return $res
    if { [catch {cli_open} result] } {
        error $result $errorInfo
    array set cli $result
    set output [cli_exec $cli(fd) "show event manager policy registered | inc tm_alert_high_cpu.tcl"]
    if { [regexp {tm_alert_high_cpu.tcl} $output] } {
        exit 0
    set poldir [get_pol_dir $cli(fd)]
    set polname "${poldir}/tm_alert_high_cpu.tcl"
    set fd [open $polname "w"]
    puts $fd "::cisco::eem::event_register_timer countdown time 900"
    puts $fd "namespace import ::cisco::eem::*"
    puts $fd "namespace import ::cisco::lib::*"
    puts $fd "action_syslog msg \"CPU has been over 70% for 15 minutes\""
    close $fd
    cli_exec $cli(fd) "config t"
    cli_exec $cli(fd) "event manager policy tm_lert_high_cpu.tcl username eem"
    cli_exec $cli(fd) "commit"
    cli_exec $cli(fd) "end"
    catch {cli_close $cli(fd) $cli(tty_id)}
    Additionally, you'll want another permanently configured policy that checks for a low CPU threshold.  Something like:
    ::cisco::eem::event_register_wdsysmon sub1 cpu_tot op le val 10
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    if { [catch {cli_open} result] } {
        error $result $errorInfo
    array set cli $result
    cli_exec $cli(fd) "config t"
    cli_exec $cli(fd) "no event manager policy tm_alert_high_cpu.tcl"
    cli_exec $cli(fd) "commit"
    cli_exec $cli(fd) "end"
    catch {cli_close $cli(fd) $cli(tty_id)}

  • EEM-TCL Script to switch config from interface X to interface Y

    Hello Guys,
    I’m trying to create a script which is controlled by an EEM-UPDOWN event of an interface. What I’m trying to do is, if interface X is down for some reason it should copy the interface configuration to interface Y.
    So my problem is I’m very new to eem-tcl scripting and I have some basic problem hopefully u can help me =) I’m working on a ASR9K !
    So what i have done so fare:
    ::cisco::eem::event_register_syslog occurs 1 pattern ".*CHANGED.*$_sat_1_link_1.*" maxrun 90   
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    array set arr_einfo [event_reqinfo]
    if {$_cerrno != 0} {
        set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
          $_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
        error $result
    if [catch {cli_open} result] {
        error $result $errorInfo
    } else {
        array set cli1 $result
    action_syslog priority emergencies msg "start script testv1_1"
    #puts "\nEXECUTE CLI COMAND :\n"
    set out {cli_exec $cli1(fd) "show running-config formal interface $_sat_1_link_1"}
    set xout [split $out \n]
    #puts "DEBUG : $xout \n\n"
    set anz [llength $xout]
    #puts "DEBUG : count rows = $anz \n\n"
    for {set ii "0"}  {$ii < $anz } {incr ii} {
           set indexout [lindex $out $ii]
        regexp  {([\w]+)[ ]([\w\d/]+)\s(.*)} $indexout a b c d
        #puts "\nDEBUG START"
        #puts "\nindex Nr  $ii"
        #puts "Full Match: $a"
        #puts "Sub Match1: $b"
        #puts "Sub Match2: $c"
        #puts "Sub Match3: $d"
        #puts "DEBUG END\n"
        set intsrc {cli_exec $cli1(fd) "no $b $_sat_1_link_1 $d"}
        set intdest {cli_exec $cli1(fd) "$b $_sat_1_link_2 $d"}
    if [catch {cli_exec $cli1(fd) "commit"} result] {
        error $result $errorInfo
    if [catch {cli_exec $cli1(fd) "end"} result] {
        error $result $errorInfo
    action_syslog priority emergencies msg "End script testv1_1"
    ps. $_sat_1_link_1 and $_sat_1_link_2 are globaly set per cli in the event manager env.
    Thanks for your help and hopefully u can help me with this script

    Hey
    after show running-config formal interface TenGigE 0/0/2/1 the cli output example is :
    interface TenGigE0/0/2/1 description Test: 0-43
    interface TenGigE0/0/2/1
    interface TenGigE0/0/2/1 shutdown
    and now i want to split the config with my regex
    regexp  {([\w]+)[ ]([\w\d/]+)\s(.*)} $indexout a b c d
    As example line 1
    set x= "TenGigE0/0/2/2"                  --> =dest_interface
    a= interface TenGigE0/0/2/1 description Test: 0-43
    b= interface
    c= TenGigE0/0/2/1
    d= description Test: 0-43
    do this
    cli_exec $cli1(fd) "no $b $c $d"      --->no interface TenGig E0/0/2/1 description Test: 0-43
    cli_exec $cli1(fd) " $b $x $d"          ---> interface TenGigE0/0/2/2 description Test: 0-43
    and from this point it shoud do this until there are no config lines  =)
    as a final result is should copy the whole config from interface X to interface Y  if the trigger is active
    but as i see, the main problem is to get the CLI output in a format like this
    set xy = interface TenGigE0/0/2/1 description Test: 0-43\ninterface TenGigE0/0/2/1\ninterface TenGigE0/0/2/1 shutdown
    or in an index like this:
    Index | command
    1         interface TenGigE0/0/2/1 description Test: 0-43
    2         interface TenGigE0/0/2/1
    3         interface TenGigE0/0/2/1 shutdown
    Thx

  • Stopping EEM/TCL script

    How can I stop a pending EEM/TCL script?  I have a Catalyst 4506 version 12.2(40)SG.  The command 'event manager scheduler clear' isn't available.  The output of 'show event manager policy pending' shows:
    No.  Time of Event             Event Type          Name
    1    Wed Mar 3  09:39:31 2010  none                script: test_err.tcl
    2    Wed Mar 3  10:56:42 2010  timer watchdog      script: free_mem.tcl
    3    Wed Mar 3  11:43:19 2010  syslog              applet: Login-Fail
    So the policies coming after the stuck policy won't run.  I've tried to un-register/re-register the policy, but it didn't help.

    If your device does not support "event manager scheduler clear" the only way to terminate a stuck, or long-running EEM policy is to reboot.

  • How to return whole number using round function

    hi
    can i get sql query using round function how to return whole number value

    Hi welcome to the forum. if you want whole number value what does it mean
    1. whether you want the whole number greator than or eqaul to that number example for 12.6 you want 12 or 13
    see below example
    1.  SQL> select round(12.5) from dual;
    ROUND(12.5)
             13
    2.  SQL> select round(12.4) from dual;
    ROUND(12.4)
             12
    3.  SQL> select floor(12.5) from dual;
    FLOOR(12.5)
             12
    4. SQL> select floor(12.4) from dual;
    FLOOR(12.4)
             12
    floor will always give you a round value which is a integer or whole number less than or equal to but output of rond will differ if the value is greator than 12.5 it will give 13 but if it is less than 12.5 it will give 12, so depending on your requirement you can choose which function to use. similarly if you always want to get the whole number greator than the number you can use ceil as below
    SQL>  select ceil(12.3) from dual;
    CEIL(12.3)
            13
    SQL>  select ceil(12.8) from dual;
    CEIL(12.8)
            13

  • Xbacklight returns 'No outputs have backlight property' on Sony laptop

    Laptop: Sony VAIO VGN-NW130D
    Graphics: Mobility Radeon HD 4500 Series
    WM: xmonad
    I am trying to get the two brightness adjustment keys on my laptop to work, which they currently they do not. To this end I want to map a xbacklight command to each of these keys.
    Problem: running xbacklight alone or with any arguments and options returns: No outputs have backlight property
    I read here that "it is a driver issue. The vesa and fglrx drivers simply do not support backlight setting. You may get better results from the radeon driver." (The OP is not me.)
    But I am using the Radeon driver (xf86-video-ati), so maybe this is not accurate. However I was using the fglrx driver before this, and the xf86-video-radeonhd driver before that. Is it possible that, even though I have now removed them, some trace of them remains, so that xbacklight mistakenly detects a driver with which it does not work? I closely followed ArchWiki's simple instructions when removing each driver before installing a new one.
    Additional info: I am currently using laptop-mode-tools to automatically set brightness upon startup. This is fine if I want a static (or at least not quickly adjustable) brightness, but I do not think there is any clean way to make it work with the Fn keys. laptop-mode-tools writes to /proc/acpi/video/VGA/LCD/brightness but I also have /sys/class/backlight/acpo_video0/brightness which would presumably work as well.
    Thank you for any help I have been eating neighborhood children in frustration.
    Last edited by error (2010-08-01 03:50:56)

    try with setpci command ( for eg  setpci -s $DEVICE F4.B=<your brightness level> device is your device bus id)

  • How can servlet return the output as html content with drawing picture?

    Does anybody know how can a servlet return the output as html content with drawing picture?
    The drawing picture is drawn at runtime by the servlet.

    Thanks, BalusC.
    But I am not sure if I understand your reply fully.
    From my understanding, you are telling me to first generate a html from a servlet with the image <IMG> tag pointing to a servlet which will be responsible to generate an image?
    For example, <IMG SRC="http://myserver/servlet/testservlet">
    Could you confirm this?

  • Returning no output (intentionally)

    Hi,
    I have a bi publisher report that generates pdf and is printed out automatically. The problem is that I want to be able to stop this from happening for some data. If I return empty xml a blank pdf file is generated which is no good so the only method I have found is to return false in a datatrigger (which means that the concurrent request gets an "error" status).
    My question is this; can I somehow make the concurrent request finish normally but return no output file?

    Try a differnt user account and see if the same thing applies.

  • How to register EEM Tcl script

    Hello,
    I've a EEM tcl script in bootflash. How to register EEM script. I did the following but it couldn't locate the script in bootflash.
    switch2(config)#event manager policy bootflash:eem-stuckcpu.tcl type user
    EEM configuration: policy file bootflash:eem-stuckcpu.tcl could not be found
    switch2(config)#
    switch2(config)#event manager policy eem-stuckcpu.tcl type user          
    EEM configuration: policy file eem-stuckcpu.tcl could not be found
    Thanks,
    /aa

    You need to configure:
    event manager directory user policy bootflash:
    Then use:
    event manager policy eem-stuckcpu.tcl

  • IP SLA EEM/Tcl Scripts

    Hello Community,
    I have been testing a EEM/Tcl scripts for IP SLA. However, after testing I realised that the script didn't go far enough in identifying the link(s) that has actually gone down.
    I was wondering if someone knows any good EEM/Tcl scripts for IP SLA?
    Cheers
    Carlton

    What about it doesn't work?  Is the policy not triggering?  Is the IPSLA operation not transitioning state?

  • EEM TCL Policies

    All,
    I am attempting to write a TCL based EEM policy to force users that entering config mode on the router to enter a ticket number from my company's service management platform, since any changes they make to a production system should be tied to either an incident or approved change.  I've got this working based on a TCL script I found on Cisco Beyond.  I utilize a product from Solarwinds (Network Configuration Manager or NCM) to make mass changes across my router install base.  I don't want the credentials that the NCM product uses to have to enter a ticket number as it complicates programming responses on that platform.  I can do it if necessary, but I was hoping there might be a way to make it so that if user "x" is entering config mode the TCL script could bypass the other actions and not prompt for a ticket number.  If this were not an EEM TCL policy I could simply perform an exec command to show users and parse the active line to get the username, then do a regexp match and if it were the NCM user set a flag and use if statements to bypass the other code.  But because it's an EEM TCL policy, exec is available to me, only cli_open, cli_exec, cli_close, which actually opens a new session to the router which negates my previous idea since it's not the actual session of the user that's trying to enter config mode that the show users command would be executing against.  If anyone has any other ideas on how I might do this I'd appreciate the feedback.  Thanks.
    Mike

    Joe,
    Thanks for the response.  I've added your example to the script (modifying for the NCM Username of course), but I'm getting an error I'm not sure how to handle.  The following is what I'm getting:
    invalid command name "*"
        while executing
        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 "system:/lib/tcl/base.tcl" line 50)
    Tcl policy execute failed: invalid command name "*"
    It seems to be trying the execute the wild card in the regular expression used in the cli_exec command.  I'm not familiar enough with TCL to debug this and figure out how to fix it.  If you have any ideas on the matter I'd appreciate it.  Your guidance would be most welcome.  Thanks.
    Mike

  • Cmdlet Get-AzureVMImageDiskConfigSet returns no output

    The cmdlet Get-AzureVMImageDiskConfigSet seems to return no output. The help shows:
    NAME
    Get-AzureVMImageDiskConfigSet
    SYNOPSIS
    This cmdlet returns an object for disk configuration set, which is from the input image context.
    SYNTAX
    Get-AzureVMImageDiskConfigSet [-ImageContext] <OSImageContext> [<CommonParameters>]
    DESCRIPTION
    This cmdlet returns an object for disk configuration set, which is from the input image context.
    PARAMETERS
    -ImageContext <OSImageContext>
    The VM image context.
    Required? true
    Position? 2
    Default value
    Accept pipeline input? true (ByValue, ByPropertyName)
    Accept wildcard characters? false
    <CommonParameters>
    This cmdlet supports the common parameters: Verbose, Debug,
    ErrorAction, ErrorVariable, WarningAction, WarningVariable,
    OutBuffer, PipelineVariable, and OutVariable. For more information, see
    about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
    INPUTS
    OUTPUTS
    Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet
    NOTES
    -------------------------- EXAMPLE 1 --------------------------
    C:\PS>Get-AzureVMImage -ImageName $img | Get-AzureVMImageDiskConfigSet
    I ran:
    Get-AzureVMImage | Get-AzureVMImageDiskConfigSet
    got nothing back.
    I ran:
    $OSImageContext = Get-AzureVMImage
    verified 276 objects received of TypeName: Microsoft.WindowsAzure.Commands.ServiceManagement.Model.OSImageContext which is what the cmdlet Get-AzureVMImageDiskConfigSet  is expecting..
    Tried:
    $OSImageContext = Get-AzureVMImage
    Get-AzureVMImageDiskConfigSet -ImageContext $OSImageContext[0] -Verbose -Debug
    still getting nothing..
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable)

    nope
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • 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

    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?

  • Help with EEM TCL / CLI scripting for re-direction/wccp counters

    Being new with EEM scripting I wanted to see if I was on the right track and get some help to finish my idea.
    Our problem I am trying to fix is our remote sites utilize pairs of Cat3650's for some routing and WCCP redirection.  We are encountering ACL denial issues causing slow down and access issues.  The fix for the issue we remove the WCCP service groups to break peering with our wan optimizers and re-insert the configuration thus re-establishing peering and restoring service.
    My idea is to use a TCL scipt on a watchdog timer to parse the "sh ip wccp | inc denied (or unassign)" output for denial and unassignable error counters.  If a counter is found I wanted to create a syslog message that would then kick off a simple EEM CLI script to remove the service groups, wait 10 seconds, then re-add the service groups.  Please point me in the right direction if I am off track as I am not sure if I can use the EEM CLI for all this or since I want to retreive specific info from the sh ip wccp output if I do need to utilize TCL.  I am also unsure if the "total denied" ascii string pulled via the "sh ip wccp | inc denied" will cause issues when attempting to just pull the counter information.
    sh ip wccp | inc Denied Red
            Total Packets Denied Redirect:       0
            Total Packets Denied Redirect:       0
    Script thus far :
    TCL
    if [catch {context_retrieve "EEM_WCCP_ERROR_COUNTER" "count"} result] {
    set wccpcounter 0
    } else {
    set wccpcounter $result
    } if [catch {cli_open} result] {
    error $result
    } else {
    array set cli $result
    } if [catch {cli_exec $cli(fd) "show ip wccp | incl Denied"} result] {
    error $result
    } else {
    set cmd_output $result
    set count ""
    catch [regexp {receive ([0-9]+),} $cmd_output} ignore count]
    set count
    set diff [expr $count - $wccpcounter]
    if {$diff != 0} {
    action_syslog priority emergencies msg "WCCP counters showing incremental Denied packet counts"
    if [catch {cli_close $cli(fd) $cli(tty_id)} result] {
    error $result
    context_save EEM_WCCP_ERROR_COUNTER count
    CLI
    event manager applet WCCP_COUNTER_WATCH
    event syslog priority emergencies pattern "WCCP counters showing incremental Denied packet counts"
    action 001 cli command "enable"
    action 002 cli command "config t"
    action 003 cli command "no ip wccp 61"
    action 004 cli command "no ip wccp 62"
    action 005 wait 10
    action 006 cli command "ip wccp 61"
    action 007 cli command "ip wccp 62"
    action 008 wait 15
    action 009 cli command "clear ip wccp"
    action 010 cli command "end"
    Thanks for all the help

    This won't work as EEM cannot intercept its own syslog messages.  However, I'm not sure why you need this form of IPC anyway.  Why not just make the Tcl script perform the needed CLI commands?
    And, yes, you could use all applets here.  But since you've written the hard stuff in Tcl already, it might be best just to add the missing calls to reconfigure WCCP to that script.

  • How to scp a file in 7600 using EEM/Tcl

    Hello All,
    I have a Tcl file on 7600 that produces a file, and I would like to copy this file to a server using scp.
    This is how the file looks like :
    ::cisco::eem::event_register_none maxrun 240
    #::cisco::eem::event_register_timer cron cron_entry "*/5 * * * *" maxrun 240
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    array set arr_einfo [ event_reqinfo ] ;
    if [ catch {cli_open} rc ] {
           error $rc $errorInfo
    } else {
           array set clifd $rc
    set          filename          "IOS7600.dat_12345" ;
    set     transfer        "copy disk0:/" ;        append transfer $filename ;     append  transfer " scp://username:password@ip:" ;
    if [ catch {cli_exec $clifd(fd) $transfer} rc ] {
            error $rc $errorInfo
    if [ catch {cli_close $clifd(fd) $clifd(tty_id)} rc ]  {
           error $rc $errorInfo
    The problem is that scp: hangs ! Could you please help me to work-around this ? What am I doing wrong ?
    Many Thanks.
    Kind Regards,
    Nikos

    An alternative would be to write an applet, like :
    event timer cron name PUSH-CoPP cron-entry "*/5 * * * *" maxrun 240
    to do the following command :
    set     transfer        "copy disk0:/" ;        append transfer $filename ;     append  transfer " scp://username:password@ip:" ;
    but how can I provide the filename, I could use a regexp like :
    *IOS7600*
    and then answer the related to scp dialog using action statements.
    Could you please help me with this please ?
    Many Thanks.
    Kind Regards,
    Nikos

Maybe you are looking for

  • While being idle online for a few minutes, why does Firefox start cyclically using 50% to 5% CPU resources, with a 10 to 1, hi to lo ratio

    This behavior became apparent after the last couple of Firefox version updates. Current Firefox version is 21.0. My PC is an IBM ThinkCentre running @ 3.0 Ghz Intel CPU with 1.5 Gigs PC3200 DDR ram. With or without any other Windows apps open, whethe

  • Error while installation of Java add-on with EP on ABAP

    Dear All, We are trying to install java add-on with EP on present ABAP system, but getting struck up with error as below at creating java users (sapjsf) in central instance installation phase. ENVIRONMENT: ECC6.0 WIN 2003 KERNEL 136 SUPPORT PACK LEVE

  • Material creation using IDOC

    Hi All We are trying to create a Material with just a Basic View using FM : IDOC_INPUT_MATMAS01, but we are unable to do the same since it returns errors about fields to be filled for other Material master views like Plant , Sales Organisation etc Ha

  • Deploy Forms and Reports with Load Balancing

    I am trying to determine what we need to install here. I have read OracleAS, Web Cache, Application Server, and Forms documents and have no answer still. We are currently run 9iAS with Forms and Reports 6i only. I did not do any of those installs. We

  • Help with Black Printing

    Recently moved from FH to AI (CS4/ v.14) and I'm having difficulty with simple printouts. 99% of what I need, is black and white (and grayscale) text/vectors output to your everyday office laser printer. Everything that is set to black (most of it) i