Man pages sections > man8 > vmcp

vmcp - send commands to the z/VM control program

vmcp(8) System Manager's Manual vmcp(8)


vmcp - send commands to the z/VM control program


vmcp [ -k] [-b <size>] command
vmcp [ -h|-v]


vmcp allows Linux users to send commands to the control program of z/VM. The normal usage is to invoke vmcp with the command you want to execute. If the -k option is not specified, the whole command line is automatically translated into uppercase. The response of z/VM is written to the standard output.
vmcp needs a kernel feature represented by the device node /dev/vmcp. The kernel module defines a buffer size, which limits the length of the response. Every output larger than the compiled buffer size is silently dropped. Depending on you shell, please remember to escape special characters like * using \* instead.


vmcp writes the response to stdout and any error message to stderr. Depending on the success one of the following return codes is returned:
No problem in vmcp or CP.
CP returned a non-zero response code.
The message
Error: non-zero CP response for command '<command>': #<num>"
is written to stderr. <num> contains the numerical value of the response code and <command> contains the commands as send to CP.
The specified buffer was not large enough to hold CP's response. The command was executed, nevertheless, and the response was truncated. You can use the --buffer option to increase the response buffer. The message
Error: output (<num> bytes) was truncated, try --buffer to increase size
is written to stderr. <num> contains the necessary buffer size in bytes.
Linux reported an error to vmcp. See the error message for details.
The options passed to vmcp were erroneous. See the error messages for details.


To get your user id
vmcp query userid
To attach the device 1234 to your guest
vmcp attach 1234 \*
If add the following line to /etc/sudoers
ALL ALL=NOPASSWD: /sbin/vmcp indicate
every user on the system can run the indicate command
sudo vmcp indicate


The basic idea of vmcp is based on cpint of Neale Fergusson.


-h or --help
Print usage information, then exit
-v or --version
Print version information, then exit
-k or --keepcase
Using this option, vmcp does not convert the command to uppercase. (The default is to translate the command string to uppercase)
-b <size> or --buffer=<size>
Specify a buffer size for the response. The buffer size can be specified from 4096 bytes (4k) to 1048576 Bytes (1M). The default size is 2 pages (8192 Bytes). You can also use k/K/m/M for kilobytes and Megabytes


Apr 2006 s390-tools