Rename "secchan" to "ofproto" (library) and "ovs-openflowd" (program).
[sliver-openvswitch.git] / utilities / ovs-appctl.8.in
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .TH ovs\-appctl 8 "April 2009" "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-h\fR | \fB--help\fR] [\fItarget\fR...] [\fIaction\fR...]
15 .sp 1
16 The available \fItarget\fR options are:
17 .br
18 [\fB-t\fR \fIpid\fR | \fB--target=\fIpid\fR]
19 .sp 1
20 The available \fIaction\fR options are:
21 .br
22 [\fB-l\fR | \fB--list\fR] [\fB-s\fR
23 \fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]] |
24 \fB--set=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]]
25 [\fB-r\fR | \fB--reopen\fR]
26 [\fB-e\fR | \fB--execute=\fIcommand\fR]
27
28 .SH DESCRIPTION
29 The \fBovs\-appctl\fR program connects to one or more running
30 Open vSwitch daemons (such as \fBovs\-vswitchd\fR(8)), as specified by the
31 user, and sends them commands to query or modify their behavior.
32 Its primary purpose is currently to adjust daemons' logging levels.
33
34 \fBovs\-appctl\fR applies one or more actions to each of one or more
35 target processes.  Targets may be specified using:
36
37 .IP "\fB-t \fIsocket\fR"
38 .IQ "\fB--target=\fIsocket\fR"
39 The specified \fIsocket\fR must be the name of a Unix domain socket
40 for a \fBovs\-appctl\fR-controllable process.  If \fIsocket\fR does not
41 begin with \fB/\fR, it is treated as relative to \fB@RUNDIR@\fR.
42
43 Each Open vSwitch daemon by default creates a socket named
44 \fB@RUNDIR@/\fIprogram\fB.\fIpid\fB.ctl\fR, where \fIprogram\fR is
45 the program's name (such as \fBovs\-vswitchd\fR) and \fIpid\fR is the
46 daemon's PID.
47
48 .PP
49 The available actions are:
50
51 .IP "\fB-l\fR"
52 .IQ "\fB--list\fR"
53 Print the list of known logging modules and their current levels to
54 stdout.
55
56 .IP "\fB-s\fR \fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]"
57 .IQ "\fB--set=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]"
58
59 Sets the logging level for \fImodule\fR in \fIfacility\fR to
60 \fIlevel\fR.  The \fImodule\fR may be any valid module name (as
61 displayed by the \fB--list\fR option) or the special name \fBANY\fR to
62 set the logging levels for all modules.  The \fIfacility\fR may be
63 \fBsyslog\fR or \fBconsole\fR to set the levels for logging to the
64 system log or to the console, respectively, or \fBANY\fR to set the
65 logging levels for both facilities.  If it is omitted,
66 \fIfacility\fR defaults to \fBANY\fR.  The \fIlevel\fR must be one of
67 \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or \fBdbg\fR, designating the
68 minimum severity of a message for it to be logged.  If it is omitted,
69 \fIlevel\fR defaults to \fBdbg\fR.
70
71 .IP "\fB-s PATTERN:\fIfacility\fB:\fIpattern\fR"
72 .IQ "\fB--set=PATTERN:\fIfacility\fB:\fIpattern\fR"
73
74 Sets the log pattern for \fIfacility\fR to \fIpattern\fR.  Each time a
75 message is logged to \fIfacility\fR, \fIpattern\fR determines the
76 message's formatting.  Most characters in \fIpattern\fR are copied
77 literally to the log, but special escapes beginning with \fB%\fR are
78 expanded as follows:
79
80 .RS
81 .IP \fB%A\fR
82 The name of the application logging the message, e.g. \fBovs-vswitchd\fR.
83
84 .IP \fB%c\fR
85 The name of the module (as shown by \fBovs\-appctl --list\fR) logging
86 the message.
87
88 .IP \fB%d\fR
89 The current date and time in ISO 8601 format (YYYY-MM-DD HH:MM:SS).
90
91 .IP \fB%d{\fIformat\fB}\fR
92 The current date and time in the specified \fIformat\fR, which takes
93 the same format as the \fItemplate\fR argument to \fBstrftime\fR(3).
94
95 .IP \fB%m\fR
96 The message being logged.
97
98 .IP \fB%N\fR
99 A serial number for this message within this run of the program, as a
100 decimal number.  The first message a program logs has serial number 1,
101 the second one has serial number 2, and so on.
102
103 .IP \fB%n\fR
104 A new-line.
105
106 .IP \fB%p\fR
107 The level at which the message is logged, e.g. \fBDBG\fR.
108
109 .IP \fB%P\fR
110 The program's process ID (pid), as a decimal number.
111
112 .IP \fB%r\fR
113 The number of milliseconds elapsed from the start of the application
114 to the time the message was logged.
115
116 .IP \fB%%\fR
117 A literal \fB%\fR.
118 .RE
119
120 .IP
121 A few options may appear between the \fB%\fR and the format specifier
122 character, in this order:
123
124 .RS
125 .IP \fB-\fR
126 Left justify the escape's expansion within its field width.  Right
127 justification is the default.
128
129 .IP \fB0\fR
130 Pad the field to the field width with \fB0\fRs.  Padding with spaces
131 is the default.
132
133 .IP \fIwidth\fR
134 A number specifies the minimum field width.  If the escape expands to
135 fewer characters than \fIwidth\fR then it is padded to fill the field
136 width.  (A field wider than \fIwidth\fR is not truncated to fit.)
137 .RE
138
139 .IP
140 The default pattern for console output is \fB%d{%b %d
141 %H:%M:%S}|%05N|%c|%p|%m\fR; for syslog output, \fB%05N|%c|%p|%m\fR.
142
143 .IP \fB-r\fR
144 .IQ \fB--reopen\fR
145 Causes the target application to close and reopen its log file.  (This
146 is useful after rotating log files, to cause a new log file to be
147 used.)
148
149 This has no effect if the target application was not invoked with the
150 \fB--log-file\fR option.
151
152 .IP "\fB-e \fIcommand\fR"
153 .IQ "\fB--execute=\fIcommand\fR"
154 Passes the specified \fIcommand\fR literally to the target application
155 and prints its response to stdout, if successful, or to stderr if an
156 error occurs.  Use \fB-e help\fR to print a list of available commands.
157
158 .SH OPTIONS
159
160 .so lib/common.man
161
162 .SH "SEE ALSO"
163
164 .BR ovs\-controller (8),
165 .BR ovs\-dpctl (8),
166 .BR ovs\-openflowd (8)