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