[go: up one dir, main page]

File: vmcp.8

package info (click to toggle)
s390-tools 2.15.1-2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 8,216 kB
  • sloc: ansic: 130,144; sh: 9,397; cpp: 8,359; perl: 2,517; makefile: 1,960; asm: 1,016
file content (126 lines) | stat: -rw-r--r-- 3,020 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.\" Copyright 2017 IBM Corp.
.\" s390-tools is free software; you can redistribute it and/or modify
.\" it under the terms of the MIT license. See LICENSE for details.
.\"
.TH vmcp "8" "Apr 2006" "s390-tools"
.SH NAME
vmcp \- send commands to the z/VM control program
.SH SYNOPSIS
.BI vmcp
[\fI-k\fR] [\fI-b <size>\fR] command

.BI vmcp
[\fI-h|-v\fR]


.SH 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 
.BI -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. 
 
.BI 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.
.SH 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:
.TP
.BR "0"
No problem in vmcp or CP.

.TP
.BR "1"
CP returned a non-zero response code.

The message

.B Error: non-zero CP response for command '<command>': #<num>"

is written to stderr.
.I <num>
contains the numerical value of the response
code and
.I <command>
contains the commands as send to CP.

.TP
.BR "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

.B Error: output (<num> bytes) was truncated, try --buffer to increase size

is written to stderr.
.I <num>
contains the necessary buffer size in bytes.

.TP
.BR "3"
Linux reported an error to vmcp. See the error message for details.

.TP
.BR "4"
The options passed to vmcp were erroneous. See the error messages for details.




.SH EXAMPLES
To get your user id
.IP
.nf
vmcp query userid
.fi
.P

To attach the device 1234 to your guest 
.IP
.nf
vmcp attach 1234 \\*
.fi
.P

If add the following line to /etc/sudoers

.BI "ALL ALL=NOPASSWD: /sbin/vmcp indicate"

every user on the system can run the indicate command
.IP
.nf
sudo vmcp indicate
.fi
.P


.SH CREDITS
The basic idea of vmcp is based on cpint of Neale Fergusson.
.SH OPTIONS
.TP
.BR "\-h" " or " "--help"
Print usage information, then exit

.TP
.BR "\-v" " or " "--version"
Print version information, then exit

.TP
.BR "\-k" " or " "--keepcase"
Using this option, vmcp does not convert the command to uppercase. 
(The default is to translate the command string to uppercase) 

.TP
.BR "\-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

.SH "SEE ALSO"
sudo(8)