Setup Guide
scripts until the system resource usage returns to nominal levels. The following example suspends the scripts when the CPU crosses
70, memory usage is above 60, or the disk I/O is greater than 70.
DellEMC(conf)#switch script limit cpu 70 mem 60 diskio 70
NOTE: For disk I/O, the /usr/pkg partition disk usage is considered.
• To suspend a currently running script, use the script stop command.
DellEMC#script stop script-name admin.pl
• To resume suspended script, use the script resume command.
DellEMC#script resume job-id 0
• To clear the supervised script that is in blocked state, use the script clear command.
DellEMC#script clear script-name args.pl
• To clear all the watch blocked state scripts, use the script clear all command.
DellEMC#script clear all
• To terminate a script that is running, use the script kill command.
DellEMC#script kill script-name admin.pl
• To terminate all the scripts that are running, use the script kill all command.
DellEMC#script kill all
• To unschedule an EXEC mode script, that is scheduled to run later, use the script unschedule command.
DellEMC#script unschedule job-id 4
NOTE: For information about running a script directly from a UNIX shell without using the Dell EMC Networking OS CLI,
see Running a Script from the UNIX Shell.
Viewing Script Information
To view information on currently stored, scheduled, and running SmartScripts, use the following commands.
• Display a list of stored les in the script path. To show the detail output of the le, enter detail.
EXEC Privilege mode
show script file [detail]
• Display a list of scripts that are scheduled or running. To display the detailed status of the scripts, enter detail.
EXEC Privilege mode
show script process [detail]
• Display a list of supervised scripts that are scheduled or running. To display the detailed status of the supervised scripts, enter detail.
EXEC Privilege mode
show script watch [detail]
Running a Script from the UNIX Shell
You can run any Perl, Python, Ruby, and UNIX script stored on a switch from either the Dell EMC Networking OS CLI or directly from a
NetBSD shell on the switch.
For more information about running a script from the Dell EMC Networking OS CLI, see Scheduling Time / Event-based Scripts.
1 When you run a script from a UNIX shell, rst access the shell using the start shell command.
2 You are prompted to enter a user name and password congured with the username command.
For more information, see Creating a User Name and Password for Smart Scripting.
The following shows examples of how to execute a Perl, Python, and UNIX shell script directly from a NetBSD shell on Dell EMC
Networking OS.
Smart Scripting
85