Managing z/OS Instances

The following are some useful commands and examples of managing z/OS Instances after initial provisioning has completed. These examples show how to manage the z/OS Instances from the Linux command line.

All command examples below must be entered from the Linux user ID that z/OS was provisioned under, for example ibmsys1. The commands should also be entered from within the Linux host directory where the z/OS Disk Image files and device map file are located, for example: /home/ibmsys1/instance-ibmsys1/volumes

Starting z Hypervisor code:

command:
awsstart aprof1 --clean

This command starts the z Hypervisor code and obtains licenses.

The --clean parameter is optional and using this parameter results in previous log files being deleted. If you wish to retain old log files then omit this parameter. Log files are typically stored in /home/ibmsys1/z1090/logs/

Stopping z Hypervisor code:

command:
awsstop

This command stops the z Hypervisor code, and if z/OS is running immediately and forcibly terminates z/OS. To avoid longer z/OS startup times and potential problems, it is recommended to cleanly shutdown z/OS prior to running awsstop. (see instructions in this section about z/OS Shutdown).

General Hardware Console commands:

command:
oprmsg
oprmsg is the z Hypervisor Linux command that facilitates communication with the z/OS “hardware console”. Since there is no real hardware console in this alternate hypervisor environment, oprmsg emulates this need. This command can be used to issue any z/OS Console command, for example:
oprmsg ‘$djes2’
oprmsg ‘d a,l’
oprmsg ‘d asm’
oprmsg ‘d tcpip,,netstat,conn’

Output from oprmsg is echoed into the log_console file (see this section to determine where this log file can be found). The output might also be echoed directly to Linux standard output, but only if the existing logged on session is the same session that issued the previous awsstart command. If awsstart was issued and the user logs off that session then output from oprmsg will no longer be echoed to standard output and messages must be retrieved from the log_console file. (see below on how to find the z Hypervisor Log Files).

z/OS Shutdown for Stock Image:

z/OS shutdown (Stock Image only) can be achieved by running these two commands:

  1. oprmsg ‘v cn(*),act’
    - to activate the z/OS hardware console.
  2. oprmsg ‘%netv shutsys’
    - to begin the automated shutdown of z/OS sub-tasks via Netview. This command should shutdown all tasks including JES2. Complete shutdown could take 5-10 minutes depending on the target environment host architecture (x86 or s390x). Progress of the z/OS Shutdown can be monitored by viewing the current log_console file (see below on how to find the z Hypervisor Log Files).

z/OS Shutdown for customer Images:

The instructions to shutdown z/OS for customer Images must be obtained from customer’s own documentation or procedures. If the customers shutdown procedure can be initiated from the z/OS console, the oprmsg command can be used to issue this command.

After z/OS has been shutdown, it is safe to stop the z Hypervisor using awsstop.

z/OS Startup (IPL):

Before IPL’ing z/OS, first ensure the z Hypervisor is up (awsstart has previously been executed). You can use the awsstat command to verify if it is already running.

If awsstat confirms the z Hypervisor is running then z/OS can be IPL’d.

For Stock Image the IPL command is:
ipl de27 parm de28au

For customer images (non Stock Images) the IPL devices and parameters used in the command must be obtained from customer’s own documentation or procedures.

z Hypervisor Log files:

z Hypervisor log files are contained in z1090/logs subdirectory in the home directory of the user that z/OS is running under, for example if z/OS was deployed using Linux user ibmsys1 then the logs would be here: /home/ibmsys1/z1090/logs/

There should be a file in this directory with prefix: log_console

for example: log_console_p126197_t2024-10-09_11-25-10.txt

This file echo’s entries typically written to the z/OS syslog.