8 .TH ovsdb\-client 1 "November 2009" "Open vSwitch" "Open vSwitch Manual"
9 .\" This program's name:
11 .\" SSL peer program's name:
15 ovsdb\-client \- command-line interface to \fBovsdb-server\fR(1)
18 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-dbs\fI server\fR
20 \fBovsdb\-client \fR[\fIoptions\fR] \fBget\-schema\fI server database\fR
22 \fBovsdb\-client \fR[\fIoptions\fR] \fBget\-schema\-version\fI server database\fR
24 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-tables\fI server database\fR
26 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-columns\fI server database \fR[\fItable\fR]
28 \fBovsdb\-client \fR[\fIoptions\fR] \fBtransact\fI server transaction\fR
30 \fBovsdb\-client \fR[\fIoptions\fR] \fBdump\fI server database\fR
32 \fBovsdb\-client \fR[\fIoptions\fR] \fBmonitor\fI server database table\fR
33 [\fIcolumn\fR[\fB,\fIcolumn\fR]...]...
35 \fBovsdb\-client help\fR
36 .IP "Output formatting options:"
37 [\fB\-\-format=\fIformat\fR]
38 [\fB\-\-no\-heading\fR]
39 .so lib/daemon-syn.man
42 .so lib/ssl-bootstrap-syn.man
43 .so lib/common-syn.man
46 The \fBovsdb\-client\fR program is a command-line client for
47 interacting with a running \fBovsdb\-server\fR process. For each
48 command, the \fIserver\fR to connect to must be specified in one of
51 .so ovsdb/remote-active.man
52 .so ovsdb/remote-passive.man
56 The following commands are implemented:
57 .IP "\fBlist\-dbs\fI server\fR"
58 Connects to \fIserver\fR, retrieves the list of known databases, and
59 prints them one per line. These database names are the ones that may
60 be used for \fIdatabase\fR in the following commands.
62 .IP "\fBget\-schema\fI server database\fR"
63 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
64 prints it in JSON format.
66 .IP "\fBget\-schema\-version\fI server database\fR"
67 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
68 prints its version number on stdout. A schema version number has the form
69 \fIx\fB.\fIy\fB.\fIz\fR. See \fBovs\-vswitchd.conf.db\fR(5) for
72 Schema version numbers and Open vSwitch version numbers are
75 If \fIdatabase\fR was created before schema versioning was introduced,
76 then it will not have a version number and this command will print a
79 .IP "\fBlist\-tables\fI server database\fR"
80 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
81 prints a table listing the name of each table
84 .IP "\fBlist\-columns\fI server database \fR[\fItable\fR]"
85 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
86 prints a table listing the name and type of each
87 column. If \fItable\fR is specified, only columns in that table are
88 listed; otherwise, the tables include columns in all tables.
90 .IP "\fBtransact\fI server transaction\fR"
91 Connects to \fIserver\fR, sends it the specified \fItransaction\fR,
92 which must be a JSON array containing one or more valid OVSDB
93 operations, and prints the received reply on stdout.
95 .IP "\fBdump\fI server database\fR"
96 Connects to \fIserver\fR, retrieves all of the data in \fIdatabase\fR,
97 and prints it on stdout as a series of tables.
99 .IP "\fBmonitor\fI server database table\fR [\fIcolumn\fR[\fB,\fIcolumn\fR]...]..."
100 Connects to \fIserver\fR and monitors the contents of \fItable\fR in
101 \fIdatabase\fR. By default, the initial contents of \fItable\fR are
102 printed, followed by each change as it occurs. If at least one
103 \fIcolumn\fR is specified, only those columns are monitored. The
104 following \fIcolumn\fR names have special meanings:
107 Do not print the initial contents of the specified columns.
109 Do not print newly inserted rows.
111 Do not print deleted rows.
113 Do not print modifications to existing rows.
116 Multiple [\fIcolumn\fR[\fB,\fIcolumn\fR]...] groups may be specified
117 as separate arguments, e.g. to apply different reporting parameters to
118 each group. Whether multiple groups or only a single group is
119 specified, any given column may only be mentioned once on the command
122 If \fB\-\-detach\fR is used with \fBmonitor\fR, then \fBovsdb\-client\fR
123 detaches after it has successfully received and printed the initial
124 contents of \fItable\fR.
126 .SS "Output Formatting Options"
127 Much of the output from \fBovsdb\-client\fR is in the form of tables.
128 The following options controlling output formatting:
130 .IP "\fB\-f \fIformat\fR"
131 .IQ "\fB\-\-format=\fIformat\fR"
132 Sets the type of table formatting. The following types of
133 \fIformat\fR are available:
135 .IP "\fBtable\fR (default)"
136 Text-based tables with aligned columns.
140 Comma-separated values as defined in RFC 4180.
142 JSON format as defined in RFC 4627. The output is a sequence of JSON
143 objects, each of which corresponds to one table. Each JSON object has
144 the following members with the noted values:
147 The table's caption. This member is omitted if the table has no
150 An array with one element per table column. Each array element is a
151 string giving the corresponding column's heading.
153 An array with one element per table row. Each element is also an
154 array with one element per table column. The elements of this
155 second-level array are the cells that constitute the table. Cells
156 that represent OVSDB data or data types are expressed in the format
157 described in the OVSDB specification; other cells are simply expressed
162 .IP "\fB\-d \fIformat\fR"
163 .IP "\fB\-\-data=\fIformat\fR"
164 Sets the formatting for cells within output tables. The following
165 types of \fIformat\fR are available:
167 .IP "\fBstring\fR (default)"
168 The simple format described in \fBovs\-vsctl\fR(8).
173 The \fBjson\fR output format always outputs cells in JSON format,
174 ignoring this option.
176 .IP "\fB\-\-no\-heading\fR"
177 This option suppresses the heading row that otherwise appears in the
178 first row of table output.
180 .IP "\fB\-\-pretty\fR"
181 By default, JSON in output is printed as compactly as possible. This
182 option causes JSON in output to be printed in a more readable
183 fashion. Members of objects and elements of arrays are printed one
184 per line, with indentation.
186 This option does not affect JSON in tables, which is always printed
190 The daemon options apply only to the \fBmonitor\fR command. With any
191 other command, they have no effect.
193 .SS "Logging Options"
195 .SS "Public Key Infrastructure Options"
197 .so lib/ssl-bootstrap.man
202 \fBovsdb\-server\fR(1),
203 \fBovsdb\-client\fR(1),
204 and the OVSDB specification.