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