Service Manual
NOTE: For information about running a script directly from a UNIX shell without using the Dell 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 Networking OS CLI or directly from a NetBSD
shell on the switch.
For more information about running a script from the Dell 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 Networking OS.
• The rst bold line shows logging in to a UNIX shell.
• The second bold line lists the existing scripts.
• The third bold line executes the Perl script using either command
• The forth bold line executes the Python script using either command
Dell# start shell
4.4 BSD UNIX () (ttyp0)
login: admin
Password:
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.
$ cd /f10/flash/scripts
$ ls
createVlans.pl createVlans.py createVlans.sh
$ ./createVlans.pl 12 14
$ perl createVlans.pl 12 14
$ ./createVlans.py 12 14
$ python createVlans.py 12 14
$ ./createVlans.sh 12 14
Smart Scripting
81