IBM Support

Capturing Screen Shots from the HMC



The HMC includes the hmcwin screen capture command. Users can also capture screen shots of HMC panels by using remote access and the remote operating system's native screen capture tools.

Resolving The Problem

Administrators might wish to capture screen shots of the various HMC panels. The HMC includes a command, hmcwin, that allows a user to capture and display window images.

hmcwin Command
The hmcwin command is a wrapper over the X Window System's xwd/xwud commands. To display the help information, type hmcwin --help at a HMC command line. Use the command man hmcwin to view the manual pages.

Capturing Screen Shots
To capture a screen shot, first open a restricted shell prompt.
Version 6 and earlier: Right-click on the HMC desktop area, select terminals, then select rshterm.
Version 7 and later: In the navigation area, click HMC Management, then select Open Restricted Shell Terminal.

At the restricted shell, enter the command:

hmcwin -o c -f <myfile.xwd>

where <myfile.xwd> is the file name to save. Press the Enter key and the mouse pointer will change to a crosshair shape. Left-click on a window to capture it. Left-click on the desktop to capture the entire screen. The behavior is the same as the xwd command with the -frame option. The file is saved to the user's $HOME/.screen_capture/ directory.

Move the File
The file can be moved off the HMC by copying it to removable media (DVD-RAM, USB stick, or diskette) using FTP via the sendfile command or by using the secure copy (scp command) client or server.

Removable media
Step 1: Insert the removable media.

Step 2: Determine the mount point using the command lsmediadev
      Example output: device=/dev/cdrom,mount_point=/media/cdrom,type=1,description=CD/DVD
      Substitute the "mount_point" of the desired media in the <mount point> parameter of the following commands.

Step 2: Run the command mount <mount point>

Step 3: Run the command ls /home/<user>/.screen_capture where <user> is the HMC user profile that runs the hmcwin command. Verify the screen capture file exists.

Step 4: Run the command cp /home/<user>/.screen_capture/<file> <mount point> where <user> is the HMC user profile that ran the hmcwin command and <file> is the file name of the capture.

Step 5: Run the command umount <mount point>.
The HMC provides a sendfile command to allow files to be sent to another server using the FTP protocol. The HMC restricted shell does not allow the direct use of a FTP command nor does the HMC allow incoming FTP. For information on using the command, display the manual pages using the command man sendfile. The following is an example of sending a file myfile.xwd captured by user hscroot to the IBM® i5/OS™ server myi5 in the Integrated File System directory /mydir using the i5/OS user profile myi5ID:

sendfile -f /home/hscroot/.screen_capture/myfile.xwd -h myi5 -d /mydir -u myi5ID
Secure Copy (scp)
The HMC restricted shell includes a scp command for transfer from the HMC to another server that supports secure shell. A remote PC or server can use scp to copy a file from the HMC if the HMC is configured to allow remote command execution and if Secure Shell is enabled in the HMC firewall. R530 i5/OS includes both a sshd server and scp client as part of the 5733-SC1 -- IBM Portable Utilities LPP. Most Unix® and Linux® distributions also include both a server and client. Microsoft® Windows® does not include an scp client or ssh server; however, several third party implementations such as PuTTY and OpenSSH are available.

Execute the HMC command man scp to display the manual pages for the HMC scp command.

Example of using the Windows version of PuTTY to retrieve a screen shot from the HMC:

"c:\program files\putty\pscp" -scp hscroot@myhmc:/home/myuser/.screen_capture/myfile.xwd c:\mydir
Converting the File
The file created is an X Windows formatted dump file. Users may want to convert the file to another format. One commonly available tool for converting the xwd format is the ImageMagick convert command. ImageMagick is included in many Linux distributions. ImageMagick also has a download available for Unix and Windows. Refer to the Web site for further information. Example of using imagemagick convert command:
convert myfile.xwd myfile.jpg

Alternative Method for Screen Shots
Another method to capture screen shots is to access the HMC remotely, then use the remote operating system's native screen capture tools. For further information on configuring remote HMC access, refer to the eServer Information Center. After remote access has been configured, any screen capture utility available for the remote client's operating system can be used. This includes utilities such as the Microsoft Windows shift or alt PrintScreen key or the Linux/UNIX utilities such as xwd, import, and GIMP.

[{"Product":{"code":"SGW5F2","label":"HMC Firmware"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"HMC","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"5.3.0;5.3.5;5.4.0;5.4.5;6.1.0;6.1.1","Edition":"","Line of Business":{"code":"","label":""}}]

Historical Number


Document Information

Modified date:
17 June 2018