]> git.proxmox.com Git - ovs.git/blame - utilities/ovs-appctl.8.in
ovs-vsctl: Update --help message.
[ovs.git] / utilities / ovs-appctl.8.in
CommitLineData
064af421
BP
1.\" -*- nroff -*-
2.de IQ
3. br
4. ns
5. IP "\\$1"
6..
3fbe1d30 7.TH ovs\-appctl 8 "November 2009" "Open vSwitch" "Open vSwitch Manual"
064af421
BP
8.ds PN ovs\-appctl
9
10.SH NAME
11ovs\-appctl \- utility for configuring running Open vSwitch daemons
12
13.SH SYNOPSIS
3fbe1d30
BP
14\fBovs\-appctl\fR [\fB--target=\fItarget\fR | \fB-t\fR \fItarget\fR]
15\fIcommand \fR[\fIarg\fR...]
064af421 16.br
3fbe1d30 17\fBovs\-appctl\fR --help
064af421 18.br
3fbe1d30 19\fBovs\-appctl\fR --version
064af421 20.SH DESCRIPTION
3fbe1d30
BP
21Open vSwitch daemons accept certain commands at runtime to control
22their behavior and query their settings. Every daemon accepts the
23commands for querying and adjusting its logging settings documented
24under \fBLOGGING COMMANDS\fR below, and \fBovs\-vswitchd\fR in
25particular accepts a number of additional commands documented in
26\fBovs\-vswitchd\fR(8).
27
28The \fBovs\-appctl\fR program provides a simple way to invoke these
29commands. The command to be sent is specified on \fBovs\-appctl\fR's
30command line as non-option arguments. \fBovs\-appctl\fR sends the
31command and prints the daemon's response on standard output.
32
33In normal use only a single option is accepted:
34
35.IP "\fB\-t \fItarget\fR"
36.IQ "\fB\-\-target=\fItarget\fR"
37Tells \fBovs\-appctl\fR which daemon to contact.
38.IP
39If \fItarget\fR begins with \fB/\fR it must name a Unix domain socket
40on which an Open vSwitch daemon is listening for control channel
41connections. By default, each daemon listens on a Unix domain socket
42named \fB@RUNDIR@/\fIprogram\fB.\fIpid\fB.ctl\fR, where \fIprogram\fR
43is the program's name and \fIpid\fR is its process ID. For example,
44if \fBovs-vswitchd\fR has PID 123, it would listen on
45\fB@RUNDIR@/ovs-vswitchd.123.ctl\fR.
46.IP
47Otherwise, \fBovs\-appctl\fR looks for a pidfile, that is, a file
48whose contents are the process ID of a running process as a decimal
49number, named \fB@RUNDIR@/\fItarget\fB.pid\fR. (The \fB\-\-pidfile\fR
50option makes an Open vSwitch daemon create a pidfile.)
51\fBovs\-appctl\fR reads the pidfile, then looks for a Unix socket
52named \fB@RUNDIR@/\fItarget\fB.\fIpid\fB.ctl\fR, where \fIpid\fR is
53replaced by the process ID read from the pidfile, and uses that file
54as if it had been specified directly as the target.
55.IP
56The default target is \fBovs\-vswitchd\fR.
57.
58.SH LOGGING COMMANDS
59Every Open vSwitch daemon supports the following commands for
60examining and adjusting log levels.
61.
62.IP "\fBvlog/list\fR"
63Lists the known logging modules and their current levels.
64.
65.IP "\fBvlog/set\fR \fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]"
064af421
BP
66Sets the logging level for \fImodule\fR in \fIfacility\fR to
67\fIlevel\fR. The \fImodule\fR may be any valid module name (as
68displayed by the \fB--list\fR option) or the special name \fBANY\fR to
69set the logging levels for all modules. The \fIfacility\fR may be
70\fBsyslog\fR or \fBconsole\fR to set the levels for logging to the
71system log or to the console, respectively, or \fBANY\fR to set the
72logging levels for both facilities. If it is omitted,
73\fIfacility\fR defaults to \fBANY\fR. The \fIlevel\fR must be one of
74\fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or \fBdbg\fR, designating the
75minimum severity of a message for it to be logged. If it is omitted,
76\fIlevel\fR defaults to \fBdbg\fR.
3fbe1d30
BP
77.
78.IP "\fBvlog/set PATTERN:\fIfacility\fB:\fIpattern\fR"
064af421
BP
79Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Each time a
80message is logged to \fIfacility\fR, \fIpattern\fR determines the
81message's formatting. Most characters in \fIpattern\fR are copied
82literally to the log, but special escapes beginning with \fB%\fR are
83expanded as follows:
84
85.RS
86.IP \fB%A\fR
8cd4882f 87The name of the application logging the message, e.g. \fBovs-vswitchd\fR.
064af421
BP
88
89.IP \fB%c\fR
90The name of the module (as shown by \fBovs\-appctl --list\fR) logging
91the message.
92
93.IP \fB%d\fR
94The current date and time in ISO 8601 format (YYYY-MM-DD HH:MM:SS).
95
96.IP \fB%d{\fIformat\fB}\fR
97The current date and time in the specified \fIformat\fR, which takes
98the same format as the \fItemplate\fR argument to \fBstrftime\fR(3).
99
100.IP \fB%m\fR
101The message being logged.
102
103.IP \fB%N\fR
104A serial number for this message within this run of the program, as a
105decimal number. The first message a program logs has serial number 1,
106the second one has serial number 2, and so on.
107
108.IP \fB%n\fR
109A new-line.
110
111.IP \fB%p\fR
112The level at which the message is logged, e.g. \fBDBG\fR.
113
114.IP \fB%P\fR
115The program's process ID (pid), as a decimal number.
116
117.IP \fB%r\fR
118The number of milliseconds elapsed from the start of the application
119to the time the message was logged.
120
121.IP \fB%%\fR
122A literal \fB%\fR.
123.RE
124
125.IP
126A few options may appear between the \fB%\fR and the format specifier
127character, in this order:
128
129.RS
130.IP \fB-\fR
131Left justify the escape's expansion within its field width. Right
132justification is the default.
133
134.IP \fB0\fR
135Pad the field to the field width with \fB0\fRs. Padding with spaces
136is the default.
137
138.IP \fIwidth\fR
139A number specifies the minimum field width. If the escape expands to
140fewer characters than \fIwidth\fR then it is padded to fill the field
141width. (A field wider than \fIwidth\fR is not truncated to fit.)
142.RE
143
144.IP
145The default pattern for console output is \fB%d{%b %d
146%H:%M:%S}|%05N|%c|%p|%m\fR; for syslog output, \fB%05N|%c|%p|%m\fR.
147
3fbe1d30
BP
148.IP "\fBvlog/reopen\fR"
149Causes the daemon to close and reopen its log file. (This
064af421
BP
150is useful after rotating log files, to cause a new log file to be
151used.)
152
153This has no effect if the target application was not invoked with the
154\fB--log-file\fR option.
155
064af421
BP
156.SH OPTIONS
157
158.so lib/common.man
159
3fbe1d30
BP
160.SH BUGS
161
162The protocol used to speak to Open vSwitch daemons does not contain a
163quoting mechanism, so command arguments should not generally contain
164white space.
165
064af421
BP
166.SH "SEE ALSO"
167
3fbe1d30
BP
168\fBovs\-appctl\fR can control the following daemons:
169.BR ovs\-vswitchd (8),
170.BR ovs\-openflowd (8),
064af421 171.BR ovs\-controller (8),
3fbe1d30
BP
172.BR ovs\-brcompatd (8),
173.BR ovs\-discover (8).