Merge "master" into "next".
[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 [\fIselect\fR[\fB,\fIselect\fR]...]
30 .br
31 \fBovsdb\-client help\fR
32 .IP "Output formatting options:"
33 [\fB--format=\fIformat\fR]
34 [\fB--no-heading\fR]
35 .so lib/daemon-syn.man
36 .so lib/vlog-syn.man
37 .so lib/ssl-syn.man
38 .so lib/ssl-bootstrap-syn.man
39 .so lib/common-syn.man
40 .
41 .SH DESCRIPTION
42 The \fBovsdb\-client\fR program is a command-line client for
43 interacting with a running \fBovsdb\-server\fR process.  For each
44 command, the \fIserver\fR to connect to must be specified in one of
45 the following forms:
46 .RS
47 .so ovsdb/remote-active.man
48 .so ovsdb/remote-passive.man
49 .RE
50 .
51 .SS "Commands"
52 The following commands are implemented:
53 .IP "\fBlist-dbs\fI server\fR"
54 Connects to \fIserver\fR, retrieves the list of known databases, and
55 prints them one per line.  These database names are the ones that may
56 be used for \fIdatabase\fR in the following commands.
57 .
58 .IP "\fBget-schema\fI server database\fR"
59 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
60 prints it in JSON format.
61 .
62 .IP "\fBlist-tables\fI server database\fR"
63 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
64 prints a table listing the names and comments (if any) on each table
65 within the database.
66 .
67 .IP "\fBlist-columns\fI server database \fR[\fItable\fR]"
68 Connects to \fIserver\fR, retrieves the schema for \fIdatabase\fR, and
69 prints a table listing the names, type, and comment (if any) on each
70 column.  If \fItable\fR is specified, only columns in that table are
71 listed; otherwise, the tables include columns in all tables.
72 .
73 .IP "\fBtransact\fI server transaction\fR"
74 Connects to \fIserver\fR, sends it the specified \fItransaction\fR,
75 which must be a JSON array containing one or more valid OVSDB
76 operations, and prints the received reply on stdout.
77 .
78 .IP "\fBdump\fI server database\fR"
79 Connects to \fIserver\fR, retrieves all of the data in \fIdatabase\fR,
80 and prints it on stdout as a series of tables.
81 .
82 .IP "\fBmonitor\fI server database table\fR [\fIcolumn\fR[\fB,\fIcolumn\fR]...] [\fIselect\fR[\fB,\fIselect\fR]...]"
83 Connects to \fIserver\fR and monitors the contents of \fItable\fR in
84 \fIdatabase\fR.  By default, the initial contents of \fItable\fR are
85 printed, followed by each change as it occurs.  If at least one
86 \fIcolumn\fR is specified, only those columns are monitored.  If at
87 least one \fIselect\fR is specified, they are interpreted as follows:
88 .RS
89 .IP "\fBinitial\fR"
90 Print the initial contents of the specified columns.
91 .IP "\fBinsert\fR"
92 Print newly inserted rows.
93 .IP "\fBdelete\fR"
94 Print deleted rows.
95 .IP "\fBmodify\fR"
96 Print old and new values of modified rows.
97 .RE
98 .IP
99 If \fB--detach\fR is used with \fBmonitor\fR, then \fBovsdb\-client\fR
100 detaches after it has successfully received and printed the initial
101 contents of \fItable\fR.
102 .SH OPTIONS
103 .SS "Output Formatting Options"
104 Much of the output from \fBovsdb\-client\fR is in the form of tables.
105 The following options controlling output formatting:
106 .
107 .IP "\fB-f \fIformat\fR"
108 .IQ "\fB--format=\fIformat\fR"
109 Sets the type of table formatting.  The following types of
110 \fIformat\fR are available:
111 .RS
112 .IP "\fBtable\fR (default)"
113 Text-based tables with aligned columns.
114 .IP "\fBhtml\fR"
115 HTML tables.
116 .IP "\fBcvs\fR"
117 Comma-separated values as defined in RFC 4180.
118 .RE
119 .
120 .IP "\fB-d \fIformat\fR"
121 .IP "\fB--data=\fIformat\fR"
122 Sets the formatting for cells within output tables.  The following
123 types of \fIformat\fR are available:
124 .RS
125 .IP "\fBstring\fR (default)"
126 The simple format described in \fBovs-vsctl\fR(8).
127 .IP "\fBjson\fR"
128 JSON.
129 .RE
130 .
131 .IP "\fB--no-heading\fR"
132 This option suppresses the heading row that otherwise appears in the
133 first row of table output.
134 .
135 .IP "\fB--pretty\fR"
136 By default, JSON in output is printed as compactly as possible.  This
137 option causes JSON in output to be printed in a more readable
138 fashion.  Members of objects and elements of arrays are printed one
139 per line, with indentation.
140 .IP
141 This option does not affect JSON in tables, which is always printed
142 compactly.
143 .
144 .SS "Daemon Options"
145 The daemon options apply only to the \fBmonitor\fR command.  With any
146 other command, they have no effect.
147 .so lib/daemon.man
148 .SS "Logging Options"
149 .so lib/vlog.man
150 .so lib/ssl.man
151 .so lib/ssl-bootstrap.man
152 .SS "Other Options"
153 .so lib/common.man
154 .SH "SEE ALSO"
155 .
156 \fBovsdb\-server\fR(1),
157 \fBovsdb\-client\fR(1),
158 and the OVSDB specification.