04-23-2020 11:06 PM
Hello everyone
I have a problem on one of my network devices - about once a week or two it reboots (have a SR for that already). But another suspicicious thing - is that all my scripts are partly cleared after every reboot. For example - i have all variables like $_cli_result out, some my "puts" actions doesn't work. Anyone ever had the same situation? Is that a normal behaviour? All the other config is not affected. Please advise.
04-24-2020 03:25 PM
post the EEM script and explain what is missing after reboot ?
04-24-2020 10:58 PM
Hello Balaji
I have several similar scripts. Here is the one, for example:
event manager applet SHOW_BRAS authorization bypass
description This script shows brief diagnostics of bras services condition
event cli pattern "showbras" enter
action 0.2 if $_cli_privilege eq "15"
action 1.1 cli command "enable"
action 1.2 cli command "show clock"
action 1.3 puts "\012 CURRENT TIME: \012 \012 $_cli_result"
action 1.4 cli command "show subscriber session | include Total|pending|Mean"
action 1.5 puts "\012 SESSIONS: Total == 22-23k, Pending < 10, Mean per minute < 100 \012 \012 $_cli_result"
action 1.6 cli command "show subscriber session | i 00:00:0"
action 1.7 puts "\012 SESSIONS: Look if new sessions start \012 \012 $_cli_result"
action 1.8 cli command "show radius statistics | include Average response"
action 1.9 puts "\012 RADIUS STATISTICS: 1st column should be < 100 \012 \012 $_cli_result"
action 2.0 cli command "show aaa servers | include id|State:|Authen:|Author:|Account:"
action 2.1 puts "\012 RADIUS SERVERS STATE: Look for state UP and high timeouts rate \012 \012 $_cli_result"
action 2.2 cli command "show call admission statistics detailed | include Dropping"
action 2.3 puts "\012 CALL ADMISSION CONTROL: Should be Not Dropping \012 \012 $_cli_result"
action 2.4 cli command "show interfaces po1 | include errors"
action 2.5 puts "\012 ERRORS ON UPLINK: \012 \012 $_cli_result"
action 2.6 wait 3
action 2.7 cli command "show interfaces po1 | include errors"
action 2.8 puts "\012 ERRORS ON UPLINK AFTER 3 SECONDS: \012 \012 $_cli_result"
action 2.9 cli command "show logging | include LINK-3-UPDOWN"
action 3.0 puts "\012 PORTS DOWN IN LOGS: \012 \012 $_cli_result"
action 3.1 cli command "end"
action 6.0 else
action 6.1 file open report bootflash:Unauth_Script_Usage.txt a
action 6.2 file puts report "$_cli_username, $_cli_privilege, showbras, $_event_pub_time"
action 6.3 file close report
action 7 end
And here is how it looks like after every reboot:
event manager applet SHOW_BRAS authorization bypass
description This script shows brief diagnostics of bras services condition
event cli pattern "showbras" enter
action 0.2 if $_cli_privilege eq "15"
action 1.1 cli command "enable"
action 1.2 cli command "show clock"
action 1.4 cli command "show subscriber session | include Total|pending|Mean"
action 1.6 cli command "show subscriber session | i 00:00:0"
action 1.8 cli command "show radius statistics | include Average response"
action 2.0 cli command "show aaa servers | include id|State:|Authen:|Author:|Account:"
action 2.2 cli command "show call admission statistics detailed | include Dropping"
action 2.4 cli command "show interfaces po1 | include errors"
action 2.6 wait 3
action 2.7 cli command "show interfaces po1 | include errors"
action 2.9 cli command "show logging | include LINK-3-UPDOWN"
action 3.1 cli command "end"
action 6.0 else
action 6.1 file open report bootflash:Unauth_Script_Usage.txt a
action 6.2 file puts report "$_cli_username, $_cli_privilege, showbras, $_event_pub_time"
action 6.3 file close report
action 7 end
So i`ve got all the line with "puts" missing. But it only happens with puts if it is set to show info on the screen and contains variable. For example - other scripts lines with puts in file (like - action 6.2 file puts report "$_cli_username, $_cli_privilege, showbras, $_event_pub_time") or puts with plain text (like - action 85 puts "The file $filename is successfully transfered to TFTP") - remained the same.
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