aboutsummaryrefslogtreecommitdiff
path: root/utilities/ovs-appctl.8.in
blob: a3688ac554d285816adc7e35352ecc1545ae69b1 (plain)
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
.\" -*- nroff -*-
.de IQ
.  br
.  ns
.  IP "\\$1"
..
.TH ovs\-appctl 8 "November 2009" "Open vSwitch" "Open vSwitch Manual"
.ds PN ovs\-appctl
.
.SH NAME
ovs\-appctl \- utility for configuring running Open vSwitch daemons
.
.SH SYNOPSIS
\fBovs\-appctl\fR [\fB\-\-target=\fItarget\fR | \fB\-t\fR \fItarget\fR]
\fIcommand \fR[\fIarg\fR...]
.br
\fBovs\-appctl\fR \-\-help
.br
\fBovs\-appctl\fR \-\-version
.SH DESCRIPTION
Open vSwitch daemons accept certain commands at runtime to control
their behavior and query their settings.  Every daemon accepts the
commands for querying and adjusting its logging settings documented
under \fBLOGGING COMMANDS\fR below, and \fBovs\-vswitchd\fR in
particular accepts a number of additional commands documented in
\fBovs\-vswitchd\fR(8).
.PP
The \fBovs\-appctl\fR program provides a simple way to invoke these
commands.  The command to be sent is specified on \fBovs\-appctl\fR's
command line as non-option arguments.  \fBovs\-appctl\fR sends the
command and prints the daemon's response on standard output.
.PP
In normal use only a single option is accepted:
.IP "\fB\-t \fItarget\fR"
.IQ "\fB\-\-target=\fItarget\fR"
Tells \fBovs\-appctl\fR which daemon to contact.
.IP
If \fItarget\fR begins with \fB/\fR it must name a Unix domain socket
on which an Open vSwitch daemon is listening for control channel
connections.  By default, each daemon listens on a Unix domain socket
named \fB@RUNDIR@/\fIprogram\fB.\fIpid\fB.ctl\fR, where \fIprogram\fR
is the program's name and \fIpid\fR is its process ID.  For example,
if \fBovs\-vswitchd\fR has PID 123, it would listen on
\fB@RUNDIR@/ovs\-vswitchd.123.ctl\fR.
.IP
Otherwise, \fBovs\-appctl\fR looks for a pidfile, that is, a file
whose contents are the process ID of a running process as a decimal
number, named \fB@RUNDIR@/\fItarget\fB.pid\fR.  (The \fB\-\-pidfile\fR
option makes an Open vSwitch daemon create a pidfile.)
\fBovs\-appctl\fR reads the pidfile, then looks for a Unix socket
named \fB@RUNDIR@/\fItarget\fB.\fIpid\fB.ctl\fR, where \fIpid\fR is
replaced by the process ID read from the pidfile, and uses that file
as if it had been specified directly as the target.
.IP
The default target is \fBovs\-vswitchd\fR.
.
.SH LOGGING COMMANDS
Every Open vSwitch daemon supports the following commands for
examining and adjusting log levels.
.
.IP "\fBvlog/list\fR"
Lists the known logging modules and their current levels.
.
.IP "\fBvlog/set\fR \fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]"
Sets the logging level for \fImodule\fR in \fIfacility\fR to
\fIlevel\fR.  The \fImodule\fR may be any valid module name (as
displayed by the \fB\-\-list\fR option) or the special name \fBANY\fR to
set the logging levels for all modules.  The \fIfacility\fR may be
\fBsyslog\fR or \fBconsole\fR to set the levels for logging to the
system log or to the console, respectively, or \fBANY\fR to set the
logging levels for both facilities.  If it is omitted,
\fIfacility\fR defaults to \fBANY\fR.  The \fIlevel\fR must be one of
\fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or
\fBdbg\fR, designating the
minimum severity of a message for it to be logged.  If it is omitted,
\fIlevel\fR defaults to \fBdbg\fR.
.
.IP "\fBvlog/set PATTERN:\fIfacility\fB:\fIpattern\fR"
Sets the log pattern for \fIfacility\fR to \fIpattern\fR.  Each time a
message is logged to \fIfacility\fR, \fIpattern\fR determines the
message's formatting.  Most characters in \fIpattern\fR are copied
literally to the log, but special escapes beginning with \fB%\fR are
expanded as follows:
.
.RS
.IP \fB%A\fR
The name of the application logging the message, e.g. \fBovs\-vswitchd\fR.
.
.IP \fB%c\fR
The name of the module (as shown by \fBovs\-appctl \-\-list\fR) logging
the message.
.
.IP \fB%d\fR
The current date and time in ISO 8601 format (YYYY\-MM\-DD HH:MM:SS).
.
.IP \fB%d{\fIformat\fB}\fR
The current date and time in the specified \fIformat\fR, which takes
the same format as the \fItemplate\fR argument to \fBstrftime\fR(3).
.
.IP \fB%m\fR
The message being logged.
.
.IP \fB%N\fR
A serial number for this message within this run of the program, as a
decimal number.  The first message a program logs has serial number 1,
the second one has serial number 2, and so on.
.
.IP \fB%n\fR
A new-line.
.
.IP \fB%p\fR
The level at which the message is logged, e.g. \fBDBG\fR.
.
.IP \fB%P\fR
The program's process ID (pid), as a decimal number.
.
.IP \fB%r\fR
The number of milliseconds elapsed from the start of the application
to the time the message was logged.
.
.IP \fB%%\fR
A literal \fB%\fR.
.RE
.
.IP
A few options may appear between the \fB%\fR and the format specifier
character, in this order:
.
.RS
.IP \fB\-\fR
Left justify the escape's expansion within its field width.  Right
justification is the default.
.
.IP \fB0\fR
Pad the field to the field width with \fB0\fRs.  Padding with spaces
is the default.
.
.IP \fIwidth\fR
A number specifies the minimum field width.  If the escape expands to
fewer characters than \fIwidth\fR then it is padded to fill the field
width.  (A field wider than \fIwidth\fR is not truncated to fit.)
.RE
.
.IP
The default pattern for console output is \fB%d{%b %d
%H:%M:%S}|%05N|%c|%p|%m\fR; for syslog output, \fB%05N|%c|%p|%m\fR.
.
.IP "\fBvlog/reopen\fR"
Causes the daemon to close and reopen its log file.  (This
is useful after rotating log files, to cause a new log file to be
used.)
.IP
This has no effect if the target application was not invoked with the
\fB\-\-log\-file\fR option.
.
.SH OPTIONS
.
.so lib/common.man
.
.SH BUGS
.
The protocol used to speak to Open vSwitch daemons does not contain a
quoting mechanism, so command arguments should not generally contain
white space.
.
.SH "SEE ALSO"
.
\fBovs\-appctl\fR can control the following daemons:
.BR ovs\-vswitchd (8),
.BR ovs\-controller (8),
.BR ovs\-brcompatd (8).