]> git.proxmox.com Git - mirror_ovs.git/blame - ovsdb/ovsdb-client.1.in
ovn: fix ovn-northd leak in build_acls
[mirror_ovs.git] / ovsdb / ovsdb-client.1.in
CommitLineData
d0632593
BP
1.\" -*- nroff -*-
2.de IQ
3. br
4. ns
5. IP "\\$1"
6..
7.\" -*- nroff -*-
d2cb6c95 8.TH ovsdb\-client 1 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
812560d7 9.\" This program's name:
d0632593
BP
10.ds PN ovsdb\-client
11.
12.SH NAME
13ovsdb\-client \- command-line interface to \fBovsdb-server\fR(1)
14.
15.SH SYNOPSIS
53ffefe9 16\fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-dbs \fR[\fIserver\fR]
d0632593 17.br
53ffefe9 18\fBovsdb\-client \fR[\fIoptions\fR] \fBget\-schema \fR[\fIserver\fR] \fR[\fIdatabase\fR]
d0632593 19.br
53ffefe9 20\fBovsdb\-client \fR[\fIoptions\fR] \fBget\-schema\-version\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]
8159b984 21.br
53ffefe9 22\fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-tables\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]
9cb53f26 23.br
53ffefe9 24\fBovsdb\-client \fR[\fIoptions\fR] \fBlist\-columns\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] [\fItable\fR]
d0632593 25.br
53ffefe9 26\fBovsdb\-client \fR[\fIoptions\fR] \fBtransact\fI \fR[\fIserver\fR] \fItransaction\fR
6d65eee8 27.br
b30aa413
BV
28\fBovsdb\-client \fR[\fIoptions\fR] \fBdump\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]\fR [\fItable\fR
29[\fIcolumn\fR...]]
25c269ef 30.br
53ffefe9 31\fBovsdb\-client \fR[\fIoptions\fR] \fBmonitor\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fItable\fR
20aa445d 32[\fIcolumn\fR[\fB,\fIcolumn\fR]...]...
a8425c53 33.br
4227b221
BP
34\fBovsdb\-client \fR[\fIoptions\fR] \fBmonitor\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fBALL\fR
35.br
c383f3bf
LS
36\fBovsdb\-client \fR[\fIoptions\fR] \fBmonitor-cond\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fIconditions
37\fItable\fR [\fIcolumn\fR[\fB,\fIcolumn\fR]...]...
85226894 38.br
9aeba3f4
AZ
39\fBovsdb\-client \fR[\fIoptions\fR] \fBlock\fI \fR[\fIserver\fR] \fIlock\fR
40.br
41\fBovsdb\-client \fR[\fIoptions\fR] \fBsteal\fI \fR[\fIserver\fR] \fIlock\fR
42.br
43\fBovsdb\-client \fR[\fIoptions\fR] \fBunlock\fI \fR[\fIserver\fR] \fIlock\fR
44.br
d0632593
BP
45\fBovsdb\-client help\fR
46.IP "Output formatting options:"
4e312e69 47[\fB\-\-format=\fIformat\fR]
c2158145
BP
48[\fB\-\-data=\fIformat\fR]
49[\fB\-\-no-heading\fR]
50[\fB\-\-pretty\fR]
51[\fB\-\-bare\fR]
4e312e69 52[\fB\-\-no\-heading\fR]
8f46c9bb 53[\fB\-\-timestamp\fR]
3f262d7d 54.so lib/daemon-syn.man
d0632593 55.so lib/vlog-syn.man
9467fe62
BP
56.so lib/ssl-syn.man
57.so lib/ssl-bootstrap-syn.man
d0632593
BP
58.so lib/common-syn.man
59.
60.SH DESCRIPTION
61The \fBovsdb\-client\fR program is a command-line client for
53ffefe9
BP
62interacting with a running \fBovsdb\-server\fR process.
63Each command connects to an OVSDB server, which is
64\fBunix:@RUNDIR@/db.sock\fR by default, or may be specified as
65\fIserver\fR in one of the following forms:
9467fe62
BP
66.RS
67.so ovsdb/remote-active.man
68.so ovsdb/remote-passive.man
69.RE
53ffefe9
BP
70.PP
71The default \fIdatabase\fR is \fBOpen_vSwitch\fR.
d0632593
BP
72.
73.SS "Commands"
74The following commands are implemented:
53ffefe9 75.IP "\fBlist\-dbs \fR[\fIserver\fR]"
9cb53f26
BP
76Connects to \fIserver\fR, retrieves the list of known databases, and
77prints them one per line. These database names are the ones that may
78be used for \fIdatabase\fR in the following commands.
79.
53ffefe9 80.IP "\fBget\-schema \fR[\fIserver\fR] \fR[\fIdatabase\fR]"
9cb53f26
BP
81Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
82prints it in JSON format.
d0632593 83.
53ffefe9 84.IP "\fBget\-schema\-version\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]"
8159b984
BP
85Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
86prints its version number on stdout. A schema version number has the form
87\fIx\fB.\fIy\fB.\fIz\fR. See \fBovs\-vswitchd.conf.db\fR(5) for
88details.
89.IP
90Schema version numbers and Open vSwitch version numbers are
91independent.
92.IP
93If \fIdatabase\fR was created before schema versioning was introduced,
94then it will not have a version number and this command will print a
95blank line.
96.
4f77c886 97.IP "\fBlist\-tables\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]"
9cb53f26 98Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
2e57b537 99prints a table listing the name of each table
9cb53f26 100within the database.
d0632593 101.
53ffefe9 102.IP "\fBlist\-columns\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fItable\fR"
9cb53f26 103Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
2e57b537 104prints a table listing the name and type of each
9cb53f26
BP
105column. If \fItable\fR is specified, only columns in that table are
106listed; otherwise, the tables include columns in all tables.
a8425c53 107.
53ffefe9 108.IP "\fBtransact\fI \fR[\fIserver\fR] \fItransaction\fR"
6d65eee8
BP
109Connects to \fIserver\fR, sends it the specified \fItransaction\fR,
110which must be a JSON array containing one or more valid OVSDB
111operations, and prints the received reply on stdout.
a8425c53 112.
b30aa413 113.IP "\fBdump\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR]\fR [\fItable \fR[\fIcolumn\fR...]]"
25c269ef 114Connects to \fIserver\fR, retrieves all of the data in \fIdatabase\fR,
b30aa413
BV
115and prints it on stdout as a series of tables. If \fItable\fR is
116specified, only that table is retrieved. If at least one \fIcolumn\fR
117is specified, only those columns are retrieved.
25c269ef 118.
4f77c886 119.IP "\fBmonitor\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fItable\fR [\fIcolumn\fR[\fB,\fIcolumn\fR]...]..."
c383f3bf
LS
120.IQ "\fBmonitor-cond\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fIconditions\fR \fItable\fR [\fIcolumn\fR[\fB,\fIcolumn\fR]...]..."
121Connects to \fIserver\fR and monitors the contents of rows that match conditions in
122\fItable\fR in \fIdatabase\fR. By default, the initial contents of \fItable\fR are
123printed, followed by each change as it occurs. If conditions empty,
124all rows will be monitored. If at least one \fIcolumn\fR is specified, only those
125columns are monitored. The following \fIcolumn\fR names have special meanings:
a8425c53 126.RS
20aa445d
BP
127.IP "\fB!initial\fR"
128Do not print the initial contents of the specified columns.
129.IP "\fB!insert\fR"
130Do not print newly inserted rows.
131.IP "\fB!delete\fR"
132Do not print deleted rows.
133.IP "\fB!modify\fR"
134Do not print modifications to existing rows.
a8425c53 135.RE
3f262d7d 136.IP
20aa445d
BP
137Multiple [\fIcolumn\fR[\fB,\fIcolumn\fR]...] groups may be specified
138as separate arguments, e.g. to apply different reporting parameters to
139each group. Whether multiple groups or only a single group is
140specified, any given column may only be mentioned once on the command
141line.
142.IP
c383f3bf
LS
143\fBconditions\fR is a JSON array of <condition> as defined in RFC 7047 5.1
144with the following change: A condition can be either a 3-element JSON array
145as deescribed in the RFC or a boolean value..
146.IP
147If \fB\-\-detach\fR is used with \fBmonitor\fR or \fBmonitor-cond\fR, then
85226894
AZ
148\fBovsdb\-client\fR detaches after it has successfully received and
149printed the initial contents of \fItable\fR.
150.IP
151The \fBmonitor\fR command uses RFC 7047 "monitor" method to open a monitor
c383f3bf
LS
152session with the server. The \fBmonitor-cond\fR command uses RFC 7047
153extension "monitor_cond" method. See \fBovsdb\-server\fR(1) for details.
4227b221
BP
154.IP "\fBmonitor\fI \fR[\fIserver\fR] \fR[\fIdatabase\fR] \fBALL\fR"
155Connects to \fIserver\fR and monitors the contents of all tables in
156\fIdatabase\fR. Prints initial values and all kinds of changes to all
157columns in the database. The \fB\-\-detach\fR option causes
158\fBovsdb\-client\fR to detach after it successfully receives and
159prints the initial database contents.
85226894
AZ
160.IP
161The \fBmonitor\fR command uses RFC 7047 "monitor" method to open a monitor
c383f3bf 162session with the server.
4227b221 163.
9aeba3f4
AZ
164.SH TESTING COMMANDS
165The following commands are mostly of interest for testing the correctness
166of the OVSDB server.
167.
168.IP "\fBovsdb\-client\fR [\fIoptions\fR] \fBlock\fI \fR[\fIserver\fR] \fIlock\fR"
169.IQ "\fBovsdb\-client\fR [\fIoptions\fR] \fBsteal\fI \fR[\fIserver\fR] \fIlock\fR"
170.IQ "\fBovsdb\-client\fR [\fIoptions\fR] \fBunlock\fI \fR[\fIserver\fR] \fIlock\fR"
171Connects to \fIserver\fR and issues corresponding RFC 7047 lock operations
172on \fIlock\fR. Prints json reply or subsequent update messages.
173The \fB\-\-detach\fR option causes \fBovsdb\-client\fR to detach after it
174successfully receives and prints the initial reply.
175.IP
176When running with the \fB\-\-detach\fR option, \fBlock\fR, \fBsteal\fR,
177\fBunlock\fR and \fBexit\fR commands can be issued by using
178\fBovs-appctl\fR. \fBexit\fR command causes the \fBovsdb\-client\fR to
179close its \fBovsdb\-server\fR connection before exit.
180The \fBlock\fR, \fBsteal\fR and \fBunlock\fR commands can be used to
181issue additional lock operations over the same \fBovsdb\-server\fR connection. All above commands take a single \fIlock\fR argument, which does not have
182to be the same as the \fIlock\fR that \fBovsdb\-client\fR started with.
183.
d0632593
BP
184.SH OPTIONS
185.SS "Output Formatting Options"
186Much of the output from \fBovsdb\-client\fR is in the form of tables.
187The following options controlling output formatting:
188.
c6a41252 189.ds TD (default)
3a3eb9da 190.so lib/table.man
b87fde85 191.
8f46c9bb 192.IP "\fB\-\-timestamp\fR"
c383f3bf 193For the \fBmonitor\fR and \fBmonitor-cond\fR commands, add a timestamp to each
85226894 194table update. Most output formats add the timestamp on a line of its own
8f46c9bb
BP
195just above the table. The JSON output format puts the timestamp in a
196member of the top-level JSON object named \fBtime\fR.
197.
3f262d7d 198.SS "Daemon Options"
c383f3bf 199The daemon options apply only to the \fBmonitor\fR and \fBmonitor-cond\fR commands.
85226894 200With any other command, they have no effect.
58f870d0 201.ds DD
3f262d7d
BP
202.so lib/daemon.man
203.SS "Logging Options"
204.so lib/vlog.man
ac300505 205.SS "Public Key Infrastructure Options"
9467fe62
BP
206.so lib/ssl.man
207.so lib/ssl-bootstrap.man
d0632593
BP
208.SS "Other Options"
209.so lib/common.man
210.SH "SEE ALSO"
211.
212\fBovsdb\-server\fR(1),
213\fBovsdb\-client\fR(1),
214and the OVSDB specification.