cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
292
Views
0
Helpful
9
Replies

EEM script term len 0 not working with it?

Sunny5
Level 1
Level 1

I have a script where i'm running multiple commands and displaying it on the CLI session but am trying to just have the script without repeatedly pressing space which is why i have term len 0 at the start. However it doesn't seem to recognize the term len 0 command when i put it before enable or after enable in my script

action 10.0 cli command "enable"
action 11.0 cli command "term len 0"
action 12.0 cli command "sh arp"
action 12.1 puts '$_cli_result'

action 13.0 cli command "sh int trunk"
action 13.1 puts '$_cli_result'
action 14.0 cli command "sh power in"
action 14.1 puts '$_cli_result'

action 15.0 cli command "show logging | tail # 100"
action 15.1 puts '$_cli_result'

action 16.0 cli command "term len 40"

9 Replies 9

balaji.bandi
Hall of Fame
Hall of Fame

what is the device model, and what IOS Code running on it.

i tried before this works :

action 10 cli command "term length 0"

 can you post full eem script, and run manually by enable the debug.

BB

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

How to Ask The Cisco Community for Help

Cisco IOS XE Software, Version 17.09.04a
cisco 9200L switch

when i try to debug i use the commands debug event manager all, and i've also entered the terminal monitor command but dont see any debugging output

That means the EEM applet not even registered looks for me

can you post full EEM here.

check troubleshooting guide :

https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-xe-16/217013-troubleshoot-and-test-eem-scripts.html

check sample EEM script with terminal length 0

https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-xe-16/216091-best-practices-and-useful-scripts-for-ee.html

 

BB

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

How to Ask The Cisco Community for Help

event manager applet InfoGather
event none

action 10.0 cli command "enable"
action 11.0 cli command "term len 0"
action 12.0 cli command "sh arp"
action 12.1 puts '$_cli_result'

action 13.0 cli command "sh int trunk"
action 13.1 puts '$_cli_result'
action 14.0 cli command "sh power in"
action 14.1 puts '$_cli_result'

action 15.0 cli command "show logging | tail # 100"
action 15.1 puts '$_cli_result'

action 16.0 cli command "term len 40"

 

this is my full script

Not sure we missing someting :

cat 9300 17.6.5

event manager applet InfoGather authorization bypass
event none
action 10.0 cli command "enable"
action 11.0 cli command "terminal length 0"
action 12.0 cli command "show interfaces status | redirect flash:int1.txt"
action 16.0 cli command "terminal length 40"

works as expected.

May 1 15:43:05.591: check_eem_cli_policy_handler: command_string=action 11.0 cli command "terminal length 0"
May 1 15:43:05.868: check_eem_cli_policy_handler: command_string=action 12.0 cli command "show interfaces status | redirect flash:int1.txt"
May 1 15:43:06.582: check_eem_cli_policy_handler: command_string=action 16.0 cli command "terminal length 40"

#show event manager history events
No. Job Id Proc Status Time of Event Event Type Name
2 125 Actv success Wed May 1 16:37:44 2024 none applet: InfoGather

BB

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

How to Ask The Cisco Community for Help

May 1 15:43:05.591: check_eem_cli_policy_handler: command_string=action 11.0 cli command "terminal length 0"
May 1 15:43:05.868: check_eem_cli_policy_handler: command_string=action 12.0 cli command "show interfaces status | redirect flash:int1.txt"
May 1 15:43:06.582: check_eem_cli_policy_handler: command_string=action 16.0 cli command "terminal length 40"

was this in your debug output? 

if so can i ask what commands you used to display the debug output?

yes that is debug

there are many debug commands on terminal monitor (just posted what is relavant here)

i can see the file in my flash have all information interface status - just did testing to confirm.

debug event manager all

BB

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

How to Ask The Cisco Community for Help

Switch#debug embedded event manager action cli

Run this debug share result 

MHM

im not sure why but when i do terminal monitor and then debug even manager action cli followed by running the eem scipt i get the results of my script however i don't see any debug output on the session