Question & Answer
Question
Capturing VTERM Console Output
Answer
This document explains the necessary steps required in order to capture vterm console output from the Hardware Management Code (HMC). The information in this document pertains to AIX 5L, and to HMC R3Vx.
NOTE: HMC 3.2.3 or higher requires a PEPasscode for remote command line access. Contact your remote Software Support Center to assist in generating this passcode. RequirementsProblem
Solution
Method one
Method two
Steps to make up the string
Related documentation
Requirements
Command line access to the HMC through SSH is required. You can enable this from the HMC console or through remote WebSM.
Once you are logged in:
Click HMC Maintenance -> System Configuration -> Enable/Disable Remote Command *Execution, check the SSH box.
Next, click Enable/Disable Remote Virtual Terminals, check the box for Enable.
Problem
During a NIM debug or kernel debug boot useful console output needs to be captured from the console.
Solution
Method one
- Open a vterm window to the LPAR. Look at the left side of the
title bar to get the vterm string, which will be in the form:
Partition number*Machine type-Model*Serial number
-
From an SSH session on the HMC, create an empty file in /tmp with the
vterm string as the filename. In this example:
$ touch /tmp/004*7040-681*020153A
- Close the vterm, then open it back up and proceed with troubleshooting (activate the LPAR, etc.).
- As soon as the LPAR outputs information to the vterm window, check the size of the file in /tmp on the HMC and verify that it has been written to.
- If it has not been written to, double check the name of the file against the title bar. If they match, try performing a Close Terminal Connection operation to force it closed, then open it again. This should cause it to start logging to the file.
- When logging is no longer needed, close the vterm. Send the output of the file in /tmp on the HMC to your remote Support Center. Next, remove the file from /tmp, if you fail to do so, it will log everything written to the vterm whenever a vterm window is opened. And you will inadvertently fill up /var on the HMC at some point in the future.
NOTE: The serial number in the filename is case sensitive. It must match the string from the vterm title bar exactly.
NOTE: In an SP environment, use s1term <frame#> <slot#> | tee <logfile> instead.
Method two
This is documented in the "HMC Installation and Operations Guide: Appendix D:Using scripts to connect remotely", but the method it uses is with a script that needs the freeware utility, expect.
The following is a procedure to open a remote vterm without the need for a script or expect.
Telnet to port 9735 of the HMC and enter a special string:
- From another AIX system (or PC), capture the output by using script <filename> (AIX) or click on Transfer, Capture Text if using hyperterminal (PC).
-
Telnet the HMC on port 9735. Once you are connected, enter the string (copy
and paste it) and then hit enter:
#telnet p690hmc1 9735 Trying... Connected to p690hmc1 Escape character is '^]'. FFFX34*p690hmc1*9374*5*7040-681*020448A*1
You should now be connected to the partition in a console for collecting output.
Steps to make up the string
FFFX34*p690hmc1*9374*5*7040-681*020448A*1 0 |1| 2 | 3 |4| 5 | 6 |7 0: FFFX
Start of string indicator: FFFX - connect and issue terminal open command FFFF - connect but assume terminal is already open 1: 34
Count in integer ASCII. The number of characters that follow the * character, which follow the start of the string indicator. In the above example, count from e in ehsc2 to the end of the string. 2: p690hmc1 Host name or IP address of the HMC workstation. 3: 9734
Port number of control element. In this example, 9734 is the port number. 4: 5
Partition slot number. 0 is used to open a terminal on the managed system in both Partition Standby and Full System Partition modes. You can access the service processor menus from partition 0. Slots 1 to 16 are valid in partition Standby mode only. 3 ways to determine the partition slot number of an LPAR: 1. View the partition's properties in the HMC gui 2. lspartition -all from the HMC 3. uname -L from the LPAR 5: 7040-681 Use the machine type and model of the managed system. Use the managed system's properties panel to get the machine type and model. Do not use the user-assigned managed system name. 6: 020448A Serial number of the managed system. Use the HMC's properties panel to get the managed system serial number. 7: 1 TTY's session number.
Related documentation
HMC Installation and Operations Guide
http://publib.boulder.ibm.com/infocenter/pseries/index.jsp
Historical Number
isg1pTechnote1414
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1000646