~ubuntu-branches/ubuntu/trusty/mirmon/trusty-proposed

« back to all changes in this revision

Viewing changes to mirmon.1

  • Committer: Bazaar Package Importer
  • Author(s): Hideki Yamane
  • Date: 2011-01-31 23:04:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110131230450-dzo153mq0bmwsj70
Tags: 2.4-1
* New upstream release
  - now the code is modularised, see RELEASE-NOTES file
* debian/patches
  - deal with upstream change, once remove all patches
  - recreate trace-UTC_timestamps
* debian/mirmon.install
  - add probe, Mirmon.pm, mirmon.pl
* debian/docs
  - add RELEASE-NOTES
* debian/{rules,mirmon.1}
  - remove related stuff since upstream now includes mirmon.1
* debian/mirmon.manpages
  - use upstream manpage file
* debian/postrm
  - remove mirror state in purge only

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 
2
.\"
 
3
.\" Standard preamble:
 
4
.\" ========================================================================
 
5
.de Sh \" Subsection heading
 
6
.br
 
7
.if t .Sp
 
8
.ne 5
 
9
.PP
 
10
\fB\\$1\fR
 
11
.PP
 
12
..
 
13
.de Sp \" Vertical space (when we can't use .PP)
 
14
.if t .sp .5v
 
15
.if n .sp
 
16
..
 
17
.de Vb \" Begin verbatim text
 
18
.ft CW
 
19
.nf
 
20
.ne \\$1
 
21
..
 
22
.de Ve \" End verbatim text
 
23
.ft R
 
24
.fi
 
25
..
 
26
.\" Set up some character translations and predefined strings.  \*(-- will
 
27
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
 
28
.\" double quote, and \*(R" will give a right double quote.  | will give a
 
29
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
 
30
.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
 
31
.\" expand to `' in nroff, nothing in troff, for use with C<>.
 
32
.tr \(*W-|\(bv\*(Tr
 
33
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 
34
.ie n \{\
 
35
.    ds -- \(*W-
 
36
.    ds PI pi
 
37
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
 
38
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
 
39
.    ds L" ""
 
40
.    ds R" ""
 
41
.    ds C` ""
 
42
.    ds C' ""
 
43
'br\}
 
44
.el\{\
 
45
.    ds -- \|\(em\|
 
46
.    ds PI \(*p
 
47
.    ds L" ``
 
48
.    ds R" ''
 
49
'br\}
 
50
.\"
 
51
.\" If the F register is turned on, we'll generate index entries on stderr for
 
52
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 
53
.\" entries marked with X<> in POD.  Of course, you'll have to process the
 
54
.\" output yourself in some meaningful fashion.
 
55
.if \nF \{\
 
56
.    de IX
 
57
.    tm Index:\\$1\t\\n%\t"\\$2"
 
58
..
 
59
.    nr % 0
 
60
.    rr F
 
61
.\}
 
62
.\"
 
63
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 
64
.\" way too many mistakes in technical documents.
 
65
.hy 0
 
66
.if n .na
 
67
.\"
 
68
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 
69
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 
70
.    \" fudge factors for nroff and troff
 
71
.if n \{\
 
72
.    ds #H 0
 
73
.    ds #V .8m
 
74
.    ds #F .3m
 
75
.    ds #[ \f1
 
76
.    ds #] \fP
 
77
.\}
 
78
.if t \{\
 
79
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
 
80
.    ds #V .6m
 
81
.    ds #F 0
 
82
.    ds #[ \&
 
83
.    ds #] \&
 
84
.\}
 
85
.    \" simple accents for nroff and troff
 
86
.if n \{\
 
87
.    ds ' \&
 
88
.    ds ` \&
 
89
.    ds ^ \&
 
90
.    ds , \&
 
91
.    ds ~ ~
 
92
.    ds /
 
93
.\}
 
94
.if t \{\
 
95
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
 
96
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
 
97
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
 
98
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
 
99
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
 
100
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
 
101
.\}
 
102
.    \" troff and (daisy-wheel) nroff accents
 
103
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
 
104
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
 
105
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
 
106
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
 
107
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
 
108
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
 
109
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
 
110
.ds ae a\h'-(\w'a'u*4/10)'e
 
111
.ds Ae A\h'-(\w'A'u*4/10)'E
 
112
.    \" corrections for vroff
 
113
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
 
114
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
 
115
.    \" for low resolution devices (crt and lpr)
 
116
.if \n(.H>23 .if \n(.V>19 \
 
117
\{\
 
118
.    ds : e
 
119
.    ds 8 ss
 
120
.    ds o a
 
121
.    ds d- d\h'-1'\(ga
 
122
.    ds D- D\h'-1'\(hy
 
123
.    ds th \o'bp'
 
124
.    ds Th \o'LP'
 
125
.    ds ae ae
 
126
.    ds Ae AE
 
127
.\}
 
128
.rm #[ #] #H #V #F C
 
129
.\" ========================================================================
 
130
.\"
 
131
.IX Title "MIRMON 1"
 
132
.TH MIRMON 1 "2011-01-17" "perl v5.8.5" "User Contributed Perl Documentation"
 
133
.SH "NAME"
 
134
mirmon \- monitor the state of mirrors
 
135
.SH "SYNOPSIS"
 
136
.IX Header "SYNOPSIS"
 
137
.Vb 1
 
138
\&  mirmon [ -v ] [ -q ] [ -t timeout ] [ -get opt ] [ -c conf ]
 
139
.Ve
 
140
.SH "OPTIONS"
 
141
.IX Header "OPTIONS"
 
142
.Vb 10
 
143
\&  option v   : be verbose
 
144
\&  option q   : be quiet
 
145
\&  option t   : set timeout [ default 300 ] ;
 
146
\&  option get : 'all'    : probe all sites
 
147
\&             : 'update' : probe a selection of the sites (see doc)
 
148
\&  option c   : configuration file ; default list :
 
149
\&               ./mirmon.conf $HOME/.mirmon.conf /etc/mirmon.conf
 
150
\&  -------------------------------------------------------------------
 
151
\&  Mirmon normally only reports errors and changes in the mirror list.
 
152
\&  -------------------------------------------------------------------
 
153
.Ve
 
154
.SH "USAGE"
 
155
.IX Header "USAGE"
 
156
The program is intended to be run by cron every hour.
 
157
.PP
 
158
.Vb 1
 
159
\&  42 * * * * perl /path/to/mirmon -get update
 
160
.Ve
 
161
.PP
 
162
It quietly probes a subset of the sites in a given list,
 
163
writes the results in the 'state' file and generates a web page
 
164
with the results. The subset contains the sites that are new, bad
 
165
and/or not probed for a specified time.
 
166
.PP
 
167
When no 'get' option is specified, the program just generates a
 
168
new web page from the last known state.
 
169
.PP
 
170
The program checks the mirrors by running a (user specified)
 
171
program on a pipe. A (user specified) number of probes is
 
172
run in parallel using nonblocking \s-1IO\s0. When something can be
 
173
read from the pipe, it switches the pipe to blocking \s-1IO\s0 and
 
174
reads one line from the pipe. Then it flushes and closes the
 
175
pipe. No attempt is made to kill the probe.
 
176
.PP
 
177
The probe should return something that looks like
 
178
.PP
 
179
.Vb 1
 
180
\&  1043625600 ...
 
181
.Ve
 
182
.PP
 
183
that is, a line of text starting with a timestamp. The exit status
 
184
of the probe is ignored.
 
185
.SH "CONFIG FILE"
 
186
.IX Header "CONFIG FILE"
 
187
.Sh "location"
 
188
.IX Subsection "location"
 
189
A config file can be specified with the \-c option.
 
190
If \-c is not used, the program looks for a config file in
 
191
.IP "* \fB./mirmon.conf\fR" 4
 
192
.IX Item "./mirmon.conf"
 
193
.PD 0
 
194
.IP "* \fB$HOME/.mirmon.conf\fR" 4
 
195
.IX Item "$HOME/.mirmon.conf"
 
196
.IP "* \fB/etc/mirmon.conf\fR" 4
 
197
.IX Item "/etc/mirmon.conf"
 
198
.PD
 
199
.Sh "syntax"
 
200
.IX Subsection "syntax"
 
201
A config file looks like this :
 
202
.PP
 
203
.Vb 30
 
204
\&  +--------------------------------------------------
 
205
\&  |# lines that start with '#' are comment
 
206
\&  |# blank lines are ignored too
 
207
\&  |# tabs are replaced by a space
 
208
\&  |
 
209
\&  |# the config entries are 'key' and 'value' pairs
 
210
\&  |# a 'key' begins in column 1
 
211
\&  |# the 'value' is the rest of the line
 
212
\&  |somekey  A_val B_val ...
 
213
\&  |otherkey X_val Y_val ...
 
214
\&  |
 
215
\&  |# indented lines are glued
 
216
\&  |# the next three lines mean 'somekey part1 part2 part3'
 
217
\&  |somekey part1
 
218
\&  |  part2
 
219
\&  |  part3
 
220
\&  |
 
221
\&  |# lines starting with a '+' are concatenated
 
222
\&  |# the next three lines mean 'somekey part1part2part3'
 
223
\&  |somekey part1
 
224
\&  |+ part2
 
225
\&  |+ part3
 
226
\&  |
 
227
\&  |# lines starting with a '.' are glued too
 
228
\&  |# don't use a '.' on a line by itself
 
229
\&  |# 'somekey' gets the value "part1\en part2\en part3"
 
230
\&  |somekey part1
 
231
\&  |. part2
 
232
\&  |. part3
 
233
\&  +--------------------------------------------------
 
234
.Ve
 
235
.SH "CONFIG FILE : required entries"
 
236
.IX Header "CONFIG FILE : required entries"
 
237
.Sh "project_name \fIname\fP"
 
238
.IX Subsection "project_name name"
 
239
Specify a short plaintext name for the project.
 
240
.PP
 
241
.Vb 2
 
242
\&  project_name Apache
 
243
\&  project_name CTAN
 
244
.Ve
 
245
.Sh "project_url \fIurl\fP"
 
246
.IX Subsection "project_url url"
 
247
Specify an url pointing to the 'home' of the project.
 
248
.PP
 
249
.Vb 1
 
250
\&  project_url http://www.apache.org/
 
251
.Ve
 
252
.Sh "mirror_list \fIfile-name\fP"
 
253
.IX Subsection "mirror_list file-name"
 
254
Specify the file containing the mirrors to probe.
 
255
.PP
 
256
.Vb 1
 
257
\&  mirror_list /path/to/mirror-list
 
258
.Ve
 
259
.PP
 
260
If your mirror list is generated by a program, use
 
261
.PP
 
262
.Vb 1
 
263
\&  mirror_list /path/to/program arg1 ... |
 
264
.Ve
 
265
.PP
 
266
Two formats are supported :
 
267
.IP "* plain : lines like" 4
 
268
.IX Item "plain : lines like"
 
269
.Vb 3
 
270
\&  us http://www.tux.org/ [email] ...
 
271
\&  nl http://apache.cs.uu.nl/dist/ [email] ...
 
272
\&  nl rsync://archive.cs.uu.nl/apache-dist/ [email] ...
 
273
.Ve
 
274
.IP "* apache : lines like those in the apache mirrors.list" 4
 
275
.IX Item "apache : lines like those in the apache mirrors.list"
 
276
.Vb 2
 
277
\&  ftp  us ftp://ftp.tux.org/pub/net/apache/dist/ user@tux.org ...
 
278
\&  http nl http://apache.cs.uu.nl/dist/ user@cs.uu.nl ...
 
279
.Ve
 
280
.PP
 
281
Note that in style 'plain' the third item is reserved for an
 
282
optional email address : the site's contact address.
 
283
.PP
 
284
Specify the required format with 'list_style' (see below).
 
285
The default style is 'plain'.
 
286
.Sh "web_page \fIfile-name\fP"
 
287
.IX Subsection "web_page file-name"
 
288
Specify where the html report page is written.
 
289
.Sh "icons \fIdirectory-name\fP"
 
290
.IX Subsection "icons directory-name"
 
291
Specify the directory where the icons can be found,
 
292
relative to the \fIweb_page\fR, or relative to the
 
293
\&\s-1DOCUMENTROOT\s0 of the web server.
 
294
.PP
 
295
If/when the \fIweb_page\fR lives in directory \f(CW\*(C`.../mirmon/\*(C'\fR and
 
296
the icons live in directory \f(CW\*(C`.../mirmon/icons/\*(C'\fR,
 
297
specify
 
298
.PP
 
299
.Vb 1
 
300
\&  icons icons
 
301
.Ve
 
302
.PP
 
303
If/when the icons live in \f(CW\*(C`/path/to/DOCUMENTROOT/icons/mirmon/\*(C'\fR, specify
 
304
.PP
 
305
.Vb 1
 
306
\&  icons /icons/mirmon
 
307
.Ve
 
308
.Sh "probe \fIprogram + arguments\fP"
 
309
.IX Subsection "probe program + arguments"
 
310
Specify the program+args to probe the mirrors. Example:
 
311
.PP
 
312
.Vb 1
 
313
\&  probe /usr/bin/wget -q -O - -T %TIMEOUT% -t 1 %URL%TIME
 
314
.Ve
 
315
.PP
 
316
Before the program is started, \f(CW%TIMEOUT\fR% and \f(CW%URL\fR% are
 
317
substituted with the proper timeout and url values.
 
318
.PP
 
319
Here it is assumed that each hour the root server writes
 
320
a timestamp in /path/to/archive/TIME, for instance with
 
321
a crontab entry like
 
322
.PP
 
323
.Vb 1
 
324
\&  42 * * * * perl -e 'printf "%s\en", time' > /path/to/archive/TIME
 
325
.Ve
 
326
.PP
 
327
Mirmon reads one line of output from the probe and interprets
 
328
the first word on that line as a timestamp ; for example :
 
329
.PP
 
330
.Vb 3
 
331
\&  1043625600
 
332
\&  1043625600 Mon Jan 27 00:00:00 2003
 
333
\&  1043625600 www.apache.org Mon Jan 27 00:00:00 2003
 
334
.Ve
 
335
.PP
 
336
Mirmon is distributed with a program \f(CW\*(C`probe\*(C'\fR that handles
 
337
ftp, http and rsync urls.
 
338
.Sh "state \fIfile-name\fP"
 
339
.IX Subsection "state file-name"
 
340
Specify where the file containing the state is written.
 
341
.PP
 
342
The program reads this file on startup and writes the
 
343
file when mirrors are probed (\-get is specified).
 
344
.Sh "countries \fIfile-name\fP"
 
345
.IX Subsection "countries file-name"
 
346
Specify the file containing the country codes;
 
347
The file should contain lines like
 
348
.PP
 
349
.Vb 2
 
350
\&  us - united states
 
351
\&  nl - netherlands
 
352
.Ve
 
353
.PP
 
354
The mirmon package contains a recent \s-1ISO\s0 list.
 
355
.SH "CONFIG FILE : optional entries"
 
356
.IX Header "CONFIG FILE : optional entries"
 
357
.Sh "max_probes \fInumber\fP"
 
358
.IX Subsection "max_probes number"
 
359
Optionally specify the number of parallel probes (default 25).
 
360
.Sh "timeout \fIseconds\fP"
 
361
.IX Subsection "timeout seconds"
 
362
Optionally specify the timeout for the probes (default 300).
 
363
.PP
 
364
After the last probe is started, the program waits for
 
365
<timeout> + 10 seconds, cleans up and exits.
 
366
.Sh "project_logo \fIlogo\fP"
 
367
.IX Subsection "project_logo logo"
 
368
Optionally specify (the \s-1SRC\s0 of the \s-1IMG\s0 of) a logo to be placed
 
369
top right on the page.
 
370
.PP
 
371
.Vb 2
 
372
\&  project_logo /icons/apache.gif
 
373
\&  project_logo http://www.apache.org/icons/...
 
374
.Ve
 
375
.Sh "htm_head \fIhtml\fP"
 
376
.IX Subsection "htm_head html"
 
377
Optionally specify some \s-1HTML\s0 to be placed before </HEAD>.
 
378
.PP
 
379
.Vb 2
 
380
\&  htm_head
 
381
\&    <link REL=StyleSheet HREF="/style.css" TYPE="text/css">
 
382
.Ve
 
383
.Sh "htm_top \fIhtml\fP"
 
384
.IX Subsection "htm_top html"
 
385
Optionally specify some \s-1HTML\s0 to be placed near the top of the page.
 
386
.PP
 
387
.Vb 1
 
388
\&  htm_top testing 1, 2, 3
 
389
.Ve
 
390
.Sh "htm_foot \fIhtml\fP"
 
391
.IX Subsection "htm_foot html"
 
392
Optionally specify \s-1HTML\s0 to be placed near the bottom of the page.
 
393
.PP
 
394
.Vb 4
 
395
\&  htm_foot
 
396
\&    <HR>
 
397
\&    <A HREF="..."><IMG SRC="..." BORDER=0></A>
 
398
\&    <HR>
 
399
.Ve
 
400
.Sh "put_histo top|bottom|nowhere"
 
401
.IX Subsection "put_histo top|bottom|nowhere"
 
402
Optionally specify where the age histogram must be placed.
 
403
The default is 'top'.
 
404
.Sh "min_poll \fItime-spec\fP"
 
405
.IX Subsection "min_poll time-spec"
 
406
For 'min_poll' see next item. A \fItime-spec\fR is a number followed by
 
407
a unit 's' (seconds), or 'm' (minutes), or 'h' (hours), or 'd' (days).
 
408
For example '3d' (three days) or '36h' (36 hours).
 
409
.Sh "max_poll \fItime-spec\fP"
 
410
.IX Subsection "max_poll time-spec"
 
411
Optionally specify the maximum probe interval. When the program is
 
412
called with option '\-get update', all sites are probed which are :
 
413
.IP "* new" 4
 
414
.IX Item "new"
 
415
the site appears in the list, but there is no known state
 
416
.IP "* bad" 4
 
417
.IX Item "bad"
 
418
the last probe of the site was unsuccessful
 
419
.IP "* old" 4
 
420
.IX Item "old"
 
421
the last probe was more than 'max_poll' ago.
 
422
.PP
 
423
Sites are not probed if the last probe was less than 'min_poll' ago.
 
424
So, if you specify
 
425
.PP
 
426
.Vb 2
 
427
\&  min_poll 4h
 
428
\&  max_poll 12h
 
429
.Ve
 
430
.PP
 
431
the 'reachable' sites are probed twice daily and the 'unreachable'
 
432
sites are probed at most six times a day.
 
433
.PP
 
434
The default 'min_poll' is '1h' (1 hour).
 
435
The default 'max_poll' is '4h' (4 hours).
 
436
.Sh "min_sync \fItime-spec\fP"
 
437
.IX Subsection "min_sync time-spec"
 
438
Optionally specify how often the mirrors are required to make an update.
 
439
.PP
 
440
The default 'min_sync' is '1d' (1 day).
 
441
.Sh "max_sync \fItime-spec\fP"
 
442
.IX Subsection "max_sync time-spec"
 
443
Optionally specify the maximum allowable sync interval.
 
444
.PP
 
445
Sites exceeding the limit will be considered 'old'.
 
446
The default 'max_sync' is '2d' (2 days).
 
447
.Sh "no_randomize"
 
448
.IX Subsection "no_randomize"
 
449
To balance the probe load over the hourly mirmon runs,
 
450
mirmon may probe a few extra randomly choosen mirrors :
 
451
.IP "* only if the the number of mirrors to probe is below average," 4
 
452
.IX Item "only if the the number of mirrors to probe is below average,"
 
453
.PD 0
 
454
.IP "* at most 2% of the mirrors" 4
 
455
.IX Item "at most 2% of the mirrors"
 
456
.PD
 
457
.PP
 
458
If you don't want this behaviour, use \fBno_randomize\fR.
 
459
.Sh "no_add_slash"
 
460
.IX Subsection "no_add_slash"
 
461
If the url part of a line in the mirror_list doesn't end
 
462
in a slash ('/'), mirmon adds a slash and issues a warning
 
463
unless it is in quiet mode.
 
464
.PP
 
465
If you don't want this behaviour, use \fBno_add_slash\fR.
 
466
.Sh "list_style plain|apache"
 
467
.IX Subsection "list_style plain|apache"
 
468
Optionally specify the format ('plain' or 'apache') of the mirror\-list.
 
469
.PP
 
470
See the description of 'mirror_list' above.
 
471
The default list_style is 'plain'.
 
472
.Sh "site_url \fIsite\fP \fIurl\fP"
 
473
.IX Subsection "site_url site url"
 
474
Optionally specify a substitute url for a site.
 
475
.PP
 
476
When access to a site is restricted (in Australia, for instance),
 
477
another (sometimes secret) url can be used to probe the site.
 
478
The <site> of an url is the part between '://' and the first '/'.
 
479
.Sh "env \fIkey\fP \fIvalue\fP"
 
480
.IX Subsection "env key value"
 
481
Optionally specify an environment variable.
 
482
.Sh "include \fIfile-name\fP"
 
483
.IX Subsection "include file-name"
 
484
Optionally specify a file to include.
 
485
.PP
 
486
The specified file is processed 'in situ'. After the specified file is
 
487
read and processed, config processing is resumed in the file where the
 
488
\&\f(CW\*(C`include\*(C'\fR was encountered.
 
489
The include depth is unlimited. However, it is a fatal error to
 
490
include a file twice under the same name.
 
491
.Sh "show"
 
492
.IX Subsection "show"
 
493
When the config processor encounters the 'show' command, it
 
494
dumps the content of the current config to standout, if option
 
495
\&\f(CW\*(C`\-v\*(C'\fR is specified. This is intented for debugging.
 
496
.Sh "exit"
 
497
.IX Subsection "exit"
 
498
When the config processor encounters the 'exit' command, it
 
499
terminates the program. This is intented for debugging.
 
500
.SH "STATE FILE FORMAT"
 
501
.IX Header "STATE FILE FORMAT"
 
502
The state file consists of lines; one line per site.
 
503
Each line consists of white space separated fields.
 
504
The seven fields are :
 
505
.IP "* field 1 : url" 4
 
506
.IX Item "field 1 : url"
 
507
The url as given in the mirror list.
 
508
.IP "* field 2 : age" 4
 
509
.IX Item "field 2 : age"
 
510
The mirror's timestamp found by the last succesful probe,
 
511
or 'undef' if no probe was ever successful.
 
512
.IP "* field 3 : status last probe" 4
 
513
.IX Item "field 3 : status last probe"
 
514
The status of the last probe, or 'undef' if the mirror was never probed.
 
515
.IP "* field 4 : time last succesful probe" 4
 
516
.IX Item "field 4 : time last succesful probe"
 
517
The timestamp of the last succesful probe or 'undef'
 
518
if the mirror was never successfully probed.
 
519
.IP "* field 5 : probe history" 4
 
520
.IX Item "field 5 : probe history"
 
521
The probe history is a list of 's' (for success) and 'f' (for failure)
 
522
characters indicating the result of the probe. New results are appended
 
523
whenever the mirror is probed.
 
524
.IP "* field 6 : state history" 4
 
525
.IX Item "field 6 : state history"
 
526
The state history consists of a timestamp, a '\-' char, and a list of
 
527
chars indicating a past status: 's' (fresh), 'b' (oldish), 'f' (old),
 
528
\&'z' (bad) or 'x' (skip).
 
529
The timestamp indicates when the state history was last updated.
 
530
The current status of the mirror is determined by the mirror's age and
 
531
a few configuration parameters (min_sync, max_sync, max_poll).
 
532
The state history is updated when the mirror is probed.
 
533
If the last update of the history was less than 24 hours ago,
 
534
the last status is replaced by the current status.
 
535
If the last update of the history was more than 24 hours ago,
 
536
the current status is appended to the history.
 
537
One or more 'skip's is inserted, if the timestamp is two or more days old
 
538
(when mirmon hasn't run for more than two days).
 
539
.IP "* field 7 : last probe" 4
 
540
.IX Item "field 7 : last probe"
 
541
The timestamp of the last probe, or 'undef' if the mirror was never probed.
 
542
.SH "INSTALLATION"
 
543
.IX Header "INSTALLATION"
 
544
.Sh "general"
 
545
.IX Subsection "general"
 
546
.IP "* Note: The (empty) state file must exist before mirmon runs." 4
 
547
.IX Item "Note: The (empty) state file must exist before mirmon runs."
 
548
.PD 0
 
549
.IP "* The mirmon repository is here :" 4
 
550
.IX Item "The mirmon repository is here :"
 
551
.PD
 
552
.Vb 1
 
553
\&  https://subversion.cs.uu.nl/repos/staff.henkp.mirmon/trunk/
 
554
.Ve
 
555
.IP "* The mirmon tarball is here :" 4
 
556
.IX Item "The mirmon tarball is here :"
 
557
.Vb 1
 
558
\&  http://people.cs.uu.nl/henkp/mirmon/mirmon.tar.gz
 
559
.Ve
 
560
.Sh "installation suggestions"
 
561
.IX Subsection "installation suggestions"
 
562
To install and configure mirmon, take the following steps :
 
563
.IP "* First, make the webdir :" 2
 
564
.IX Item "First, make the webdir :"
 
565
.Vb 2
 
566
\&  cd DOCUMENTROOT
 
567
\&  mkdir mirmon
 
568
.Ve
 
569
.Sp
 
570
For \fI\s-1DOCUMENTROOT\s0\fR, substitute the full pathname
 
571
of the document root of your webserver.
 
572
.IP "* Check out the mirmon repository :" 2
 
573
.IX Item "Check out the mirmon repository :"
 
574
.Vb 2
 
575
\&  cd /usr/local/src
 
576
\&  svn checkout REPO mirmon
 
577
.Ve
 
578
.Sp
 
579
where
 
580
.Sp
 
581
.Vb 1
 
582
\&  REPO = https://subversion.cs.uu.nl/repos/staff.henkp.mirmon/trunk/
 
583
.Ve
 
584
.Sp
 
585
or download the package and unpack it.
 
586
.IP "* Chdir to directory mirmon :" 2
 
587
.IX Item "Chdir to directory mirmon :"
 
588
.Vb 1
 
589
\&  cd mirmon
 
590
.Ve
 
591
.IP "* Create the (empty) state file :" 2
 
592
.IX Item "Create the (empty) state file :"
 
593
.Vb 1
 
594
\&  touch state.txt
 
595
.Ve
 
596
.IP "* Install the icons in the webdir :" 2
 
597
.IX Item "Install the icons in the webdir :"
 
598
.Vb 2
 
599
\&  mkdir DOCUMENTROOT/mirmon/icons
 
600
\&  cp icons/* DOCUMENTROOT/mirmon/icons
 
601
.Ve
 
602
.ie n .IP "* Create a mirror list ""mirror_list"" ;" 2
 
603
.el .IP "* Create a mirror list \f(CWmirror_list\fR ;" 2
 
604
.IX Item "Create a mirror list mirror_list ;"
 
605
Use your favorite editor, or genererate the list from an
 
606
existing database.
 
607
.Sp
 
608
.Vb 3
 
609
\&  nl http://archive.cs.uu.nl/your-project/ contact@cs.uu.nl
 
610
\&  uk http://mirrors.this.org/your-project/ mirrors@this.org
 
611
\&  us http://mirrors.that.org/your-project/ mirrors@that.org
 
612
.Ve
 
613
.Sp
 
614
The email addresses are optional.
 
615
.ie n .IP "* Create a mirmon config file ""mirmon.conf"" with your favorite editor." 2
 
616
.el .IP "* Create a mirmon config file \f(CWmirmon.conf\fR with your favorite editor." 2
 
617
.IX Item "Create a mirmon config file mirmon.conf with your favorite editor."
 
618
.Vb 9
 
619
\&  # lines must start in the first column ; no leading white space
 
620
\&  project_name ....
 
621
\&  project_url  ....
 
622
\&  mirror_list mirror_list
 
623
\&  state state.txt
 
624
\&  countries countries.list
 
625
\&  web_page DOCUMENTROOT/mirmon/index.html
 
626
\&  icons /mirmon/icons
 
627
\&  probe /usr/bin/wget -q -O - -T %TIMEOUT% -t 1 %URL%TIME
 
628
.Ve
 
629
.Sp
 
630
This assumes the project's timestamp is in file \f(CW\*(C`TIME\*(C'\fR.
 
631
.IP "* If you have rsync urls, change the probe line to :" 2
 
632
.IX Item "If you have rsync urls, change the probe line to :"
 
633
.Vb 1
 
634
\&  probe perl /usr/local/src/mirmon/probe -t %TIMEOUT% %URL%TIME
 
635
.Ve
 
636
.IP "* Run mirmon :" 2
 
637
.IX Item "Run mirmon :"
 
638
.Vb 1
 
639
\&  perl mirmon -v -get all
 
640
.Ve
 
641
.Sp
 
642
The mirmon report should now be in 'DOCUMENTROOT/mirmon/index.html'
 
643
.Sp
 
644
.Vb 1
 
645
\&  http://www.your.project.org/mirmon/
 
646
.Ve
 
647
.IP "* If/when, at a later date, you want to upgrade mirmon :" 2
 
648
.IX Item "If/when, at a later date, you want to upgrade mirmon :"
 
649
.Vb 3
 
650
\&  cd /usr/local/src/mirmon
 
651
\&  svn status -u
 
652
\&  svn up
 
653
.Ve
 
654
.SH "SEE ALSO"
 
655
.IX Header "SEE ALSO"
 
656
mirmon.pm(3)
 
657
 
 
658
.SH "AUTHOR"
 
659
.IX Header "AUTHOR"
 
660
.Vb 4
 
661
\&  (c) 2003-2011 Henk P. Penning
 
662
\&  Computer Science Department, Utrecht University
 
663
\&  http://people.cs.uu.nl/henkp/ -- penning@cs.uu.nl
 
664
\&  mirmon-2.4 - Mon Jan 17 18:14:46 2011 ; henkp
 
665
.Ve