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