Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / apps / gdp-reader.1 @ master

History | View | Annotate | Download (4.41 KB)

1 6e2cccae Eric Allman
.Dd October 5, 2015
2
.Dt GDP-READER 1
3 b1d346a7 Eric Allman
.Os Swarm-GDP
4
.Sh NAME
5 6e2cccae Eric Allman
.Nm gdp-reader
6 b1d346a7 Eric Allman
.Nd read from a GDP log
7
.Sh SYNOPSIS
8
.Nm
9 8204d4b2 Eric Allman
.Op Fl a
10 c3369218 Eric Allman
.Op Fl b
11 b1d346a7 Eric Allman
.Op Fl c
12 65309098 Eric Allman
.Op Fl d Ar start-time
13 b1d346a7 Eric Allman
.Op Fl D Ar debug-spec
14
.Op Fl f Ar first-recno
15
.Op Fl G Ar router-ip
16
.Op Fl L Ar log-file
17
.Op Fl m
18
.Op Fl M
19
.Op Fl n Ar n-recs
20 2318b019 Eric Allman
.Op Fl o Ar output-file
21 87a0bdac Eric Allman
.Op Fl q
22 b1d346a7 Eric Allman
.Op Fl s
23
.Op Fl t
24
.Op Fl v
25 ee0cddb9 Eric Allman
.Op Fl V
26 b1d346a7 Eric Allman
.Ar log-name
27 8204d4b2 Eric Allman
.
28 b1d346a7 Eric Allman
.Sh DESCRIPTION
29
.Nm
30
reads from the GDP log
31
.Ar log-name
32
and displays the output to the standard output.
33 8204d4b2 Eric Allman
.
34 b1d346a7 Eric Allman
.Sh OPTIONS
35
.Bl -tag
36 8204d4b2 Eric Allman
.
37
.It Fl a
38
Use asynchronous reads.
39
This issues a number of multireads of length 1
40
and then collects the results.
41
.Fl a
42
is incompatible with
43
.Fl d ,
44
.Fl m ,
45
and
46
.Fl s .
47
.
48 c3369218 Eric Allman
.It Fl b
49
Output records as binary.
50
This is generally only useful in conjunction with the
51
.Fl o
52
and
53
.Fl q
54
flags.
55
.
56 8204d4b2 Eric Allman
.It Fl c
57 b1d346a7 Eric Allman
Use asynchronous callbacks when doing multi-record reads
58
(multireads or subscriptions).
59
Normally the data records are processed using synchronous events.
60 8204d4b2 Eric Allman
.
61
.It Fl d Ar start-time
62 65309098 Eric Allman
Start reading from timestamps no earlier than the indicated
63
.Ar start-time .
64
This is incompatible with the
65 8204d4b2 Eric Allman
.Fl a ,
66 65309098 Eric Allman
.Fl f ,
67
.Fl m ,
68
and
69
.Fl s
70
flags.
71 8204d4b2 Eric Allman
.
72
.It Fl D Ar debug-spec
73 b1d346a7 Eric Allman
Turn on debugging flags using the libep-style format.
74
Useful only with the code in hand.
75 8204d4b2 Eric Allman
.
76
.It Fl f Ar first-recno
77 b1d346a7 Eric Allman
Start reading from
78
.Ar first-recno .
79
The default is to read starting from the first record,
80
except when using subscriptions, when the default is to read
81
starting from the first new data added to the log.
82
Negative numbers can be specified to indicate offsets from the tail of the log;
83
for example
84
.Fl f
85
\-2
86
prints starting from the next-to-last record in the log.
87 65309098 Eric Allman
This is incompatible with the
88
.Fl d
89
flag.
90 8204d4b2 Eric Allman
.
91 b1d346a7 Eric Allman
.It Fl G Ar router-ip
92
Contact the given IP address (which may be a DNS name)
93
to get a connection to the GDP routing layer.
94
This will be replaced by automatic discovery
95
(for example, using Zeroconf)
96
soon.
97
The address may have an optional port number after a colon.
98
If this is not specified,
99
the names listed in the
100
.Va swarm.gdp.routers
101
runtime administrative parameter
102
are searched.
103 8204d4b2 Eric Allman
.
104 b1d346a7 Eric Allman
.It Fl L Ar log-file
105
If set, write a very simplistic performance log to the given
106
.Ar log-file .
107
This can be used together with the companion flag on
108 6e2cccae Eric Allman
.Xr gdp-writer 1
109 b1d346a7 Eric Allman
to produce crude round-trip performance numbers.
110 8204d4b2 Eric Allman
.
111 b1d346a7 Eric Allman
.It Fl m
112
Use multiread to collect results.
113
Multiread issues a single command that produces multiple results.
114
The default is to many read commands, each of which returns a single value.
115 8204d4b2 Eric Allman
.Fl m
116
is incompatible with
117
.Fl a ,
118
.Fl d ,
119
and
120
.Fl s
121
flags.
122
.
123 b1d346a7 Eric Allman
.It Fl M
124
Show the log metadata before showing results.
125 8204d4b2 Eric Allman
.
126 b1d346a7 Eric Allman
.It Fl n Ar n-recs
127
Only show
128
.Ar n-recs
129
worth of data and then terminate.
130
The default is to show all existing data
131
except when using subscriptions,
132
where the default is to run until the process is manually killed.
133 8204d4b2 Eric Allman
.
134 2318b019 Eric Allman
.It Fl o Ar output-file
135
Send data output to the indicated file.
136
.
137 87a0bdac Eric Allman
.It Fl q
138
Don't print metadata, such as the record number and timestamp.
139
Together with
140
.Fl t
141
this will print nothing but the raw data in the log.
142 8204d4b2 Eric Allman
.
143 b1d346a7 Eric Allman
.It Fl s
144
Use subscriptions to show the data.
145
This also changes the default first record to show to be the next record added,
146
i.e., only show newly added records
147
(settable using
148
.Fl f )
149
and changes the number of records to read to be infinite
150
(settable using
151
.Fl n ).
152
If the first record specified already exists (e.g., using
153
.Fl f
154
1
155
to print starting from the first record)
156
the subscriptions starts as though it were a multiread
157
and then converts to a subscription.
158
For example,
159
.Nm
160
.Fl s
161
.Fl f
162
\-2
163
.Fl n
164
5
165
prints the last two records in a log
166
and then the next three that arrive.
167 8204d4b2 Eric Allman
.Pp
168
The
169
.Fl s
170
flag is incompatible with the
171
.Fl a ,
172
.Fl d ,
173
and
174
.Fl m
175
flags.
176
.
177 b1d346a7 Eric Allman
.It Fl t
178
Print returned data as text.
179
Normally it is printed as a hexadecimal dump,
180
but with the character version also shown.
181 8204d4b2 Eric Allman
.
182 b1d346a7 Eric Allman
.It Fl v
183
Print verbose output.
184
This shows signature information as well as the data.
185 ee0cddb9 Eric Allman
.
186
.It Fl V
187
Verify data correctness.
188
This gives an error if the data does not validate,
189
either by the hash chain or the digital signature.
190
.
191 8204d4b2 Eric Allman
.El
192
.
193
.Pp
194
Only one of the
195
.Fl a ,
196
.Fl m ,
197
and
198
.Fl s
199
flags may be specified.
200
.
201 36033ca2 Eric Allman
.Sh EXIT STATUS
202
.Bl -tag
203
.It Li EX_OK No (0) 
204
.It Li EX_NOINPUT No (66)
205
The log to be read did not exist or was not reachable.
206
.It Li EX_SOFTWARE No (70)
207
Severe internal error.
208
.It Li EX_UNAVAILABLE No (69)
209
Other unspecified error.
210
.It Li EX_USAGE No (64)
211
Error in command line parameters.
212
.El
213
.
214 b1d346a7 Eric Allman
.\".Sh ADMINISTRATIVE PARAMETERS
215
.\".Sh ENVIRONMENT
216
.\".Sh FILES
217
.Sh SEE ALSO
218 6e2cccae Eric Allman
.Xr gdp-writer 1
219 b1d346a7 Eric Allman
.\".Sh EXAMPLES
220
.\".Sh BUGS