05-01-2024 07:30 AM
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"
05-01-2024 07:39 AM
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.
05-01-2024 07:45 AM
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
05-01-2024 07:53 AM
That means the EEM applet not even registered looks for me
can you post full EEM here.
check troubleshooting guide :
check sample EEM script with terminal length 0
05-01-2024 07:55 AM - edited 05-01-2024 08:19 AM
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
05-01-2024 08:49 AM
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
05-01-2024 09:23 AM
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?
05-01-2024 11:33 AM
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
05-01-2024 12:03 PM
Switch#debug embedded event manager action cli
Run this debug share result
MHM
05-01-2024 12:22 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide