You can open a virtual terminal to a partition remotely for maintenance purposes. This appendix describes how to connect to your HMC remotely.
The following script demonstrates one method for connecting to the HMC
remotely, by using telnet. To connect to the virtual terminal without
using the HMC Terminal Emulator, you must first build a connection
string. The following is an example of an ASCII string that is sent to
the HMC terminal server to establish a connection:
FFFX - connect and issue terminal open command
FFFF - connect but assume terminal is already open
Slots 1 to 16 are valid in Partition Standby mode only.
View the partition's properties to determine the partition slot number for a partition.
After the connection string is built, you can connect to the HMC terminal server through a socket on port 9735. After the connection is made, the connection string is sent to the virtual terminal server.
You must set the telnet mode to character. To write the ctrl ] character into a script, you must use the sequence ctrl v ctrl ].
To end the session, do one of the following:
OR
This action runs the following script:
script_name hostname port partition machine_type/model*serial session_id
where:
The following example shows how you can use a script to connect to a remote system:
#!/usr/bin/expect -f system "echo [string length $argv]" system "echo [lindex $argv 0]" system "echo [lindex $argv 1]" system "echo [lindex $argv 2]" system "echo [lindex $argv 3]" system "echo [lindex $argv 4]" spawn telnet [lindex $argv 0] 9735 expect "Escape" # Note that the \r is not included in the send count send -- "FFFX[string length $argv]*[lindex $argv 0]* [lindex $argv 1]*[lindex $argv 2]*[lindex $argv 3]*[lindex $argv 4]\r" sleep .5 # note: enter ^] using the sequence ctrl v ctrl ] on a unix system.send -- "^]\r" sleep .5 expect "telnet" send -- "mode character\r" interact