gdp / apps / gdp-log-check.8 @ master
History | View | Annotate | Download (2.18 KB)
1 | 75373b7a | Eric Allman | .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 | 0a44eb6d | Eric Allman | .Op Fl M Ar maxrecno |
12 | 75373b7a | Eric Allman | .Op Fl q |
13 | .Op Fl r |
||
14 | 45a8a2c3 | Eric Allman | .Op Fl s |
15 | a1cb8cec | Eric Allman | .Op Fl t |
16 | 75373b7a | Eric Allman | .Op Fl v |
17 | .Ar log-name ... |
||
18 | 809d6cad | Eric Allman | . |
19 | 75373b7a | Eric Allman | .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 | 809d6cad | Eric Allman | 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 | 75373b7a | Eric Allman | .Pp |
35 | .Nm |
||
36 | .Fl r |
||
37 | never changes the on-disk data file, only the index files. |
||
38 | 809d6cad | Eric Allman | . |
39 | 75373b7a | Eric Allman | .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 | 0a44eb6d | Eric Allman | .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 | 75373b7a | Eric Allman | .It Fl q |
63 | Run quietly (suppresses informational output). |
||
64 | . |
||
65 | .It Fl r |
||
66 | Rebuild (rather than check) log indices. |
||
67 | . |
||
68 | 45a8a2c3 | Eric Allman | .It Fl s |
69 | Just print summaries of log status when checking |
||
70 | (i.e., skip record-by-record errors). |
||
71 | . |
||
72 | a1cb8cec | Eric Allman | .It Fl t |
73 | Only repair the timestamp index (leaving the record index alone). |
||
74 | . |
||
75 | 75373b7a | Eric Allman | .It Fl v |
76 | Run verbosely. |
||
77 | .El |
||
78 | 809d6cad | Eric Allman | . |
79 | 75373b7a | Eric Allman | .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 | 809d6cad | Eric Allman | . |
91 | 75373b7a | Eric Allman | .\".Sh ADMINISTRATIVE PARAMETERS |
92 | 809d6cad | Eric Allman | . |
93 | 75373b7a | Eric Allman | .\".Sh ENVIRONMENT |
94 | 809d6cad | Eric Allman | . |
95 | 75373b7a | Eric Allman | .\".Sh FILES |
96 | 809d6cad | Eric Allman | . |
97 | .Sh SEE ALSO |
||
98 | .Xr gdp-log-check 8 |
||
99 | 75373b7a | Eric Allman | .\".Xr gdp 7 , |
100 | .\".Xr gdplogd 8 |
||
101 | 809d6cad | Eric Allman | . |
102 | 75373b7a | Eric Allman | .\".Sh EXAMPLES |
103 | 809d6cad | Eric Allman | . |
104 | 75373b7a | Eric Allman | .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 | 0a44eb6d | Eric Allman | .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. |