Man pages sections > man8 > vmcp

vmcp - send commands to the z/VM control program

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

NAME

vmcp - send commands to the z/VM control program

SYNOPSIS

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

DESCRIPTION

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.

RETURN CODES

vmcp writes the response to stdout and any error message to stderr. Depending on the success one of the following return codes is returned:
0
No problem in vmcp or CP.
 
1
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.
 
2
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.
 
3
Linux reported an error to vmcp. See the error message for details.
 
4
The options passed to vmcp were erroneous. See the error messages for details.
 
 
 
 

EXAMPLES

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
    

CREDITS

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

OPTIONS

-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
 

SEE ALSO

sudo(8)
Apr 2006 s390-tools