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