Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / apps / gdp-log-check.8 @ master

History | View | Annotate | Download (2.18 KB)

1
.Dd September 18, 2015
2
.Dt GDP-LOG-CHECK 8
3
.Os Swarm-GDP
4
.Sh NAME
5
.Nm gdp-log-check
6
.Nd check/repair an on-disk log
7
.Sh SYNOPSIS
8
.Nm
9
.Op Fl D Ar debug-spec
10
.Op Fl f
11
.Op Fl M Ar maxrecno
12
.Op Fl q
13
.Op Fl r
14
.Op Fl s
15
.Op Fl t
16
.Op Fl v
17
.Ar log-name ...
18
.
19
.Sh DESCRIPTION
20
.Nm
21
checks on-disk logs for index consistency,
22
or, with
23
.Fl r ,
24
repairs log indices.
25
It
26
.Em must not
27
be run while
28
.Xr gdplogd 8
29
is running.
30
It can
31
.Em only
32
be run on the server that actually hosts the log(s) to be checked,
33
that is, it can not be run on a client or on a remotely-hosted log.
34
.Pp
35
.Nm
36
.Fl r
37
never changes the on-disk data file, only the index files.
38
.
39
.Sh OPTIONS
40
.
41
.Bl -tag
42
.It Fl D Ar debug-spec
43
Turns on debugging flags using the libep-style format.
44
Useful only with the code in hand.
45
.It Fl f
46
Force installation of new index files,
47
even if they are the same as the old files.
48
In some cases
49
.Nm
50
.Fl r
51
may believe a log is in good shape when it is not.
52
Using the
53
.Fl f
54
flag will force the fix.
55
(This is a bug).
56
.
57
.It Fl M Ar maxrecno
58
Specify the maximum recno that will be considered to be correct.
59
This can be used to fix badly damaged log files,
60
where the data file itself is corrupt (not just indicies).
61
.
62
.It Fl q
63
Run quietly (suppresses informational output).
64
.
65
.It Fl r
66
Rebuild (rather than check) log indices.
67
.
68
.It Fl s
69
Just print summaries of log status when checking
70
(i.e., skip record-by-record errors).
71
.
72
.It Fl t
73
Only repair the timestamp index (leaving the record index alone).
74
.
75
.It Fl v
76
Run verbosely.
77
.El
78
.
79
.Sh EXIT STATUS
80
.Bl -tag
81
.It Li EX_DATAERR
82
One or more indices need repair (or were repaired).
83
.It Li EX_OK
84
No changes are needed.
85
.It Li EX_UNAVAILABLE
86
There was some failure during startup.
87
.It Li EX_USAGE
88
Command line parameters are incorrect.
89
.El
90
.
91
.\".Sh ADMINISTRATIVE PARAMETERS
92
.
93
.\".Sh ENVIRONMENT
94
.
95
.\".Sh FILES
96
.
97
.Sh SEE ALSO
98
.Xr gdp-log-check 8
99
.\".Xr gdp 7 ,
100
.\".Xr gdplogd 8
101
.
102
.\".Sh EXAMPLES
103
.
104
.Sh BUGS
105
In some cases
106
.Nm
107
.Fl r
108
believes that the indices have not been changed
109
even though they actually have been.
110
The
111
.Fl f
112
flag will force installation of the new indices.
113
.Pp
114
There should be a way of fixing data files that are corrupt.
115
Currently,
116
.Nm
117
only repairs indices.
118
The
119
.Fl M
120
flag is just a workaround.