Service Manual

script execute script-name [start {at date-time | after time}] [stop {at date-
time | after time}] [watch] [arguments arg[..arg]] [username username]
Following example shows the script execution at 22:22 (FTOS clock time) and stops after 15 minutes:
Dell(conf)#script execute monitor_status.pl start at 22:22 stop after 15 watch
args "Te 0/4"
Use the keyword watch to monitor the script. If the script execution terminates before 10 minutes, the
system reruns the script.
Executing a script based on event trigger.
Define an event to trigger scripts to run by a log event (for example, SYSLOG in Dell Networking OS), a
time-based event, or when CPU or memory usage reaches a predetermined percentage. The script runs in
the background.
CONFIGURATION mode
script trigger-event event-name {log-event [{tag—or—ex tags | tag-and-ex tags}]
[severity severity level]} | time-event {[start {at date-time | after time}]
[stop {at date-time | after time | count number}] [interval time] [weekday day]
[ month month] [monthday nday]} | cpu-usage percentage | mem-usage percentage}
Following example shows the event to trigger a script at 22:22 and then triggers every Monday midnight
and stops at 02:02–11/10/14:
Dell(conf)#script trigger-event Event2 time-event start at 22:22 stop at
02:02-11/10/14 weekday mon
Following example shows the event triggering the script after the cpu-usage reaches 30%:
Dell(conf)#script trigger-event event1 cpu-usage 30
Following example shows how you can define the event to trigger a script when a SYSLOG event with the
OSTATE_UP pattern occurs:
Dell(conf)#script trigger-event Port_State_Event log-event tag tag-regex
"OSTATE.*up"
Following example shows how you can define the event to trigger a script even if any one of the pattern is
matched:
Dell(conf)#script trigger-event Server_Reporter_Event log-event tag tag-or-ex
"Major alarm" "Minor alarm"
Schedule a script to run based on defined events.
Schedule a script to provide mapping between the scripts and trigger-events.
CONFIGURATION mode
script event—handler event-name
Following snippet triggers the script at 22:22 and then triggers every monday midnight and stops at
02:02-11/10/14:
Dell(conf)#script trigger-event Event2 time-event start at 22:22 stop at
02:02-11/10/14 weekday mon
Dell(conf)#script event-handler handler1
Dell(conf-screvt-handler)#execute Report_server.tcl args 4
Dell(conf-screvt-handler)#triggered-by Event2
Dell(conf-screvt-handler)#no disable
Smart Scripting 98