1ovs-appctl(8)                 Open vSwitch Manual                ovs-appctl(8)
2
3
4

NAME

6       ovs-appctl - utility for configuring running Open vSwitch daemons
7

SYNOPSIS

9       ovs-appctl [--target=target | -t target] command [arg...]
10       ovs-appctl --help
11       ovs-appctl --version
12

DESCRIPTION

14       Open  vSwitch  daemons  accept  certain  commands at runtime to control
15       their behavior and query their settings.  Every daemon accepts a common
16       set  of  commands documented under COMMON COMMANDS below.  Some daemons
17       support  additional  commands  documented  in   their   own   manpages.
18       ovs-vswitchd in particular accepts a number of additional commands doc‐
19       umented in ovs-vswitchd(8).
20
21       The ovs-appctl program provides a simple way to invoke these  commands.
22       The  command  to  be  sent is specified on ovs-appctl's command line as
23       non-option arguments.  ovs-appctl sends the command and prints the dae‐
24       mon's response on standard output.
25
26       In normal use only a single option is accepted:
27
28       -t target
29       --target=target
30              Tells ovs-appctl which daemon to contact.
31
32              If  target  begins  with  / it must name a Unix domain socket on
33              which an Open vSwitch daemon is listening  for  control  channel
34              connections.   By  default, each daemon listens on a Unix domain
35              socket named /var/run/openvswitch/program.pid.ctl, where program
36              is  the  program's name and pid is its process ID.  For example,
37              if ovs-vswitchd has PID 123, it would listen  on  /var/run/open‐
38              vswitch/ovs-vswitchd.123.ctl.
39
40              Otherwise, ovs-appctl looks for a pidfile, that is, a file whose
41              contents are the process ID of a running process  as  a  decimal
42              number,  named  /var/run/openvswitch/target.pid.  (The --pidfile
43              option  makes  an  Open  vSwitch  daemon  create   a   pidfile.)
44              ovs-appctl reads the pidfile, then looks for a Unix socket named
45              /var/run/openvswitch/target.pid.ctl, where pid  is  replaced  by
46              the  process  ID read from the pidfile, and uses that file as if
47              it had been specified directly as the target.
48
49              The default target is ovs-vswitchd.
50

COMMON COMMANDS

52       Every Open vSwitch daemon supports a common set of commands, which  are
53       documented in this section.
54
55   GENERAL COMMANDS
56       These  commands  display  daemon-specific commands and the running ver‐
57       sion.  Note that these commands  are  different  from  the  --help  and
58       --version  options that return information about the ovs-appctl utility
59       itself.
60
61       help   Lists the commands supported by the target.
62
63       version
64              Displays the version and compilation date of the target.
65
66   LOGGING COMMANDS
67       Open vSwitch has several log levels.  The  highest-severity  log  level
68       is:
69
70       off    No  message  is  ever logged at this level, so setting a logging
71              facility's log level to off disables logging to that facility.
72
73       The following log levels, in order of descending severity,  are  avail‐
74       able:
75
76       emer   A major failure forced a process to abort.
77
78       err    A high-level operation or a subsystem failed.  Attention is war‐
79              ranted.
80
81       warn   A low-level operation failed, but higher-level subsystems may be
82              able to recover.
83
84       info   Information  that may be useful in retrospect when investigating
85              a problem.
86
87       dbg    Information useful only to someone with intricate  knowledge  of
88              the system, or that would commonly cause too-voluminous log out‐
89              put.  Log messages at this level are not logged by default.
90
91       Every Open vSwitch daemon supports the following commands for examining
92       and adjusting log levels.
93
94       vlog/list
95              Lists the known logging modules and their current levels.
96
97       vlog/set [spec]
98              Sets  logging  levels.  Without any spec, sets the log level for
99              every module and facility to dbg.  Otherwise, spec is a list  of
100              words  separated  by  spaces or commas or colons, up to one from
101              each category below:
102
103              ·      A valid module name, as displayed by the  vlog/list  com‐
104                     mand on ovs-appctl(8), limits the log level change to the
105                     specified module.
106
107              ·      syslog, console, or file, to limit the log  level  change
108                     to  only to the system log, to the console, or to a file,
109                     respectively.
110
111              ·      off, emer, err, warn, info, or dbg, to  control  the  log
112                     level.   Messages of the given severity or higher will be
113                     logged, and messages of lower severity will  be  filtered
114                     out.  off filters out all messages.
115
116              Case is not significant within spec.
117
118              Regardless  of  the  log  levels set for file, logging to a file
119              will not take place unless the target  application  was  invoked
120              with the --log-file option.
121
122              For compatibility with older versions of OVS, any is accepted as
123              a word but has no effect.
124
125       vlog/set PATTERN:facility:pattern
126              Sets the log pattern for facility to pattern.  Each time a  mes‐
127              sage  is  logged  to  facility, pattern determines the message's
128              formatting.  Most characters in pattern are copied literally  to
129              the  log,  but  special escapes beginning with % are expanded as
130              follows:
131
132              %A     The name of the application  logging  the  message,  e.g.
133                     ovs-vswitchd.
134
135              %c     The  name  of  the module (as shown by ovs-appctl --list)
136                     logging the message.
137
138              %d     The current date and time in ISO 8601 format  (YYYY-MM-DD
139                     HH:MM:SS).
140
141              %d{format}
142                     The  current date and time in the specified format, which
143                     takes the same format as the template argument  to  strf‐
144                     time(3).   As  an  extension,  any # characters in format
145                     will  be  replaced  by  fractional  seconds,   e.g.   use
146                     %H:%M:%S.###  for  the  time  to the nearest millisecond.
147                     Sub-second times are only approximate and currently deci‐
148                     mal  places  after  the  third will always be reported as
149                     zero.
150
151              %D     The  current  UTC  date  and  time  in  ISO  8601  format
152                     (YYYY-MM-DD HH:MM:SS).
153
154              %D{format}
155                     The  current  UTC  date and time in the specified format,
156                     which takes the same format as the template  argument  to
157                     strftime(3).   Supports the same extension for sub-second
158                     resolution as %d{...}.
159
160              %m     The message being logged.
161
162              %N     A serial number for this message within this run  of  the
163                     program,  as  a decimal number.  The first message a pro‐
164                     gram logs has serial number 1, the second one has  serial
165                     number 2, and so on.
166
167              %n     A new-line.
168
169              %p     The level at which the message is logged, e.g. DBG.
170
171              %P     The program's process ID (pid), as a decimal number.
172
173              %r     The  number of milliseconds elapsed from the start of the
174                     application to the time the message was logged.
175
176              %t     The subprogram name, that is, an identifying name for the
177                     process  or  thread that emitted the log message, such as
178                     monitor for the process used for --monitor  or  main  for
179                     the primary process or thread in a program.
180
181              %T     The  subprogram name enclosed in parentheses, e.g. (moni‐
182                     tor), or the empty string  for  the  primary  process  or
183                     thread in a program.
184
185              %%     A literal %.
186
187              A  few options may appear between the % and the format specifier
188              character, in this order:
189
190              -      Left justify the  escape's  expansion  within  its  field
191                     width.  Right justification is the default.
192
193              0      Pad  the  field to the field width with 0s.  Padding with
194                     spaces is the default.
195
196              width  A number specifies  the  minimum  field  width.   If  the
197                     escape  expands to fewer characters than width then it is
198                     padded to fill the field  width.   (A  field  wider  than
199                     width is not truncated to fit.)
200
201              The  default pattern for console and file output is %D{%Y-%m-%dT
202              %H:%M:%SZ}|%05N|%c|%p|%m; for syslog output, %05N|%c|%p|%m.
203
204              Daemons  written  in  Python  (e.g.   ovs-xapi-sync,   ovs-moni‐
205              tor-ipsec) do not allow control over the log pattern.
206
207       vlog/reopen
208              Causes  the  daemon  to close and reopen its log file.  (This is
209              useful after rotating log files, to cause a new log file  to  be
210              used.)
211
212              This  has  no  effect  if the target application was not invoked
213              with the --log-file option.
214

OPTIONS

216       -h
217       --help Prints a brief help message to the console.
218
219       -V
220       --version
221              Prints version information to the console.
222

SEE ALSO

224       ovs-appctl  can  control   all   Open   vSwitch   daemons,   including:
225       ovs-vswitchd(8), and ovsdb-server(8).
226
227
228
229Open vSwitch                         2.0.0                       ovs-appctl(8)
Impressum