ovsdb: Extend "monitor" to select different operations in a single table.
[cascardo/ovs.git] / ovsdb / ovsdb-client.1.in
1 .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .\" -*- nroff -*-
8 .TH ovsdb\-client 1 "November 2009" "Open vSwitch" "Open vSwitch Manual"
9 .ds PN ovsdb\-client
10 .
11 .SH NAME
12 ovsdb\-client \- command-line interface to \fBovsdb-server\fR(1)
13 .
14 .SH SYNOPSIS
15 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-dbs\fI server\fR
16 .br
17 \fBovsdb\-client \fR[\fIoptions\fR] \fBget\-schema\fI server database\fR
18 .br
19 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-tables\fI server database\fR
20 .br
21 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-columns\fI server database \fR[\fItable\fR]
22 .br
23 \fBovsdb\-client \fR[\fIoptions\fR] \fBtransact\fI server transaction\fR
24 .br
25 \fBovsdb\-client \fR[\fIoptions\fR] \fBdump\fI server database\fR
26 .br
27 \fBovsdb\-client \fR[\fIoptions\fR] \fBmonitor\fI server database table\fR
28 [\fIcolumn\fR[\fB,\fIcolumn\fR]...]...
29 .br
30 \fBovsdb\-client help\fR
31 .IP "Output formatting options:"
32 [\fB\-\-format=\fIformat\fR]
33 [\fB\-\-no\-heading\fR]
34 .so lib/daemon-syn.man
35 .so lib/vlog-syn.man
36 .so lib/ssl-syn.man
37 .so lib/ssl-bootstrap-syn.man
38 .so lib/common-syn.man
39 .
40 .SH DESCRIPTION
41 The \fBovsdb\-client\fR program is a command-line client for
42 interacting with a running \fBovsdb\-server\fR process.  For each
43 command, the \fIserver\fR to connect to must be specified in one of
44 the following forms:
45 .RS
46 .so ovsdb/remote-active.man
47 .so ovsdb/remote-passive.man
48 .RE
49 .
50 .SS "Commands"
51 The following commands are implemented:
52 .IP "\fBlist\-dbs\fI server\fR"
53 Connects to \fIserver\fR, retrieves the list of known databases, and
54 prints them one per line.  These database names are the ones that may
55 be used for \fIdatabase\fR in the following commands.
56 .
57 .IP "\fBget\-schema\fI server database\fR"
58 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
59 prints it in JSON format.
60 .
61 .IP "\fBlist\-tables\fI server database\fR"
62 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
63 prints a table listing the name of each table
64 within the database.
65 .
66 .IP "\fBlist\-columns\fI server database \fR[\fItable\fR]"
67 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
68 prints a table listing the name and type of each
69 column.  If \fItable\fR is specified, only columns in that table are
70 listed; otherwise, the tables include columns in all tables.
71 .
72 .IP "\fBtransact\fI server transaction\fR"
73 Connects to \fIserver\fR, sends it the specified \fItransaction\fR,
74 which must be a JSON array containing one or more valid OVSDB
75 operations, and prints the received reply on stdout.
76 .
77 .IP "\fBdump\fI server database\fR"
78 Connects to \fIserver\fR, retrieves all of the data in \fIdatabase\fR,
79 and prints it on stdout as a series of tables.
80 .
81 .IP "\fBmonitor\fI server database table\fR [\fIcolumn\fR[\fB,\fIcolumn\fR]...]..."
82 Connects to \fIserver\fR and monitors the contents of \fItable\fR in
83 \fIdatabase\fR.  By default, the initial contents of \fItable\fR are
84 printed, followed by each change as it occurs.  If at least one
85 \fIcolumn\fR is specified, only those columns are monitored.  The
86 following \fIcolumn\fR names have special meanings:
87 .RS
88 .IP "\fB!initial\fR"
89 Do not print the initial contents of the specified columns.
90 .IP "\fB!insert\fR"
91 Do not print newly inserted rows.
92 .IP "\fB!delete\fR"
93 Do not print deleted rows.
94 .IP "\fB!modify\fR"
95 Do not print modifications to existing rows.
96 .RE
97 .IP
98 Multiple [\fIcolumn\fR[\fB,\fIcolumn\fR]...] groups may be specified
99 as separate arguments, e.g. to apply different reporting parameters to
100 each group.  Whether multiple groups or only a single group is
101 specified, any given column may only be mentioned once on the command
102 line.
103 .IP
104 If \fB\-\-detach\fR is used with \fBmonitor\fR, then \fBovsdb\-client\fR
105 detaches after it has successfully received and printed the initial
106 contents of \fItable\fR.
107 .SH OPTIONS
108 .SS "Output Formatting Options"
109 Much of the output from \fBovsdb\-client\fR is in the form of tables.
110 The following options controlling output formatting:
111 .
112 .IP "\fB\-f \fIformat\fR"
113 .IQ "\fB\-\-format=\fIformat\fR"
114 Sets the type of table formatting.  The following types of
115 \fIformat\fR are available:
116 .RS
117 .IP "\fBtable\fR (default)"
118 Text-based tables with aligned columns.
119 .IP "\fBhtml\fR"
120 HTML tables.
121 .IP "\fBcvs\fR"
122 Comma-separated values as defined in RFC 4180.
123 .RE
124 .
125 .IP "\fB\-d \fIformat\fR"
126 .IP "\fB\-\-data=\fIformat\fR"
127 Sets the formatting for cells within output tables.  The following
128 types of \fIformat\fR are available:
129 .RS
130 .IP "\fBstring\fR (default)"
131 The simple format described in \fBovs\-vsctl\fR(8).
132 .IP "\fBjson\fR"
133 JSON.
134 .RE
135 .
136 .IP "\fB\-\-no\-heading\fR"
137 This option suppresses the heading row that otherwise appears in the
138 first row of table output.
139 .
140 .IP "\fB\-\-pretty\fR"
141 By default, JSON in output is printed as compactly as possible.  This
142 option causes JSON in output to be printed in a more readable
143 fashion.  Members of objects and elements of arrays are printed one
144 per line, with indentation.
145 .IP
146 This option does not affect JSON in tables, which is always printed
147 compactly.
148 .
149 .SS "Daemon Options"
150 The daemon options apply only to the \fBmonitor\fR command.  With any
151 other command, they have no effect.
152 .so lib/daemon.man
153 .SS "Logging Options"
154 .so lib/vlog.man
155 .SS "Public Key Infrastructure Options"
156 .so lib/ssl.man
157 .so lib/ssl-bootstrap.man
158 .SS "Other Options"
159 .so lib/common.man
160 .SH "SEE ALSO"
161 .
162 \fBovsdb\-server\fR(1),
163 \fBovsdb\-client\fR(1),
164 and the OVSDB specification.