aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
blob: d7952c15369c8925d4ed2a90966cf426c7b40eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Lua script for checking the health of Devuan Linux package mirrors.

This is currently under development, not everything has been written yet.

mirror-checker-lua is a Lua script used by the Devuan mirror admins
(maybe, if they like it) to check the health of Devuan Linux package
mirrors.  Originally there was bash scripts for this job, then Evilham
wrote some Python scripts, now onefang has written it in Lua.  We all
have different tastes in languages.  lol

The main difference is that this Lua version tries to do everything, and
will be maintained.  Currently the shell scripts and Python scripts are
actually being used I think.  Evilham asked me to write this, after I
badgered him about his Python scripts.

The source code is at [https://sledjhamr.org/cgit/mirror-checker-lua/](https://sledjhamr.org/cgit/mirror-checker-lua/)

The issue tracker is at [https://sledjhamr.org/mantisbt/project_page.php?project_id=13](https://sledjhamr.org/mantisbt/project_page.php?project_id=13)


Installation.
-------------

Download the source.  You may want to put the mirror-checker.lua script
in someplace like `/usr/local/bin` and make sure it is executable.

It should run on any recent Linux, you'll need to have the following
installed -

* Luajit
* wget
* dig, part of BIND.  On Debian based systems it'll be in the dnsutils package.
* LuaSocket, on Debian based systems it'll be in the lua-socket package.
* ionice, on Debian based systems it'll be in the util-linux package.


Using it.
---------

These examples assume you are running it from the source code directory. 
A directory will be created called results, it'll be full of log files
and any files that get downloaded.  There will also be results/email and
results/web directories, with the notification email and web pages with
the easy to read emails (once I write that bit).

Note that unlike typical commands, you can't run single character options
together, so this is wrong -

    $ ./mirror-checker.lua -vvv

Instead do this -

    $ ./mirror-checker.lua -v -v -v

Just run the script to do all of the tests -

    $ ./mirror-checker.lua

Which will print any errors.  If you don't want to see errors -

    $ ./mirror-checker.lua -q

If you want to see warnings as well (as usual, the more -v options, the more
details) -

    $ ./mirror-checker.lua -v

Or use the usual options for the help and version number -

    $ ./mirror-checker.lua -h 
    $ ./mirror-checker.lua --help
    $ ./mirror-checker.lua --version

To run the tests on a specific mirror, for example pkgmaster.devuan.org -

    $ ./mirror-checker.lua pkgmaster.devuan.org

You can use the `--tests` option to tune which tests are run, for example
to stop IPv6 tests, coz you don't have IPv6 -

    $ ./mirror-checker.lua --tests=-IPv6

To do the same, but not run the HTTPS tests either -

    $ ./mirror-checker.lua --tests=-IPv6,-https

To only run the HTTP integrity tests, only on IPv6 -

    $ ./mirror-checker.lua --tests=http,Integrity,IPv6