Service Manual

package uninstall package-name
Enter the name of the Smart Scripting package exactly as it appears in the show packages list.
Dell Environment Variables
Dell Networking OS provides the following set of environment variables that you can access through scripts
(PERL, Python, Ruby, TCL, UNIX, and ZSH).
1 DELL_TRGEVT_NAME — gets the name of the Event that triggered the script.
2 DELL_TRGEVT_TYPE — displays the type of event that triggered the script. The event type can be
mentioned as follows:
Table 3. DELL_TRGEVT_TYPE Event and Environment Variable
Event DELL_TRGEVT_TYPE (Environment Variable)
cpu-usage CPU
log-event LOG EVENT
mem-usage MEMORY
time-event TIME EVENT
3 DELL_TRGEVT_LOGMSG — displays the log message that triggered the script. It prints a maximum of 256
characters.
4 DELL_TRGEVT_CPU — gets the CPU percentage that triggered the script.
5 DELL_TRGEVT_MEM — displays the memory usage that triggered the script.
Following is the sample script illustrating the use of environment variables:
#! /usr/bin/tclsh
set filename "/f10/flash/Log.txt"
set fileId [open $filename "a+"]
switch $env(DELL_TRGEVT_TYPE) {
"TIME EVENT" {
set data "Sending Mail : The triggered Event $env(DELL_TRGEVT_NAME)
is Time Event - Reload Started"
}
"LOG EVENT" {
set data "Sending Mail : Triggered Event is $env(DELL_TRGEVT_NAME)
BPDU Guard Initiated , Port will recover once it is out of Error Disable State \n"
set data [concat $data "Attching the Log Message :
$env(DELL_TRGEVT_LOGMSG)"]
}
"CPU" {
set data "Sending Mail : Triggered Event is $env(DELL_TRGEVT_NAME)
CPU Limits crossed - Sending CPU Usage Analyser Report. The CPU Percentage at
which Script got Triggered is $env(DELL_TRGEVT_CPU)"
}
Smart Scripting 86