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