Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / apps / gdp-writer.1 @ master

History | View | Annotate | Download (3.35 KB)

1 b1d346a7 Eric Allman
.Dd October 4, 2015
2 6e2cccae Eric Allman
.Dt GDP-WRITER 1
3 b1d346a7 Eric Allman
.Os Swarm-GDP
4
.Sh NAME
5 6e2cccae Eric Allman
.Nm gdp-writer
6 b1d346a7 Eric Allman
.Nd write to a GDP log
7
.Sh SYNOPSIS
8
.Nm
9 0cb4611f Eric Allman
.Op Fl 1
10 b1d346a7 Eric Allman
.Op Fl a
11 31012ba0 Eric Allman
.Op Fl D Ar debug-spec
12
.Op Fl G Ar router-ip
13 1f3adfd0 Eric Allman
.Op Fl i
14
.Op Fl K Ar key-file
15 31012ba0 Eric Allman
.Op Fl L Ar log-file
16 0cb4611f Eric Allman
.Op Fl q
17 49d76189 Eric Allman
.Op Fl S
18 b1d346a7 Eric Allman
.Ar log-name
19
.Sh DESCRIPTION
20
.Nm
21
reads data from the standard input and writes it to the GDP log
22
.Ar log-name .
23
The log must already exist.
24 37960b88 Eric Allman
Each line read from the standard input becomes one record in the log.
25 b1d346a7 Eric Allman
.Pp
26
If the log has a public key included in the metadata
27
(see
28
.Xr gcl-create 8 )
29
then
30
.Nm
31
will try to find a corresponding secret key in the filesystem.
32
It searches for a file named with the internal (256 bit) name of the log
33
as represented in
34
base64url
35
format with a
36
.Sy \&.pem
37
file extension containing the secret key
38
and uses that for signing writes.
39
See the description of the
40
.Sy swarm.gdp.crypto.key.path
41
parameter in
42
.Sx ADMINISTRATIVE PARAMETERS
43
for details on the search path.
44 37960b88 Eric Allman
This search can be overridden using the
45
.Fl K
46
flag.
47 b1d346a7 Eric Allman
.Sh OPTIONS
48
.Bl -tag
49 0cb4611f Eric Allman
.It Fl 1
50
Normally
51
.Nm
52
reads lines from standard input and writes each line as a record
53
with the newline stripped.
54
The
55
.Fl 1
56
flag reads the entire standard input (to an end of file)
57
and writes it all as a single record.
58
This can be used to log binary input or input with newlines
59
(albeit not terribly efficiently if multiple records need to be written).
60 b1d346a7 Eric Allman
.It Fl a
61
Use asynchronous writes.
62
This is primarily for testing.
63 31012ba0 Eric Allman
.It Fl D Ar debug-spec
64 b1d346a7 Eric Allman
Turn on debugging flags using the libep-style format.
65
Only useful with code in hand.
66 31012ba0 Eric Allman
.It Fl G Ar router-ip
67 b1d346a7 Eric Allman
Contact the given IP address (which may be a DNS name)
68
to get a connection to the GDP routing layer.
69
This will be replaced by automatic discovery
70
(for example, using Zeroconf)
71
soon.
72
The address may have an optional port number after a colon.
73
If this is not specified,
74
the names listed in the
75
.Va swarm.gdp.routers
76
runtime administrative parameter
77
are searched.
78 1f3adfd0 Eric Allman
.It Fl i
79
Print errors on append, but continue to accept input.
80
This is mostly useful for debugging.
81 31012ba0 Eric Allman
.It Fl K Ar key-file
82 37960b88 Eric Allman
Names the file containing the secret key to be used for signing.
83
This must be a
84
.Sy \&.pem
85
format file.
86
This overrides the default search path.
87 1f3adfd0 Eric Allman
.It Fl L Ar log-file
88
If set, write a very simplistic performance log to the given
89
.Ar log-file .
90
This can be used together with the companion flag on
91
.Xr gdp-reader 1
92
to produce crude round-trip performance numbers.
93 0cb4611f Eric Allman
.It Fl q
94
Run quietly, suppressing all output that isn't error text.
95 49d76189 Eric Allman
.
96
.It Fl S
97
Normally
98
.Nm
99
will refuse to open a log for writing
100
if it cannot find a corresponding secret key.
101
The
102
.Fl S
103
flag allows it to proceed with a warning.
104
This is only useful if the log server hosting the log
105
is configured to allow signature mismatches.
106
.
107 b1d346a7 Eric Allman
.El
108 36033ca2 Eric Allman
.
109 0cb4611f Eric Allman
.Sh EXIT STATUS
110
.Bl -tag
111 36033ca2 Eric Allman
.It Li EX_OK No (0)
112
Success.
113
.It Li EX_CANTCREAT No (73)
114
Output log could not be opened.
115
.It Li EX_SOFTWARE No (70)
116
Severe internal error.
117
.It Li EX_UNAVAILABLE No (69)
118
Other unspecified error occurred.
119
.It Li EX_USAGE No (64)
120
Error in command line parameters.
121
.El
122
.
123 b1d346a7 Eric Allman
.Sh ADMINISTRATIVE PARAMETERS
124
.Bl -tag
125
.It Sy swarm.gdp.crypto.key.path
126
Controls the search path for secret keys.
127
Defaults to:
128
.Bd -unfilled -offset indent -compact
129
\&.
130
KEYS
131
~/.swarm/gdp/keys
132 49d76189 Eric Allman
/usr/local/etc/gdp/keys
133 b1d346a7 Eric Allman
/usr/local/etc/swarm/gdp/keys
134 49d76189 Eric Allman
/etc/gdp/keys
135 b1d346a7 Eric Allman
/etc/swarm/gdp/keys
136
.Ed
137
.El
138
.\".Sh ENVIRONMENT
139
.\".Sh FILES
140
.Sh SEE ALSO
141 6e2cccae Eric Allman
.Xr gdp-reader 1 ,
142 b1d346a7 Eric Allman
.Xr gcl-create 8
143
.\".Sh EXAMPLES
144 31012ba0 Eric Allman
.\".Sh BUGS