Poster of Linux kernelThe best gift for a Linux geek


Section: Open vSwitch Manual (8) Updated: November 2009
Local index Up


ovs-appctl - utility for configuring running Open vSwitch daemons  


ovs-appctl [--target=target | -t target] command [arg...]
ovs-appctl --help
ovs-appctl --version  


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 LOGGING COMMANDS below, and ovs-vswitchd in particular accepts a number of additional commands documented in ovs-vswitchd(8).

The ovs-appctl program provides a simple way to invoke these commands. The command to be sent is specified on ovs-appctl's command line as non-option arguments. ovs-appctl sends the command and prints the daemon's response on standard output.

In normal use only a single option is accepted:

-t target

Tells ovs-appctl which daemon to contact.
If target begins with / 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 /var/run/openvswitch/, where program is the program's name and pid is its process ID. For example, if ovs-vswitchd has PID 123, it would listen on /var/run/openvswitch/ovs-vswitchd.123.ctl.
Otherwise, ovs-appctl looks for a pidfile, that is, a file whose contents are the process ID of a running process as a decimal number, named /var/run/openvswitch/ (The --pidfile option makes an Open vSwitch daemon create a pidfile.) ovs-appctl reads the pidfile, then looks for a Unix socket named /var/run/openvswitch/, where pid is replaced by the process ID read from the pidfile, and uses that file as if it had been specified directly as the target.
The default target is ovs-vswitchd.


Every Open vSwitch daemon supports the following commands for examining and adjusting log levels.
Lists the known logging modules and their current levels.
vlog/set module[:facility[:level]]
Sets the logging level for module in facility to level. The module may be any valid module name (as displayed by the --list option) or the special name ANY to set the logging levels for all modules. The facility may be syslog or console to set the levels for logging to the system log or to the console, respectively, or ANY to set the logging levels for both facilities. If it is omitted, facility defaults to ANY. The level must be one of emer, err, warn, info, or dbg, designating the minimum severity of a message for it to be logged. If it is omitted, level defaults to dbg.
vlog/set PATTERN:facility:pattern
Sets the log pattern for facility to pattern. Each time a message is logged to facility, pattern determines the message's formatting. Most characters in pattern are copied literally to the log, but special escapes beginning with % are expanded as follows:
The name of the application logging the message, e.g. ovs-vswitchd.
The name of the module (as shown by ovs-appctl --list) logging the message.
The current date and time in ISO 8601 format (YYYY-MM-DD HH:MM:SS).
The current date and time in the specified format, which takes the same format as the template argument to strftime(3).
The message being logged.
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.
A new-line.
The level at which the message is logged, e.g. DBG.
The program's process ID (pid), as a decimal number.
The number of milliseconds elapsed from the start of the application to the time the message was logged.
A literal %.
A few options may appear between the % and the format specifier character, in this order:
Left justify the escape's expansion within its field width. Right justification is the default.
Pad the field to the field width with 0s. Padding with spaces is the default.
A number specifies the minimum field width. If the escape expands to fewer characters than width then it is padded to fill the field width. (A field wider than width is not truncated to fit.)
The default pattern for console output is %d{%b %d %H:%M:%S}|%05N|%c|%p|%m; for syslog output, %05N|%c|%p|%m.
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.)
This has no effect if the target application was not invoked with the --log-file option.


-h, --help
Prints a brief help message to the console.
-V, --version
Prints version information to the console.


The protocol used to speak to Open vSwitch daemons does not contain a quoting mechanism, so command arguments should not generally contain white space.  


ovs-appctl can control the following daemons: ovs-vswitchd(8), ovs-openflowd(8), ovs-controller(8), ovs-brcompatd(8), ovs-discover(8).




This document was created by man2html, using the manual pages.
Time: 22:02:05 GMT, April 16, 2011