ovsdb: refactor, add ovsdb_monitor_max_columns()
[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 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
9 .\" This program's name:
10 .ds PN ovsdb\-client
11 .
12 .SH NAME
13 ovsdb\-client \- command-line interface to \fBovsdb-server\fR(1)
14 .
15 .SH SYNOPSIS
16 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-dbs \fR[\fIserver\fR]
17 .br
18 \fBovsdb\-client \fR[\fIoptions\fR] \fBget\-schema \fR[\fIserver\fR] \fR[\fIdatabase\fR]
19 .br
20 \fBovsdb\-client \fR[\fIoptions\fR] \fBget\-schema\-version\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]
21 .br
22 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-tables\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]
23 .br
24 \fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-columns\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] [\fItable\fR]
25 .br
26 \fBovsdb\-client \fR[\fIoptions\fR] \fBtransact\fI \fR[\fIserver\fR] \fItransaction\fR
27 .br
28 \fBovsdb\-client \fR[\fIoptions\fR] \fBdump\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]\fR [\fItable\fR
29 [\fIcolumn\fR...]]
30 .br
31 \fBovsdb\-client \fR[\fIoptions\fR] \fBmonitor\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fItable\fR
32 [\fIcolumn\fR[\fB,\fIcolumn\fR]...]...
33 .br
34 \fBovsdb\-client \fR[\fIoptions\fR] \fBmonitor\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fBALL\fR
35 .br
36 \fBovsdb\-client help\fR
37 .IP "Output formatting options:"
38 [\fB\-\-format=\fIformat\fR]
39 [\fB\-\-data=\fIformat\fR]
40 [\fB\-\-no-heading\fR]
41 [\fB\-\-pretty\fR]
42 [\fB\-\-bare\fR]
43 [\fB\-\-no\-heading\fR]
44 [\fB\-\-timestamp\fR]
45 .so lib/daemon-syn.man
46 .so lib/vlog-syn.man
47 .so lib/ssl-syn.man
48 .so lib/ssl-bootstrap-syn.man
49 .so lib/common-syn.man
50 .
51 .SH DESCRIPTION
52 The \fBovsdb\-client\fR program is a command-line client for
53 interacting with a running \fBovsdb\-server\fR process.
54 Each command connects to an OVSDB server, which is
55 \fBunix:@RUNDIR@/db.sock\fR by default, or may be specified as
56 \fIserver\fR in one of the following forms:
57 .RS
58 .so ovsdb/remote-active.man
59 .so ovsdb/remote-passive.man
60 .RE
61 .PP
62 The default \fIdatabase\fR is \fBOpen_vSwitch\fR.
63 .
64 .SS "Commands"
65 The following commands are implemented:
66 .IP "\fBlist\-dbs \fR[\fIserver\fR]"
67 Connects to \fIserver\fR, retrieves the list of known databases, and
68 prints them one per line.  These database names are the ones that may
69 be used for \fIdatabase\fR in the following commands.
70 .
71 .IP "\fBget\-schema \fR[\fIserver\fR] \fR[\fIdatabase\fR]"
72 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
73 prints it in JSON format.
74 .
75 .IP "\fBget\-schema\-version\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]"
76 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
77 prints its version number on stdout.  A schema version number has the form
78 \fIx\fB.\fIy\fB.\fIz\fR.  See \fBovs\-vswitchd.conf.db\fR(5) for
79 details.
80 .IP
81 Schema version numbers and Open vSwitch version numbers are
82 independent.
83 .IP
84 If \fIdatabase\fR was created before schema versioning was introduced,
85 then it will not have a version number and this command will print a
86 blank line.
87 .
88 .IP "\fBlist\-tables\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]"
89 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
90 prints a table listing the name of each table
91 within the database.
92 .
93 .IP "\fBlist\-columns\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fItable\fR"
94 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
95 prints a table listing the name and type of each
96 column.  If \fItable\fR is specified, only columns in that table are
97 listed; otherwise, the tables include columns in all tables.
98 .
99 .IP "\fBtransact\fI \fR[\fIserver\fR] \fItransaction\fR"
100 Connects to \fIserver\fR, sends it the specified \fItransaction\fR,
101 which must be a JSON array containing one or more valid OVSDB
102 operations, and prints the received reply on stdout.
103 .
104 .IP "\fBdump\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]\fR [\fItable \fR[\fIcolumn\fR...]]"
105 Connects to \fIserver\fR, retrieves all of the data in \fIdatabase\fR,
106 and prints it on stdout as a series of tables. If \fItable\fR is
107 specified, only that table is retrieved.  If at least one \fIcolumn\fR
108 is specified, only those columns are retrieved.
109 .
110 .IP "\fBmonitor\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fItable\fR [\fIcolumn\fR[\fB,\fIcolumn\fR]...]..."
111 Connects to \fIserver\fR and monitors the contents of \fItable\fR in
112 \fIdatabase\fR.  By default, the initial contents of \fItable\fR are
113 printed, followed by each change as it occurs.  If at least one
114 \fIcolumn\fR is specified, only those columns are monitored.  The
115 following \fIcolumn\fR names have special meanings:
116 .RS
117 .IP "\fB!initial\fR"
118 Do not print the initial contents of the specified columns.
119 .IP "\fB!insert\fR"
120 Do not print newly inserted rows.
121 .IP "\fB!delete\fR"
122 Do not print deleted rows.
123 .IP "\fB!modify\fR"
124 Do not print modifications to existing rows.
125 .RE
126 .IP
127 Multiple [\fIcolumn\fR[\fB,\fIcolumn\fR]...] groups may be specified
128 as separate arguments, e.g. to apply different reporting parameters to
129 each group.  Whether multiple groups or only a single group is
130 specified, any given column may only be mentioned once on the command
131 line.
132 .IP
133 If \fB\-\-detach\fR is used with \fBmonitor\fR, then \fBovsdb\-client\fR
134 detaches after it has successfully received and printed the initial
135 contents of \fItable\fR.
136 .
137 .IP "\fBmonitor\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fBALL\fR"
138 Connects to \fIserver\fR and monitors the contents of all tables in
139 \fIdatabase\fR.  Prints initial values and all kinds of changes to all
140 columns in the database.  The \fB\-\-detach\fR option causes
141 \fBovsdb\-client\fR to detach after it successfully receives and
142 prints the initial database contents.
143 .
144 .SH OPTIONS
145 .SS "Output Formatting Options"
146 Much of the output from \fBovsdb\-client\fR is in the form of tables.
147 The following options controlling output formatting:
148 .
149 .ds TD (default)
150 .so lib/table.man
151 .
152 .IP "\fB\-\-timestamp\fR"
153 For the \fBmonitor\fR command, adds a timestamp to each table
154 update.  Most output formats add the timestamp on a line of its own
155 just above the table.  The JSON output format puts the timestamp in a
156 member of the top-level JSON object named \fBtime\fR.
157 .
158 .SS "Daemon Options"
159 The daemon options apply only to the \fBmonitor\fR command.  With any
160 other command, they have no effect.
161 .ds DD
162 .so lib/daemon.man
163 .SS "Logging Options"
164 .so lib/vlog.man
165 .SS "Public Key Infrastructure Options"
166 .so lib/ssl.man
167 .so lib/ssl-bootstrap.man
168 .SS "Other Options"
169 .so lib/common.man
170 .SH "SEE ALSO"
171 .
172 \fBovsdb\-server\fR(1),
173 \fBovsdb\-client\fR(1),
174 and the OVSDB specification.