Tripp Lite 0 Idades Manual
Here you can view all the pages of manual Tripp Lite 0 Idades Manual. The Tripp Lite manuals for Switch are available online for free. You can easily download all the documents as PDF.
Page 211
211 Chapter 15: Advanced Configuration Console Servers run the embedded Linux operating system. So Administrato\ r class users can configure the Console Server and monitor and manage attached serial console and host devices from the com\ mand line using Linux commands and the config utility (as described in Chapter 14). The Linux kernel in the Console Server also supports GNU bash shell scri\ pt enabling the Administrator to run custom scripts. This chapter presents a number of useful scripts and...
Page 212
212 Chapter 15: Advanced Configuration 15.1.2 Running custom scripts when alerts are triggered Whenever an alert gets triggered, specific scripts get called. These s\ cripts all reside in /etc/scripts/. Below is a list of the default scripts that get run for each applicable alert: • For a connection alert (when a user connects or disconnects from a port \ or network host): /etc/scripts/portmanager-user-alert (for port connections) or /etc/scripts/sdt-user-alert (for host connections) • For a signal...
Page 213
213 Chapter 15: Advanced Configuration 15.1.3 Example script - Power cycling on pattern match If for example we had an RPC (PDU) connected to port 1 on a Console Se\ rver and also have some telecommunications device connected to port 2 and which is powered by the RPC outlet 3. Now assume\ the telecom device transmits a character stream "EMERGENCY" out on its serial console port every time that it encounters\ some specific error, and the only way to fix this error is to power cycle the...
Page 214
214 Chapter 15: Advanced Configuration 15.1.5 Deleting configuration values from the CLI The delete-node script is provided to help with deleting nodes from the command line. T\ he "delete-node" script takes one argument, the node name you want to delete (e.g. "config.users.user1" or "config.sdt.hosts.host1"). So delete-node is a general script for deleting any node you desire (users, groups, h\ osts, UPS's etc) from the command line. The script deletes the specified node...
Page 215
215 Chapter 15: Advanced Configuration TOTAL=`config -g $TOTALNODE | sed 's/.* //'` NEWTOTAL=$[ $TOTAL -1 ] # Make backup copy of config file cp /etc/config/config.xml /etc/config/config.bak echo "backup of /etc/config/config.xml saved in /etc/config/confi\ g.bak" if [ -z $NUMBER ] # test whether a singular node is being \ #deleted e.g. config.sdt.hosts then echo "deleting $1" config -d "$1" echo Done exit 0 elif [ $NUMBER = $TOTAL ] # Test if only one item...
Page 216
216 Chapter 15: Advanced Configuration elif [ $NUMBER -lt $TOTAL ] # more than one item exists then # Modify the users list so user numbers are sequential # by shifting the users into the gap one at a time... echo "Deleting $1" LASTFIELDTEXT=`echo $LASTFIELD | sed 's/[0-9]//g'` CHECKTOTAL=`config -g $ROOTNODE.$LASTFIELDTEXT$TOTAL` if [ -z "$CHECKTOTAL" ] then echo "WARNING: "$TOTALNODE" greater than number of items" fi COUNTER=1 while [ $COUNTER !=...
Page 217
217 Chapter 15: Advanced Configuration 15.1.6 Power cycle any device upon a ping request failure The ping-detect script is designed to run specified commands when a monitored host sto\ ps responding to ping requests. The first parameter taken by the ping-detect script is the hostname/ IP address of the device to ping. Any other par\ ameters are then regarded as a command to run whenever the ping to the host fails. ping-detect can run any number of commands. Below is an example using ping-detect to...
Page 218
218 Chapter 15: Advanced Configuration if [ "$COUNTER" -eq 5 ] then COUNTER=0 "$@" sleep 2s fi done 15.1.7 Running custom scripts when a configurator is invoked A configurator is responsible for reading the values in /etc/config/config.xml and making the appropriate changes live. Some changes made by the configurators are part of the Linux configuratio\ n itself such as user passwords or ipconfig. Currently there are nineteen configurators each one responsible for a \...
Page 219
219 Chapter 15: Advanced Configuration To check if the backup was saved correctly: # /etc/scripts/backup-usb list If this command does not display "* config-20May" then there was an error saving the configuration. The set-default command takes an input file as an argument and renames\ it to "default.opg". This default configuration remains stored on the USB disk. The next time you want to load the defau\ lt config, it will be sourced from the new default.opg file. To set a config...
Page 220
220 Chapter 15: Advanced Configuration 15.2 Advanced Portmanager The portmanger program manages the Console Server serial ports. It routes network conn\ ection to serial ports, checks permissions, and monitors and logs all the data flowing to/from the po\ rts. 15.2.1 Portmanager commands pmshell The pmshell command acts similar to the standard tip or cu commands, but all serial port access is directed via the portmanager. Example: To connect to port 8 via the portmanager: # pmshell -l port08 pmshell...