Power Control

The Power Control page allows you to enable or disable the power control feature via the serial port on the back panel of your . You can also specify the login script of your power control device, if it requires a login script.

After you have made all modifications, click Store Settings to save your settings and then hit Apply Settings/Restart Servers to validate these new settings. Every change you have made on this page will NOT apply until you hit Apply Settings/Restart Servers!   

 

Enable Power Control through the Serial Interface

Check the Enabled option to activate the remote power control support feature of the back panel serial port of the . Once this option is checked, a subsequent Power Device Login option will appear for you to decide whether to enter the login script.

Simple Users Can Control Power

Check this box if you want that simple users be able to power on and power off the computers.

Power Device Login

Depending on the Serial Power control device you used behind , sometimes you will need a login script to login or initialize your power control device. If that is the case, just check the Power Device Needs a Login option, and a Login Dialog field will appear for you to enter your login script.

Login Dialog (chat style)

This editable field is where you should enter the login script for your power control device, if it is required by your power control device. You should refer to the user guide of your power control device for correct information. A script consists of one or more "expect-send" pairs of strings, separated by spaces as in the following example:

login: myid
password: mypass

This script indicates that the should expect the string "login:". Once it received "login:" prompt the will send the string "myid" and then expect the prompt "password:". When it receives the prompt for the password, it will send the password "mypass". A carriage return is normally sent following the reply string. It is not expected in the expect string unless it is specifically requested by using the \r character sequence.

If the script must start by sending something instead of waiting for an expect string, use the null sequence '' (two quotes with no space in between) as expect string:

'' restart
login: myid
password: mypass

In other words send "restart", expect "login:", send "myid", expect "password", send "mypass".

The expect sequence should contain only what is needed to identify the string. For example, to help correct for characters which may be corrupted during the initial sequence, look for the string "ogin:" rather than "login:". It is possible that the leading "l" character may be received in error and you may never find the string even though it was sent by the power device. For this reason, the script should look for "ogin:" rather than "login:" and "ssword:" rather than "password:" like this:

ogin: myid
ssword: mypass

In other words, expect "ogin:", send "myid", expect "ssword:", send "mypass".

A comment is a line which starts with the # (hash) character in column 1. Such comment lines are just ignored. If a '#' character is to be expected as the first character of the expect sequence, you should quote the expect string. If you want to wait for a prompt that starts with a # (hash) character, you would have to write something like this:

# Now wait for the prompt and send "logout"
'# ' logout

 

ESCAPE SEQUENCES:

The expect and reply strings may contain escape sequences. All of the sequences are legal in the reply string. Many are legal in the expect. Those which are not valid in the expect sequence are so indicated.

'' Expects or sends a null string. If you send a null string then it will still send the return character. This sequence may either be a pair of apostrophe or quote characters.

\b represents a backspace character.

\c Suppresses the newline at the end of the reply string. This is the only method to send a string without a trailing return character. It must be at the end of the send string. For example, the sequence hello\c will simply send the characters h, e, l, l, o. (not valid in expect.)

\d Delay for one second. (not valid in expect.)

\n Send a newline or linefeed character.

\N Send a null character. The same sequence may be represented by \0. (not valid in expect.)

\p Pause for a fraction of a second. The delay is 1/10th of a second. (not valid in expect.)

\r Send or expect a carriage return.

\s Represents a space character in the string. This may be used when it is not desirable to quote the strings which contains spaces. The sequence 'HI TIM' and HI\sTIM are the same.

\t Send or expect a tab character.

\\ Send or expect a backslash character.

 

To get more detailed information refer to the Linux chat program man page (man 8 chat).

Back to top