Service Manual

Sample script for dellsh in Python
#! /usr/pkg/bin/python
import os
os.system("dellsh '/usr/pkg/ss-scripts/dellsh.txt'")
Sample script for dellsh in Python for S3100 Series
#! /f10/flash/pkg/usr/pkg/bin/python
import os
os.system("dellsh '/f10/flash/pkg/ss-scripts/dellsh.txt'")
Dellsh can also be used as
Dell#script execute dellsh args /usr/pkg/ss-scripts/dellsh.txt
In S3100 Series, Dellsh can also be used as
Dell#script execute dellsh args /f10/flash/pkg/ss-scripts/dellsh.txt
Sample dellsh parser le
#! /usr/bin/dellsh
configure terminal
interface vlan 10
no shutdown
exit
interface loopback 10
ip address 10.10.10.10/24
end
do show vlan
show running | grep loopback
dellsyslog
A Dell proprietary utility which helps you in generating custom SYSLOGS with the congured severity.
Syntax: dellsyslog [-s <emergency|alert|critical|error|warning|notify|infor|debug|0–7>] {syslog
message}
The severity level maps as follows:
0 — emergency
1 — alert
2 — critical
3 — error
4 — warning
5 — notify
6 — infor
7 — debug
The default severity level is 6.
Sample script for dellsyslog in Python
#! /usr/pkg/bin/python
import sys
import os
print sys.argv[1]
os.system("dellsyslog -s %s 'The Syslog is generated by python'" %(sys.argv[1]))
Smart Scripting
71