netdev-dpdk: fix mbuf leaks
[cascardo/ovs.git] / utilities / ovs-appctl.8.in
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .TH ovs\-appctl 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
8 .ds PN ovs\-appctl
9 .
10 .SH NAME
11 ovs\-appctl \- utility for configuring running Open vSwitch daemons
12 .
13 .SH SYNOPSIS
14 \fBovs\-appctl\fR [\fB\-\-target=\fItarget\fR | \fB\-t\fR \fItarget\fR]
15 \fIcommand \fR[\fIarg\fR...]
16 .br
17 \fBovs\-appctl\fR \-\-help
18 .br
19 \fBovs\-appctl\fR \-\-version
20 .SH DESCRIPTION
21 Open vSwitch daemons accept certain commands at runtime to control their
22 behavior and query their settings.  Every daemon accepts a common set of
23 commands documented under \fBCOMMON COMMANDS\fR below.  Some daemons
24 support additional commands documented in their own manpages.
25 \fBovs\-vswitchd\fR in particular accepts a number of additional
26 commands documented in \fBovs\-vswitchd\fR(8).
27 .PP
28 The \fBovs\-appctl\fR program provides a simple way to invoke these
29 commands.  The command to be sent is specified on \fBovs\-appctl\fR's
30 command line as non-option arguments.  \fBovs\-appctl\fR sends the
31 command and prints the daemon's response on standard output.
32 .PP
33 In normal use only a single option is accepted:
34 .IP "\fB\-t \fItarget\fR"
35 .IQ "\fB\-\-target=\fItarget\fR"
36 Tells \fBovs\-appctl\fR which daemon to contact.
37 .IP
38 If \fItarget\fR begins with \fB/\fR it must name a Unix domain socket
39 on which an Open vSwitch daemon is listening for control channel
40 connections.  By default, each daemon listens on a Unix domain socket
41 named \fB@RUNDIR@/\fIprogram\fB.\fIpid\fB.ctl\fR, where \fIprogram\fR
42 is the program's name and \fIpid\fR is its process ID.  For example,
43 if \fBovs\-vswitchd\fR has PID 123, it would listen on
44 \fB@RUNDIR@/ovs\-vswitchd.123.ctl\fR.
45 .IP
46 Otherwise, \fBovs\-appctl\fR looks for a pidfile, that is, a file
47 whose contents are the process ID of a running process as a decimal
48 number, named \fB@RUNDIR@/\fItarget\fB.pid\fR.  (The \fB\-\-pidfile\fR
49 option makes an Open vSwitch daemon create a pidfile.)
50 \fBovs\-appctl\fR reads the pidfile, then looks for a Unix socket
51 named \fB@RUNDIR@/\fItarget\fB.\fIpid\fB.ctl\fR, where \fIpid\fR is
52 replaced by the process ID read from the pidfile, and uses that file
53 as if it had been specified directly as the target.
54 .IP
55 On Windows, \fItarget\fR can be an absolute path to a file that contains
56 a localhost TCP port on which an Open vSwitch daemon is listening
57 for control channel connections. By default, each daemon writes the
58 TCP port on which it is listening for control connection into the file
59 \fIprogram\fB.ctl\fR located inside the configured \fIOVS_RUNDIR\fR
60 directory. If \fItarget\fR is not an absolute path, \fBovs\-appctl\fR
61 looks for a file named \fItarget\fB.ctl\fR in the configured \fIOVS_RUNDIR\fR
62 directory.
63 .IP
64 The default target is \fBovs\-vswitchd\fR.
65 .
66 .SH COMMON COMMANDS
67 Every Open vSwitch daemon supports a common set of commands, which are
68 documented in this section.
69 .
70 .SS GENERAL COMMANDS
71 These commands display daemon-specific commands and the running version.
72 Note that these commands are different from the \fB\-\-help\fR and
73 \fB\-\-version\fR options that return information about the
74 \fBovs\-appctl\fR utility itself.
75 .
76 .IP "\fBlist-commands\fR"
77 Lists the commands supported by the target.
78 .
79 .IP "\fBversion\fR"
80 Displays the version and compilation date of the target.
81 .
82 .SS LOGGING COMMANDS
83 Open vSwitch has several log levels.  The highest-severity log level is:
84 .
85 .IP "\fBoff\fR"
86 No message is ever logged at this level, so setting a logging
87 destination's log level to \fBoff\fR disables logging to that destination.
88 .
89 .PP
90 The following log levels, in order of descending severity, are
91 available:
92 .
93 .IP "\fBemer\fR"
94 A major failure forced a process to abort.
95 .IP "\fBerr\fR"
96 A high-level operation or a subsystem failed.  Attention is
97 warranted.
98 .IP "\fBwarn\fR"
99 A low-level operation failed, but higher-level subsystems may be able
100 to recover.
101 .IP "\fBinfo\fR"
102 Information that may be useful in retrospect when investigating
103 a problem.
104 .IP "\fBdbg\fR"
105 Information useful only to someone with intricate knowledge of the
106 system, or that would commonly cause too-voluminous log output.  Log
107 messages at this level are not logged by default.
108 .
109 .PP
110 Every Open vSwitch daemon supports the following commands for examining
111 and adjusting log levels.
112 .IP "\fBvlog/list\fR"
113 Lists the known logging modules and their current levels.
114 .
115 .IP "\fBvlog/list-pattern\fR"
116 Lists logging pattern used for each destination.
117 .
118 .IP "\fBvlog/set\fR [\fIspec\fR]"
119 Sets logging levels.  Without any \fIspec\fR, sets the log level for
120 every module and destination to \fBdbg\fR.  Otherwise, \fIspec\fR is a
121 list of words separated by spaces or commas or colons, up to one from
122 each category below:
123 .
124 .RS
125 .IP \(bu
126 A valid module name, as displayed by the \fBvlog/list\fR command on
127 \fBovs\-appctl\fR(8), limits the log level change to the specified
128 module.
129 .
130 .IP \(bu
131 \fBsyslog\fR, \fBconsole\fR, or \fBfile\fR, to limit the log level
132 change to only to the system log, to the console, or to a file,
133 respectively.
134 .IP
135 On Windows platform, \fBsyslog\fR is accepted as a word and
136 is only useful if the \fItarget\fR was started with the
137 \fB\-\-syslog\-target\fR option (the word has no effect otherwise).
138 .
139 .IP \(bu 
140 \fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or
141 \fBdbg\fR, to control the log level.  Messages of the given severity
142 or higher will be logged, and messages of lower severity will be
143 filtered out.  \fBoff\fR filters out all messages.
144 .RE
145 .
146 .IP
147 Case is not significant within \fIspec\fR.
148 .IP
149 Regardless of the log levels set for \fBfile\fR, logging to a file
150 will not take place unless the target application was invoked with the
151 \fB\-\-log\-file\fR option.
152 .IP
153 For compatibility with older versions of OVS, \fBany\fR is accepted as
154 a word but has no effect.
155 .
156 .IP "\fBvlog/set PATTERN:\fIdestination\fB:\fIpattern\fR"
157 Sets the log pattern for \fIdestination\fR to \fIpattern\fR.  Each time a
158 message is logged to \fIdestination\fR, \fIpattern\fR determines the
159 message's formatting.  Most characters in \fIpattern\fR are copied
160 literally to the log, but special escapes beginning with \fB%\fR are
161 expanded as follows:
162 .
163 .RS
164 .IP \fB%A\fR
165 The name of the application logging the message, e.g. \fBovs\-vswitchd\fR.
166 .
167 .IP \fB%B\fR
168 The RFC5424 syslog PRI of the message.
169 .
170 .IP \fB%c\fR
171 The name of the module (as shown by \fBovs\-appctl \-\-list\fR) logging
172 the message.
173 .
174 .IP \fB%d\fR
175 The current date and time in ISO 8601 format (YYYY\-MM\-DD HH:MM:SS).
176 .
177 .IP \fB%d{\fIformat\fB}\fR
178 The current date and time in the specified \fIformat\fR, which takes
179 the same format as the \fItemplate\fR argument to \fBstrftime\fR(3).
180 As an extension, any \fB#\fR characters in \fIformat\fR will be
181 replaced by fractional seconds, e.g. use \fB%H:%M:%S.###\fR for the
182 time to the nearest millisecond.  Sub-second times are only
183 approximate and currently decimal places after the third will always
184 be reported as zero.
185 .
186 .IP \fB%D\fR
187 The current UTC date and time in ISO 8601 format (YYYY\-MM\-DD HH:MM:SS).
188 .
189 .IP \fB%D{\fIformat\fB}\fR
190 The current UTC date and time in the specified \fIformat\fR, which
191 takes the same format as the \fItemplate\fR argument to
192 \fBstrftime\fR(3).  Supports the same extension for sub-second
193 resolution as \fB%d{\fR...\fB}\fR.
194 .
195 .IP \fB%E\fR
196 The hostname of the node running the application.
197 .
198 .IP \fB%m\fR
199 The message being logged.
200 .
201 .IP \fB%N\fR
202 A serial number for this message within this run of the program, as a
203 decimal number.  The first message a program logs has serial number 1,
204 the second one has serial number 2, and so on.
205 .
206 .IP \fB%n\fR
207 A new-line.
208 .
209 .IP \fB%p\fR
210 The level at which the message is logged, e.g. \fBDBG\fR.
211 .
212 .IP \fB%P\fR
213 The program's process ID (pid), as a decimal number.
214 .
215 .IP \fB%r\fR
216 The number of milliseconds elapsed from the start of the application
217 to the time the message was logged.
218 .
219 .IP \fB%t\fR
220 The subprogram name, that is, an identifying name for the process or
221 thread that emitted the log message, such as \fBmonitor\fR for the
222 process used for \fB\-\-monitor\fR or \fBmain\fR for the primary
223 process or thread in a program.
224 .
225 .IP \fB%T\fR
226 The subprogram name enclosed in parentheses, e.g. \fB(monitor)\fR, or
227 the empty string for the primary process or thread in a program.
228 .
229 .IP \fB%%\fR
230 A literal \fB%\fR.
231 .RE
232 .
233 .IP
234 A few options may appear between the \fB%\fR and the format specifier
235 character, in this order:
236 .
237 .RS
238 .IP \fB\-\fR
239 Left justify the escape's expansion within its field width.  Right
240 justification is the default.
241 .
242 .IP \fB0\fR
243 Pad the field to the field width with \fB0\fRs.  Padding with spaces
244 is the default.
245 .
246 .IP \fIwidth\fR
247 A number specifies the minimum field width.  If the escape expands to
248 fewer characters than \fIwidth\fR then it is padded to fill the field
249 width.  (A field wider than \fIwidth\fR is not truncated to fit.)
250 .RE
251 .
252 .IP
253 The default pattern for console and file output is \fB%D{%Y-%m-%dT
254 %H:%M:%SZ}|%05N|%c|%p|%m\fR; for syslog output, \fB%05N|%c|%p|%m\fR.
255 .
256 .IP
257 Daemons written in Python (e.g. \fBovs\-xapi\-sync\fR,
258 \fBovs\-monitor\-ipsec) do not allow control over the log pattern.
259 .
260 .IP "\fBvlog/set\fR FACILITY:\fIfacility\fR"
261 Sets the RFC5424 facility of the log message. \fIfacility\fR can be one of
262 \fBkern\fR, \fBuser\fR, \fBmail\fR, \fBdaemon\fR, \fBauth\fR, \fBsyslog\fR,
263 \fBlpr\fR, \fBnews\fR, \fBuucp\fR, \fBclock\fR, \fBftp\fR, \fBntp\fR,
264 \fBaudit\fR, \fBalert\fR, \fBclock2\fR, \fBlocal0\fR, \fBlocal1\fR,
265 \fBlocal2\fR, \fBlocal3\fR, \fBlocal4\fR, \fBlocal5\fR, \fBlocal6\fR or
266 \fBlocal7\fR.
267 .
268 .IP "\fBvlog/close\fR"
269 Causes the daemon to close its log file, if it is open.  (Use
270 \fBvlog/reopen\fR to reopen it later.)
271 .
272 .IP "\fBvlog/reopen\fR"
273 Causes the daemon to close its log file, if it is open, and then
274 reopen it.  (This is useful after rotating log files, to cause a new
275 log file to be used.)
276 .IP
277 This has no effect if the target application was not invoked with the
278 \fB\-\-log\-file\fR option.
279 .
280 .SH OPTIONS
281 .
282 .so lib/common.man
283 .
284 .SH "SEE ALSO"
285 .
286 \fBovs\-appctl\fR can control all Open vSwitch daemons, including:
287 .BR ovs\-vswitchd (8),
288 and
289 .BR ovsdb\-server (8).