gdp / apps / gdp-reader.1 @ master
History | View | Annotate | Download (4.41 KB)
1 |
.Dd October 5, 2015 |
---|---|
2 |
.Dt GDP-READER 1 |
3 |
.Os Swarm-GDP |
4 |
.Sh NAME |
5 |
.Nm gdp-reader |
6 |
.Nd read from a GDP log |
7 |
.Sh SYNOPSIS |
8 |
.Nm |
9 |
.Op Fl a |
10 |
.Op Fl b |
11 |
.Op Fl c |
12 |
.Op Fl d Ar start-time |
13 |
.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 |
.Op Fl o Ar output-file |
21 |
.Op Fl q |
22 |
.Op Fl s |
23 |
.Op Fl t |
24 |
.Op Fl v |
25 |
.Op Fl V |
26 |
.Ar log-name |
27 |
. |
28 |
.Sh DESCRIPTION |
29 |
.Nm |
30 |
reads from the GDP log |
31 |
.Ar log-name |
32 |
and displays the output to the standard output. |
33 |
. |
34 |
.Sh OPTIONS |
35 |
.Bl -tag |
36 |
. |
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 |
.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 |
.It Fl c |
57 |
Use asynchronous callbacks when doing multi-record reads |
58 |
(multireads or subscriptions). |
59 |
Normally the data records are processed using synchronous events. |
60 |
. |
61 |
.It Fl d Ar start-time |
62 |
Start reading from timestamps no earlier than the indicated |
63 |
.Ar start-time . |
64 |
This is incompatible with the |
65 |
.Fl a , |
66 |
.Fl f , |
67 |
.Fl m , |
68 |
and |
69 |
.Fl s |
70 |
flags. |
71 |
. |
72 |
.It Fl D Ar debug-spec |
73 |
Turn on debugging flags using the libep-style format. |
74 |
Useful only with the code in hand. |
75 |
. |
76 |
.It Fl f Ar first-recno |
77 |
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 |
This is incompatible with the |
88 |
.Fl d |
89 |
flag. |
90 |
. |
91 |
.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 |
. |
104 |
.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 |
.Xr gdp-writer 1 |
109 |
to produce crude round-trip performance numbers. |
110 |
. |
111 |
.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 |
.Fl m |
116 |
is incompatible with |
117 |
.Fl a , |
118 |
.Fl d , |
119 |
and |
120 |
.Fl s |
121 |
flags. |
122 |
. |
123 |
.It Fl M |
124 |
Show the log metadata before showing results. |
125 |
. |
126 |
.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 |
. |
134 |
.It Fl o Ar output-file |
135 |
Send data output to the indicated file. |
136 |
. |
137 |
.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 |
. |
143 |
.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 |
.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 |
.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 |
. |
182 |
.It Fl v |
183 |
Print verbose output. |
184 |
This shows signature information as well as the data. |
185 |
. |
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 |
.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 |
.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 |
.\".Sh ADMINISTRATIVE PARAMETERS |
215 |
.\".Sh ENVIRONMENT |
216 |
.\".Sh FILES |
217 |
.Sh SEE ALSO |
218 |
.Xr gdp-writer 1 |
219 |
.\".Sh EXAMPLES |
220 |
.\".Sh BUGS |