From 53d2399cd7efb87d942e7b255fb70a27ee6bb02a Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Tue, 9 Jan 2007 13:41:25 +0000 Subject: [PATCH] Updated to current mirmon version. Relocated to /home/services area --- bin/mirmon_ftp | 3 - bin/mirmon_www | 3 - bin/run_mirmon | 12 + crontab | 6 + mirmon/.cvsignore | 3 + mirmon/backup/exim_mirrors_ftp_05082005.lst | 38 -- mirmon/backup/exim_mirrors_ftp_29052005.lst | 47 -- mirmon/backup/exim_mirrors_www_05082005.lst | 26 -- mirmon/backup/exim_mirrors_www_29052005.lst | 26 -- mirmon/countries.list | 7 +- mirmon/exim_ftp_state | 50 -- mirmon/exim_www_state | 42 -- mirmon/mirmon | 486 ++++++++++---------- 13 files changed, 275 insertions(+), 474 deletions(-) delete mode 100755 bin/mirmon_ftp delete mode 100755 bin/mirmon_www create mode 100755 bin/run_mirmon create mode 100644 crontab create mode 100644 mirmon/.cvsignore delete mode 100644 mirmon/backup/exim_mirrors_ftp_05082005.lst delete mode 100644 mirmon/backup/exim_mirrors_ftp_29052005.lst delete mode 100644 mirmon/backup/exim_mirrors_www_05082005.lst delete mode 100644 mirmon/backup/exim_mirrors_www_29052005.lst delete mode 100644 mirmon/exim_ftp_state delete mode 100644 mirmon/exim_www_state diff --git a/bin/mirmon_ftp b/bin/mirmon_ftp deleted file mode 100755 index 1cb99f1..0000000 --- a/bin/mirmon_ftp +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd /home/thrassos/mirmon -./mirmon -q -get update -c mirmon_ftp.conf diff --git a/bin/mirmon_www b/bin/mirmon_www deleted file mode 100755 index 7ad9660..0000000 --- a/bin/mirmon_www +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd /home/thrassos/mirmon -./mirmon -q -get update -c mirmon_www.conf diff --git a/bin/run_mirmon b/bin/run_mirmon new file mode 100755 index 0000000..4dd1b57 --- /dev/null +++ b/bin/run_mirmon @@ -0,0 +1,12 @@ +#!/bin/sh +# $Cambridge$ +# +# Runs mirmon for both ftp and www repos +# +MIRMON_BASE=/home/services/mirmon/mirmon + +cd ${MIRMON_BASE} || exit +for set in www ftp +do + ./mirmon -q -get update -c mirmon_${set}.conf +done diff --git a/crontab b/crontab new file mode 100644 index 0000000..8ac3129 --- /dev/null +++ b/crontab @@ -0,0 +1,6 @@ +# $Cambridge$ +# +# Schedule mirmon runs hourly +39 * * * * /home/services/mirmon/bin/run_mirmon +# +# end \ No newline at end of file diff --git a/mirmon/.cvsignore b/mirmon/.cvsignore new file mode 100644 index 0000000..ef34631 --- /dev/null +++ b/mirmon/.cvsignore @@ -0,0 +1,3 @@ +# $Cambridge$ +exim_ftp_state +exim_www_state diff --git a/mirmon/backup/exim_mirrors_ftp_05082005.lst b/mirmon/backup/exim_mirrors_ftp_05082005.lst deleted file mode 100644 index ef18111..0000000 --- a/mirmon/backup/exim_mirrors_ftp_05082005.lst +++ /dev/null @@ -1,38 +0,0 @@ -nl http://exim.qwezz.nl/ftp/pub/ -de ftp://ftp.bytemine.net/pub/exim/ -ca http://exim-ftp.meulie.net/ -fr http://mirror.fr.claryss.net/ftp.exim.org/ -at ftp://gd.tuwien.ac.at/infosys/mail/exim/ -at http://gd.tuwien.ac.at/infosys/mail/exim/ -be ftp://ftp.easynet.be/exim/ -ca ftp://mirror.direct.ca/pub/exim/ -ch ftp://mirror.switch.ch/mirror/exim/ -ch http://mirror.switch.ch/ftp/mirror/exim/ -fr http://exim.mirror.fr/ -cz ftp://mirror.kn.vutbr.cz/pub/ftp.exim.org/ -de ftp://exim.noris.de/ -de ftp://ftp.freenet.de/pub/ftp.csx.cam.ac.uk/pub/software/email/exim/ -de ftp://ftp.kgt.org/pub/mirrors/exim.org/ftp/ -de ftp://ftp.tin.org/pub/mail/exim/ -dk ftp://sunsite.auc.dk/pub/mail/exim/ -dk http://sunsite.auc.dk/pub/mail/exim/ -id ftp://ftp.cbn.net.id/mirror/exim/ -ie ftp://ftp.esat.net/pub/networking/mail/mta/exim/ -ie http://ftp.esat.net/pub/networking/mail/mta/exim/ -ke http://exim.wananchi.com/ftp/ -nl ftp://ftp.demon.nl/pub/mirrors/exim/ -nl ftp://ftp.easynet.nl/mirror/exim/ -nl http://ftp.easynet.nl/mirror/exim/ -no ftp://sunsite.uio.no/pub/mail/exim/ -pl ftp://sunsite.icm.edu.pl/pub/unix/mail/exim/ -pl http://sunsite.icm.edu.pl/pub/unix/mail/exim/ -uk ftp://ftp.demon.co.uk/pub/mirrors/exim/ -uk ftp://ftp.exim.org/pub/ -uk ftp://ftp.mirrorservice.org/sites/ftp.csx.cam.ac.uk/pub/software/email/exim/ -uk http://www.mirrorservice.org/sites/ftp.csx.cam.ac.uk/pub/software/email/exim/ -us ftp://ftp.fsckit.net/pub/exim/ -us ftp://ftp.gr-linux.com/pub/exim/ -us ftp://mirrors.rcn.net/pub/mail/exim/ -us http://www.mirrormonster.com/exim/ -us http://www.us.exim.org/ftp/ -za ftp://ftp.is.co.za/networking/mail/transport/exim/ diff --git a/mirmon/backup/exim_mirrors_ftp_29052005.lst b/mirmon/backup/exim_mirrors_ftp_29052005.lst deleted file mode 100644 index ccc9c93..0000000 --- a/mirmon/backup/exim_mirrors_ftp_29052005.lst +++ /dev/null @@ -1,47 +0,0 @@ -ca http://exim-ftp.meulie.net/ -fr http://mirror.fr.claryss.net/ftp.exim.org/ -at ftp://gd.tuwien.ac.at/infosys/mail/exim/ -at http://gd.tuwien.ac.at/infosys/mail/exim/ -be ftp://ftp.easynet.be/exim/ -ca ftp://mirror.direct.ca/pub/exim/ -ch ftp://mirror.switch.ch/mirror/exim/ -ch http://mirror.switch.ch/ftp/mirror/exim/ -fr http://exim.mirror.fr/ -cz ftp://mirror.kn.vutbr.cz/pub/ftp.exim.org/ -de ftp://exim.noris.de/ -de ftp://ftp.freenet.de/pub/ftp.csx.cam.ac.uk/pub/software/email/exim/ -de ftp://ftp.fu-berlin.de/unix/mail/exim/ -de ftp://ftp.gigabell.net/pub/exim/ -de ftp://ftp.kgt.org/pub/mirrors/exim.org/ftp/ -de ftp://ftp.tin.org/pub/mail/exim/ -dk ftp://sunsite.auc.dk/pub/mail/exim/ -dk http://sunsite.auc.dk/pub/mail/exim/ -gr ftp://sunsite.ics.forth.gr/sunsite/net_tools/exim/ -gr http://sunsite.ics.forth.gr/sunsite/net_tools/exim/ -id ftp://ftp.cbn.net.id/mirror/exim/ -ie ftp://ftp.esat.net/pub/networking/mail/mta/exim/ -ie http://ftp.esat.net/pub/networking/mail/mta/exim/ -it ftp://ftp.web-spread.com/pub/exim/ -jp ftp://nagoya.linux.or.jp/mirror/exim/ -ke http://exim.wananchi.com/ftp/ -nl ftp://ftp.demon.nl/pub/mirrors/exim/ -nl ftp://ftp.easynet.nl/mirror/exim/ -nl http://ftp.easynet.nl/mirror/exim/ -no ftp://sunsite.uio.no/pub/mail/exim/ -pl ftp://sunsite.icm.edu.pl/pub/unix/mail/exim/ -pl http://sunsite.icm.edu.pl/pub/unix/mail/exim/ -uk ftp://ftp.demon.co.uk/pub/mirrors/exim/ -uk ftp://ftp.exim.org/pub/ -uk ftp://ftp.fido.net/pub/mirrors/exim/ -uk ftp://ftp.mirror.ac.uk/mirror/ftp.exim.org/pub/exim/exim/ -uk ftp://ftp.mirrorservice.org/sites/ftp.csx.cam.ac.uk/pub/software/email/exim/ -uk ftp://sunsite.doc.ic.ac.uk/packages/exim/ -uk http://www.mirror.ac.uk/mirror/ftp.exim.org/pub/exim/exim/ -uk http://www.mirrorservice.org/sites/ftp.csx.cam.ac.uk/pub/software/email/exim/ -us ftp://ftp.fsckit.net/pub/exim/ -us ftp://ftp.gr-linux.com/pub/exim/ -us ftp://mirrors.rcn.net/pub/mail/exim/ -us http://www.mirrormonster.com/exim/ -us http://www.us.exim.org/ftp/ -za ftp://ftp.is.co.za/networking/mail/transport/exim/ -za ftp://ftp.savage.za.org/pub/linux/exim/ diff --git a/mirmon/backup/exim_mirrors_www_05082005.lst b/mirmon/backup/exim_mirrors_www_05082005.lst deleted file mode 100644 index 903d1d1..0000000 --- a/mirmon/backup/exim_mirrors_www_05082005.lst +++ /dev/null @@ -1,26 +0,0 @@ -nl http://exim.qwezz.nl/ -de http://exim.bytemine.net/ -fr http://mirror.fr.claryss.net/exim.org/ -ca http://exim-www.meulie.net/ -si http://www.klevze.si/exim/ -us http://exim.trexle.com/ -at http://exim.nessus.at/ -au http://exim.planetmirror.com/ -be http://exim.opbit.com/ -be http://ftp.easynet.be/exim/ -ca http://mirror.direct.ca/exim/ -de http://exim.kgt.org/ -de http://exim.noris.de/ -de http://exim.work.de/ -es http://exim.fadlan.com/ -fi http://exim.tonnikala.org/ -hu http://exim.choma.hu/ -id http://exim.cbn.net.id/ -ie http://www.ie.exim.org/ -it http://mirrors.web-spread.com/exim/ -ke http://exim.wananchi.com/ -no http://www.no.exim.org/ -ru http://exim.directnet.ru/ -us http://exim.gr-linux.com/ -us http://exim.stanford.edu/ -us http://www.us.exim.org/ diff --git a/mirmon/backup/exim_mirrors_www_29052005.lst b/mirmon/backup/exim_mirrors_www_29052005.lst deleted file mode 100644 index af5e3a8..0000000 --- a/mirmon/backup/exim_mirrors_www_29052005.lst +++ /dev/null @@ -1,26 +0,0 @@ -fr http://mirror.fr.claryss.net/exim.org/ -ca http://exim-www.meulie.net/ -si http://www.klevze.si/exim/ -us http://exim.trexle.com/ -at http://exim.nessus.at/ -au http://exim.planetmirror.com/ -be http://exim.opbit.com/ -be http://ftp.easynet.be/exim/ -ca http://mirror.direct.ca/exim/ -de http://exim.kgt.org/ -de http://exim.noris.de/ -de http://exim.work.de/ -es http://exim.fadlan.com/ -fi http://exim.tonnikala.org/ -hu http://exim.choma.hu/ -id http://exim.cbn.net.id/ -ie http://www.ie.exim.org/ -it http://mirrors.web-spread.com/exim/ -ke http://exim.wananchi.com/ -na http://exim.incredible.com.na/ -no http://www.no.exim.org/ -ru http://exim.directnet.ru/ -uk http://exim.digitallyhosted.com/ -us http://exim.gr-linux.com/ -us http://exim.stanford.edu/ -us http://www.us.exim.org/ diff --git a/mirmon/countries.list b/mirmon/countries.list index 6ba1651..3f39a77 100644 --- a/mirmon/countries.list +++ b/mirmon/countries.list @@ -1,3 +1,4 @@ +# $Cambridge$ ad - andorra ae - united arab emirates af - afghanistan @@ -46,7 +47,6 @@ cm - cameroon cn - china co - colombia cr - costa rica -cs - serbia and montenegro cu - cuba cv - cape verde cx - christmas island @@ -76,6 +76,7 @@ gb - united kingdom gd - grenada ge - georgia gf - french guiana +gg - guernsey gh - ghana gi - gibraltar gl - greenland @@ -98,12 +99,14 @@ hu - hungary id - indonesia ie - ireland il - israel +im - isle of man in - india io - british indian ocean territory iq - iraq ir - iran, islamic republic of is - iceland it - italy +je - jersey jm - jamaica jo - jordan jp - japan @@ -132,6 +135,7 @@ ly - libyan arab jamahiriya ma - morocco mc - monaco md - moldova, republic of +me - montenegro mg - madagascar mh - marshall islands mk - macedonia, the former yugoslav republic of @@ -180,6 +184,7 @@ py - paraguay qa - qatar re - reunion ro - romania +rs - serbia ru - russian federation rw - rwanda sa - saudi arabia diff --git a/mirmon/exim_ftp_state b/mirmon/exim_ftp_state deleted file mode 100644 index f5eeb2a..0000000 --- a/mirmon/exim_ftp_state +++ /dev/null @@ -1,50 +0,0 @@ -ftp://exim-ftp.itsoft.at/exim/ 1168326660 no_time 1168329601 fffffsssssffsf 1168264800-ssssssssbfssbs 1168344000 -ftp://exim.inode.at/ 1168326660 ok 1168333200 ssssssssssssss 1168311600-ssssssssssssss 1168333200 -ftp://exim.noris.de/ 1168323060 no_time 1168329601 sssssssssssssf 1168264800-ssssssssssssss 1168344000 -ftp://exim.zic-network.ch/exim/ 1161673860 site_not_found 1161680400 ffffffffffffff 1168322400-ffffffffffffff 1168344000 -ftp://ftp.bytemine.net/exim/ 1168333860 ok 1168340400 ssssssssssssss 1168264800-ssssssssssssss 1168340400 -ftp://ftp.cityline.net/pub/mirrors/exim/ 1168333800 ok 1168340400 ssssssssssssss 1168290000-ssssssssssssss 1168340400 -ftp://ftp.debian.am/pub/mail/exim/ 1168207860 ok 1168340400 fffffffffffffs 1168304400-ssssssssssssss 1168340400 -ftp://ftp.demon.co.uk/pub/mirrors/exim/ 1168305000 ok 1168344000 ssssssssssssss 1168264800-ssssssssssssss 1168344000 -ftp://ftp.demon.nl/pub/mirrors/exim/ 1168312200 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -ftp://ftp.easynet.be/exim/ 1168312260 ok 1168340400 ssssssssssssss 1168264800-ssssssssssssss 1168340400 -ftp://ftp.easynet.nl/mirror/exim/ 1168337460 ok 1168344000 ssssssssssssss 1168264800-ssssssssssssss 1168344000 -ftp://ftp.esat.net/pub/networking/mail/mta/exim/ 1168326600 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -ftp://ftp.eu.uu.net/pub/unix/mail/exim/ 1168315860 ok 1168336800 sssssssssssfss 1168311600-ssssssssssssss 1168336800 -ftp://ftp.exim.org/pub/ 1168333860 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -ftp://ftp.freenet.de/pub/ftp.csx.cam.ac.uk/pub/software/email/exim/ 1168297800 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -ftp://ftp.fsckit.net/pub/exim/ 1168330260 ok 1168344000 ssssssssssssss 1168264800-ssssssssssssss 1168344000 -ftp://ftp.gr-linux.com/pub/exim/ 1168323060 ok 1168333200 fsssssssssssss 1168264800-ssssssssssssss 1168333200 -ftp://ftp.is.co.za/networking/mail/transport/exim/ 1168297800 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -ftp://ftp.mirrorservice.org/sites/ftp.csx.cam.ac.uk/pub/software/email/exim/ 1168305000 ok 1168340400 fssssssfssssss 1168264800-ssssssssssssss 1168340400 -ftp://ftp.tin.org/pub/mail/exim/ 1168330200 ok 1168340400 ssssssssssssss 1168264800-ssssssssssssss 1168340400 -ftp://gd.tuwien.ac.at/infosys/mail/exim/ 1168323060 ok 1168344000 ssssssssssssss 1168264800-sssbffffffssss 1168344000 -ftp://idcnetwork.org/pub/exim/ 1168215060 ok 1168340400 ssssssssssssss 1168275600-bfffffffffssss 1168340400 -ftp://mirror.cbn.net.id/pub/exim/ 1168269060 ok 1168344000 ssssssssssssss 1168300800-ssbsssssssssss 1168344000 -ftp://mirror.direct.ca/pub/exim/ 1158966660 no_time 1159005600 ffffffffffffff 1168264800-ffffffffffffff 1168344000 -ftp://mirror.kn.vutbr.cz/pub/ftp.exim.org/ 1168312260 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -ftp://mirror.switch.ch/mirror/exim/ 1168301460 ok 1168344000 ssssssssssssss 1168279200-ssssssssssssss 1168344000 -ftp://mirrors.24-7-solutions.net/pub/exim/ftp/ 1168326660 ok 1168344000 ssssssssssssss 1168290000-ssssssssssssss 1168344000 -ftp://mirrors.rcn.net/pub/mail/exim/ 1136553000 no_time 1136556000 ffffffffffffff 1168264800-ffffffffffffff 1168344000 -ftp://sunsite.auc.dk/pub/mail/exim/ 1168290660 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -ftp://sunsite.icm.edu.pl/pub/unix/mail/exim/ 1168308660 ok 1168336800 ssssssssffssss 1168264800-ssssssssssssss 1168336800 -ftp://sunsite.uio.no/pub/mail/exim/ 1168315860 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -http://dl.ambiweb.de/mirrors/ftp.exim.org/ 1168333860 ok 1168336800 ssssssssssssss 1168315201-ssssssssssssss 1168336800 -http://exim-ftp.meulie.net/ 1168215060 ok 1168333200 ssssssssssssss 1168282800-ssssssssssssss 1168333200 -http://exim.feraudet.com/ftp/ 1168312260 ok 1168344000 ssssssssssssss 1168290000-ssssssssssssss 1168344000 -http://exim.initworld.com/ftp/ 1168337460 ok 1168340400 ssssssssssssss 1168275600-ssssssssssssss 1168340400 -http://exim.mirror.fr/ 1164503400 ok 1168336800 ssssssssssssss 1168264800-ffffffffffffff 1168336800 -http://exim.sipo.nl/ftp/ 1168337460 ok 1168344000 ssssssssssssss 1168290000-ssssssssssssss 1168344000 -http://exim.wananchi.com/ftp/ 1168297860 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://ftp.easynet.nl/mirror/exim/ 1168330260 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://ftp.esat.net/pub/networking/mail/mta/exim/ 1168326600 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -http://gd.tuwien.ac.at/infosys/mail/exim/ 1168323060 ok 1168340400 ssssssssssssss 1168264800-sssbffffffssss 1168340400 -http://mirror.fr.claryss.net/ftp.exim.org/ 1168279860 ok 1168344000 ssssssssssssss 1168272000-ssbsssssssssss 1168344000 -http://mirror.switch.ch/ftp/mirror/exim/ 1168301460 ok 1168340400 ssssssssssssss 1168279200-ssssssssssssss 1168340400 -http://mirrors.24-7-solutions.net/pub/exim/ftp/ 1168326660 ok 1168333200 ssssssssssssss 1168290000-ssssssssssssss 1168333200 -http://sunsite.auc.dk/pub/mail/exim/ 1168290660 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -http://sunsite.icm.edu.pl/pub/unix/mail/exim/ 1168308660 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://washitake.com/mail/exim/mirror/ 1168323060 ok 1168333200 ssssssssssssss 1168272000-ssssssssssssss 1168333200 -http://www.mirrormonster.com/exim/ 1146798600 no_time 1146884400 ffffffffffffff 1168264800-ffffffffffffff 1168344000 -http://www.mirrorservice.org/sites/ftp.csx.cam.ac.uk/pub/software/email/exim/ 1168305000 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://www.us.exim.org/ftp/ 1110031860 ok 1168340400 ssssssssssssss 1168264800-ffffffffffffff 1168340400 diff --git a/mirmon/exim_www_state b/mirmon/exim_www_state deleted file mode 100644 index 7bd4e26..0000000 --- a/mirmon/exim_www_state +++ /dev/null @@ -1,42 +0,0 @@ -http://exim-ftp.itsoft.at/ 1168341060 ok 1168344000 ffffffssssssss 1168264800-ssssssssbsssss 1168344000 -http://exim-www.meulie.net/ 1168215000 ok 1168344000 ssssssssssssss 1168282800-ssssssssssssss 1168344000 -http://exim.bytemine.net/ 1168333800 ok 1168340400 ssssssssssssss 1168297200-ssssssssssssss 1168340400 -http://exim.cbn.net.id/ 1168269000 ok 1168336800 ssssssssssssss 1168264800-sssbssssssssss 1168336800 -http://exim.choma.hu/ 1168326600 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -http://exim.debian.am/ 1168207800 ok 1168340400 fffffffffffffs 1168304400-ssssssssssssss 1168340400 -http://exim.directnet.ru/ 1168301400 ok 1168344000 ssssssssssssss 1168264800-ssssssssssssss 1168344000 -http://exim.fadlan.com/ 1168297800 ok 1168344000 ssssssssssffss 1168264800-sbssbffsssssss 1168344000 -http://exim.feraudet.com/ 1168315800 ok 1168340400 ssssssssssssss 1168290000-ssssssssssssss 1168340400 -http://exim.gr-linux.com/ 1168323000 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://exim.hostingzero.com/ 1159431000 ok 1168333200 ssssssssssssss 1168300800-ffffffffffffff 1168333200 -http://exim.idcnetwork.org/ 1168215000 ok 1168340400 ssssssssssssss 1168275600-bfffffffffssss 1168340400 -http://exim.initworld.com/ 1168337400 ok 1168340400 ssssssssssssss 1168275600-ssssssssssssss 1168340400 -http://exim.inode.at/ 1168326600 ok 1168333200 ssssssssssssss 1168311600-ssssssssssssss 1168333200 -http://exim.itsoft.at/ 1168337400 ok 1168340400 ffffffssssssss 1168264800-ssssssssbsssss 1168340400 -http://exim.kn.vutbr.cz/ 1168312201 ok 1168340400 ssssssssssssss 1168275600-ssssssssssssss 1168340400 -http://exim.mcs.de/ 1168341000 ok 1168344000 ssssssssssssss 1168290000-ssssssssssssss 1168344000 -http://exim.nessus.at/ 1168294200 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -http://exim.noris.de/ 1168323000 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://exim.paracoda.com/ 1168323000 ok 1168344000 ssssssssssssss 1168282800-ssssssssssssss 1168344000 -http://exim.planetmirror.com/ 1168333800 ok 1168340400 ssssssssssssss 1168264800-ssbffffsssssss 1168340400 -http://exim.qwezz.nl/ 1136945400 no_time 1136948400 ffffffffffffff 1168264800-ffffffffffffff 1168344000 -http://exim.sipo.nl/ 1168315800 ok 1168336800 ssssssssssssss 1168290000-ssssssssssssss 1168336800 -http://exim.spd.co.il/ 1168326600 ok 1168333200 ssssssssssssss 1168322400-ssssssssssssss 1168333200 -http://exim.stanford.edu/ 1161681000 ok 1168344000 ssssssssssssss 1168264800-ffffffffffffff 1168344000 -http://exim.tonnikala.org/ 1168312201 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://exim.trexle.net/ 1167073800 ok 1168336800 ssfsssssssssss 1168322400-ffffffffffffff 1168336800 -http://exim.wananchi.com/ 1168297800 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -http://exim.work.de/ 1168319400 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://exim.zic-network.ch/ 1161673800 site_not_found 1161680400 ffffffffffffff 1168322400-ffffffffffffff 1168344000 -http://ftp.easynet.be/exim/ 1168312201 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://mirror.direct.ca/exim/ 1158966600 no_time 1159005600 ffffffffffffff 1168264800-ffffffffffffff 1168344000 -http://mirror.fr.claryss.net/exim.org/ 1168279800 ok 1168333200 ssssssssssssss 1168272000-ssbsssssssssss 1168333200 -http://mirror.olnevhost.net/pub/exim/ 1168315800 ok 1168336800 ssssssssssssss 1168311600-ssssssssssssss 1168336800 -http://mirrors.24-7-solutions.net/pub/exim/www/ 1168326600 ok 1168344000 ssssssssssssss 1168290000-ssssssssssssss 1168344000 -http://mirrors.web-spread.com/exim/ 1155136200 '<!DOCTYPE' 1155225600 ffffffffffffff 1168264800-ffffffffffffff 1168344000 -http://www.fastmirrors.org/exim/ 1168305000 ok 1168333200 ssssssssssssss 1168318800-ssssssssssssss 1168333200 -http://www.ie.exim.org/ 1168323000 ok 1168336800 ssssssssssssss 1168264800-ssssssssssssss 1168336800 -http://www.klevze.si/exim/ 1168326600 ok 1168336800 ssssssssssssfs 1168326000-bfssssssssssss 1168336800 -http://www.namesdir.com/mirrors/exim/ 1168326660 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -http://www.no.exim.org/ 1168315800 ok 1168333200 ssssssssssssss 1168264800-ssssssssssssss 1168333200 -http://www.us.exim.org/ 1110010200 ok 1168336800 ssssssssssssss 1168264800-ffffffffffffff 1168336800 diff --git a/mirmon/mirmon b/mirmon/mirmon index 6d0c3e5..8c0b298 100755 --- a/mirmon/mirmon +++ b/mirmon/mirmon @@ -1,19 +1,20 @@ #! /usr/bin/perl -w - +# $Cambridge$ +# # Copyright (c) 2003 Henk Penning, all rights reserved. # penning@cs.uu.nl, http://www.cs.uu.nl/staff/henkp.html # Version 1.1 was donated to the Apache Software Foundation 2003 Jan 28 -# $Id: mirmon,v 1.36 2004/12/28 17:54:10 henkp Exp $ +# $Id: mirmon,v 1.37 2006/12/04 15:16:11 henkp Exp henkp $ # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -21,9 +22,11 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +# +# Thanks to Klaus Heinz for sugestions ao htm_head my $PRG = 'mirmon' ; -my $VER = '$Id: mirmon,v 1.36 2004/12/28 17:54:10 henkp Exp $' ; +my $VER = '$Id: mirmon,v 1.37 2006/12/04 15:16:11 henkp Exp henkp $' ; use strict ; use IO::Pipe ; @@ -50,7 +53,7 @@ my @REQ_KEYS = ) ; my @OPT_KEYS = qw( project_logo min_poll min_sync max_sync list_style htm_top htm_foot - put_histo + htm_head put_histo ) ; my %CNF_KEYS ; for ( @REQ_KEYS, @OPT_KEYS, keys %CNF ) { $CNF_KEYS { $_ } ++ ; } @@ -131,7 +134,7 @@ sub show_conf } for my $key ( sort keys %HREF ) { printf "show_conf : for site '%s' use instead\n '%s'\n", - $key, $HREF { $key } if $opt{v} ; + $key, $HREF { $key } if $opt{v} ; } printf "show_conf : included '%s'\n", join "', '", @{ $CNF{_include} } ; print "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" ; @@ -163,34 +166,34 @@ sub get_conf { my ($key,$val) = split ' ', $_, 2 ; $val = '' unless defined $val ; print "conf '$FILE' : key '$key', val '$val'\n" if $opt{d} ; - if ( exists $CNF_KEYS { $key } ) - { $CNF { $key } = $val ; } - elsif ( $key eq 'site_url' ) - { my ( $site, $url ) = split ' ' , $val ; - $url .= '/' unless $url =~ m!/$! ; - $HREF { lc $site } = $url ; - printf "config : for site '%s' use instead\n '%s'\n", - $site, $url if $opt{v} ; - } - elsif ( $key eq 'env' ) - { my ( $x, $y ) = split ' ' , $val ; - $ENV { $x } = $y ; - printf "config : setenv '%s'\n '%s'\n", $x, $y if $opt{v} ; - } - elsif ( $key eq 'no_randomize' ) - { $CNF { randomize } = 0 ; } - elsif ( $key eq 'include' ) - { get_conf $val ; } - elsif ( $key eq 'show' ) - { show_conf unless $opt{q} ; } - elsif ( $key eq 'exit' ) - { Error 'exit per config directive' ; } - elsif ( $key eq 'max_age' ) - { $CNF { max_sync } = $val ; } - else - { show_conf ; - Error "unknown keyword '$key' (value '$val')" ; - } + if ( exists $CNF_KEYS { $key } ) + { $CNF { $key } = $val ; } + elsif ( $key eq 'site_url' ) + { my ( $site, $url ) = split ' ' , $val ; + $url .= '/' unless $url =~ m!/$! ; + $HREF { lc $site } = $url ; + printf "config : for site '%s' use instead\n '%s'\n", + $site, $url if $opt{v} ; + } + elsif ( $key eq 'env' ) + { my ( $x, $y ) = split ' ' , $val ; + $ENV { $x } = $y ; + printf "config : setenv '%s'\n '%s'\n", $x, $y if $opt{v} ; + } + elsif ( $key eq 'no_randomize' ) + { $CNF { randomize } = 0 ; } + elsif ( $key eq 'include' ) + { get_conf $val ; } + elsif ( $key eq 'show' ) + { show_conf unless $opt{q} ; } + elsif ( $key eq 'exit' ) + { Error 'exit per config directive' ; } + elsif ( $key eq 'max_age' ) + { $CNF { max_sync } = $val ; } + else + { show_conf ; + Error "unknown keyword '$key' (value '$val')" ; + } } } @@ -283,13 +286,13 @@ sub err if ( exists $OLD { $url } ) { $time = $OLD { $url } [ 0 ] ; $vrfy = $OLD { $url } [ 2 ] ; - $hstp = substr $OLD { $url } [ 3 ], 1 - $HIST ; + $hstp = substr $OLD { $url } [ 3 ], 1 - $HIST ; $hsts = $OLD { $url } [ 4 ] ; } else { $time = 'undef' ; $vrfy = 'undef' ; - $hstp = '' ; + $hstp = '' ; $hsts = '' ; } $RES { $url } = [ $time, $stat, $vrfy, $hstp . 'f', $hsts, $^T ] ; @@ -315,12 +318,12 @@ sub get_state while ( ) { chop ; my ( $url, $time, $stat, $vrfy, $hstp, $hsts, $lprb ) = split ' ' ; - $stat =~ s/_/ /g ; - $hstp = '' unless defined $hstp ; - $hsts = '' unless defined $hsts ; - $hsts = '' if $hsts eq 'undef' ; - $lprb = 'undef' unless defined $lprb ; - $OLD { $url } = [ $time, $stat, $vrfy, $hstp, $hsts, $lprb ] ; + $stat =~ s/_/ /g ; + $hstp = '' unless defined $hstp ; + $hsts = '' unless defined $hsts ; + $hsts = '' if $hsts eq 'undef' ; + $lprb = 'undef' unless defined $lprb ; + $OLD { $url } = [ $time, $stat, $vrfy, $hstp, $hsts, $lprb ] ; } close STT ; } @@ -340,10 +343,10 @@ sub check_hist if ( aprx_le $stmp, $^T - tim_to_s '1d' ) { $res = sprintf "%s-%s%s" - , $^T - , substr ( $hist, 1 - $HIST ) - , age_code ( $time ) - ; + , $^T + , substr ( $hist, 1 - $HIST ) + , age_code ( $time ) + ; } return $res ; } @@ -358,7 +361,7 @@ sub put_state my @OUT = @{ $RES { $url } } ; $OUT [ 1 ] =~ s/\s/_/g ; printf TMP "%s %s\n", $url, join ' ', @OUT - or Error "can't print to $TMP ($!)" ; + or Error "can't print to $TMP ($!)" ; } close TMP ; if ( -z $TMP ) @@ -374,7 +377,7 @@ sub get_ccs { chop ; next if /^#/ ; my ( $code, $dash, $reg ) = split ' ', $_, 3 ; - $CCS { lc $code } = lc $reg ; + $CCS { lc $code } = lc $reg ; } close CCS ; } @@ -398,32 +401,32 @@ sub get_list while ( ) { chop ; next if /^#/ ; - next if /^\s*$/ ; + next if /^\s*$/ ; if ( $CNF { list_style } eq 'plain' ) - { ( $reg, $url ) = split ' ' ; - unless ( $url =~ m!/$! ) - { print "*** mirmon appended '/' to $url\n" unless $opt{q} ; - $url .= '/' ; - } - } - elsif ( $CNF { list_style } eq 'apache' ) - { my $apache_type ; - ( $apache_type, $reg, $url ) = split ' ' ; - unless ( defined $APA_TYPES { $apache_type } ) - { print "*** strange type : $apache_type\n" unless $opt{q} ; - next ; - } - unless ( $url =~ m!/$! ) - { print "*** missing '/' in $url\n" unless $opt{q} ; - $url .= '/' ; - } - } - - my $site = site $url ; - my $type = type $url ; - - unless ( defined $site ) - { print "*** strange url : '$url'\n" unless $opt{q} ; next ; } + { ( $reg, $url ) = split ' ' ; + unless ( $url =~ m!/$! ) + { print "*** mirmon appended '/' to $url\n" unless $opt{q} ; + $url .= '/' ; + } + } + elsif ( $CNF { list_style } eq 'apache' ) + { my $apache_type ; + ( $apache_type, $reg, $url ) = split ' ' ; + unless ( defined $APA_TYPES { $apache_type } ) + { print "*** strange type : $apache_type\n" unless $opt{q} ; + next ; + } + unless ( $url =~ m!/$! ) + { print "*** missing '/' in $url\n" unless $opt{q} ; + $url .= '/' ; + } + } + + my $site = site $url ; + my $type = type $url ; + + unless ( defined $site ) + { print "*** strange url : '$url'\n" unless $opt{q} ; next ; } $LST { $url } = [ $type , $site, $reg ] ; } @@ -487,14 +490,14 @@ sub show_hist while ( $hst ne '' ) { if ( substr ( $prf, 0, 1 ) eq substr ( $hst, 0, 1 ) ) { $cnt ++ ; - $hst = substr $hst, 1 ; - } + $hst = substr $hst, 1 ; + } else - { $res .= img_sf_cnt $prf, $cnt ; - $prf = substr $hst, 0, 1 ; - $hst = substr $hst, 1 ; - $cnt = 1 ; - } + { $res .= img_sf_cnt $prf, $cnt ; + $prf = substr $hst, 0, 1 ; + $hst = substr $hst, 1 ; + $cnt = 1 ; + } } $res .= img_sf_cnt $prf, $cnt if $cnt ; return $res ; @@ -522,12 +525,12 @@ sub gen_histogram_probes for my $url ( keys %RES ) { ( $time, $stat, $vrfy, $hstp, $hsts, $lprb ) = @{ $RES { $url } } ; my $hr = int ( ( $^T - $lprb ) / 3600 + 0.5 ) ; - $hr_min = $hr if ! defined $hr_min or $hr < $hr_min ; - $hr_max = $hr if ! defined $hr_max or $hr > $hr_max ; + $hr_min = $hr if ! defined $hr_min or $hr < $hr_min ; + $hr_max = $hr if ! defined $hr_max or $hr > $hr_max ; if ( $stat eq 'ok' ) - { $tab { $hr } ++ ; $s_cnt ++ ; } - else - { $bad { $hr } ++ ; $f_cnt ++ ; } + { $tab { $hr } ++ ; $s_cnt ++ ; } + else + { $bad { $hr } ++ ; $f_cnt ++ ; } } $res = TR ( TH ( 'hours ago' ) @@ -536,7 +539,7 @@ sub gen_histogram_probes . TH sprintf ( '%s %s, %s %s' , $s_cnt , GRN ( 'successful' ) - , $f_cnt , RED ( 'failed' ) + , $f_cnt , RED ( 'failed' ) ) ) ; @@ -553,16 +556,16 @@ sub gen_histogram_probes my $y = $bad { $hr } || 0 ; my $n = int ( $x / $max * $HIST ) ; my $b = int ( $y / $max * $HIST ) ; - $res .= TR - ( TDr ( $hr ) - . TDr ( $x ) - . TDr ( $y ) - . TD - ( ( $n ? img_sf_cnt ( 's', $n ) : '' ) - . ( $b ? img_sf_cnt ( 'f', $b ) : '' ) - . ( ( $n + $b ) ? '' : ' ' ) - ) - ) ; + $res .= TR + ( TDr ( $hr ) + . TDr ( $x ) + . TDr ( $y ) + . TD + ( ( $n ? img_sf_cnt ( 's', $n ) : '' ) + . ( $b ? img_sf_cnt ( 'f', $b ) : '' ) + . ( ( $n + $b ) ? '' : ' ' ) + ) + ) ; } return "
\n" . TAB ( $res ) . "
\n" ; } @@ -587,14 +590,14 @@ sub gen_histogram for my $url ( keys %RES ) { my $time = $RES { $url } [ 0 ] ; if ( $time =~ /^\d+$/ ) - { my $s = $^T - $time ; - my $hr = int ( $s / $MAX_H * ( $MAX_h - 1 ) + 0.5 ) ; - if ( $s <= $MAX_H ) { $tab { $hr } ++ ; } - elsif ( $s <= $MAX_O ) { $tab { old } ++ ; } - else { $tab { ded } ++ ; } - } - else - { $tab { bad } ++ ; } + { my $s = $^T - $time ; + my $hr = int ( $s / $MAX_H * ( $MAX_h - 1 ) + 0.5 ) ; + if ( $s <= $MAX_H ) { $tab { $hr } ++ ; } + elsif ( $s <= $MAX_O ) { $tab { old } ++ ; } + else { $tab { ded } ++ ; } + } + else + { $tab { bad } ++ ; } } my $max = 0 ; for ( grep ! exists $Wmx { $_ }, keys %tab ) @@ -609,13 +612,13 @@ sub gen_histogram my $d = int ( $bad { $aux } / $W { $aux } ) ; for ( my $i = 1 ; $i < $W { $aux } ; $i++ ) { $tab { $aux . $i } = $d ; - if ( $bad { $aux } % $Wmx { $aux } > $i ) - { $tab { $aux . $i } ++ ; - $tab { $aux } -- ; - } - } + if ( $bad { $aux } % $Wmx { $aux } > $i ) + { $tab { $aux . $i } ++ ; + $tab { $aux } -- ; + } + } $tab { $aux } -= ( $W { $aux } - 1 ) * $d ; - $max = $tab { $aux } if $max < $tab { $aux } ; + $max = $tab { $aux } if $max < $tab { $aux } ; } } @@ -638,29 +641,29 @@ sub gen_histogram ; for ( my $h = $H ; $h > 0 ; $h -- ) { $res .= "\n" ; - $res .= sprintf "↑\n" - if $h == $H ; - $res .= sprintf '%s' . "\n" - , $H-6, NSS ( $max ) if $h == $H - 3 ; - $res .= sprintf "↓\n" - if $h == 3 ; + $res .= sprintf "↑\n" + if $h == $H ; + $res .= sprintf '%s' . "\n" + , $H-6, NSS ( $max ) if $h == $H - 3 ; + $res .= sprintf "↓\n" + if $h == 3 ; for my $x ( @keys ) - { $res .= sprintf "%s\n" - , ( ( $hst { $x } >= $h ) - ? img_sf - ( $x =~ /^\d+$/ - ? 's' - : ( $x =~ /^old/ ? 'b' : ( $x =~ /^ded/ ? 'f' : 'z' ) ) - ) - : ( ( $h == 1 and $hst { $x } == 0 ) - ? sprintf - ( '' - , $CNF { icons } - ) - : '' - ) - ) ; - } + { $res .= sprintf "%s\n" + , ( ( $hst { $x } >= $h ) + ? img_sf + ( $x =~ /^\d+$/ + ? 's' + : ( $x =~ /^old/ ? 'b' : ( $x =~ /^ded/ ? 'f' : 'z' ) ) + ) + : ( ( $h == 1 and $hst { $x } == 0 ) + ? sprintf + ( '' + , $CNF { icons } + ) + : '' + ) + ) ; + } $res .= "\n" ; } @@ -707,7 +710,7 @@ sub gen_histogram $res .= "\n" ; my $FRMT = ' %s ' ; - + $res .= "\n" ; $res .= sprintf "$FRMT\n", 1, NSS scalar keys %RES ; $res .= "|\n" ; @@ -729,7 +732,7 @@ sub gen_histogram { $res .= sprintf "
each %s %s %s %s unit represents %s mirror sites.\n" , img_sf ( 's' ) , img_sf ( 'f' ), img_sf ( 'b' ) , img_sf ( 'z' ) - , sprintf ( "%.1f", $max / $H ) + , sprintf ( "%.1f", $max / $H ) } return $res ; } @@ -770,11 +773,11 @@ sub gen_page { my ( $time, $stat, $vrfy ) = @{ $RES { $url } } ; if ( $stat eq 'ok' ) { $ok ++ ; } else { $stats { $stat } ++ ; } if ( $time eq 'undef' ) - { $bad ++ ; } - elsif ( 'f' eq age_code $time ) - { $old ++ ; } - if ( $vrfy eq 'undef' or aprx_lt $vrfy, $^T - max_vrfy ) - { $unr ++ ; } + { $bad ++ ; } + elsif ( 'f' eq age_code $time ) + { $old ++ ; } + if ( $vrfy eq 'undef' or aprx_lt $vrfy, $^T - max_vrfy ) + { $unr ++ ; } } my $STAT = sprintf @@ -795,31 +798,31 @@ sub gen_page for my $reg ( sort keys %tab ) { $refs .= sprintf " %s \n" , url "#$reg" - , "$reg" - ; + , "$reg" + ; } my $COLS = 5 ; my $LOGO = $CNF { project_logo } ? url ( $CNF { project_url } - , sprintf + , sprintf ( '%s' - , $CNF { project_logo } - , $CNF { project_name } - ) + , $CNF { project_logo } + , $CNF { project_name } + ) ) : '' ; my $HTOP = $CNF{htm_top} ? $CNF{htm_top} . "\n" : '' ; my $FOOT = $CNF{htm_foot} ? $CNF{htm_foot} . "\n" : '' ; + my $HEAD = $CNF{htm_head} ? $CNF{htm_head} . "\n" : '' ; my $TITL = url $CNF{project_url}, $CNF{project_name} ; my $EXPD = exp_date ; open PPP, ">$TMP" or Error "can't write $TMP ($!)" ; print PPP '' ; print PPP "\n" ; print PPP "\n" ; @@ -828,6 +831,7 @@ sub gen_page . 'CONTENT="text/html; charset=ISO-8859-1">' ; print PPP "\n" ; print PPP "\n" ; + print PPP $HEAD if $HEAD ; print PPP "\n" ; print PPP "\n" ; print PPP $LOGO ; @@ -885,52 +889,52 @@ sub gen_page my $ccs = exists $CCS { $reg } ? $CCS { $reg } : $reg ; $ccs = nam $reg, - ( scalar @{ $itms } > 6 - ? sprintf "%s  -  %d sites" - , $ccs, scalar @{ $itms } - : $ccs - ) ; + ( scalar @{ $itms } > 6 + ? sprintf "%s  -  %d sites" + , $ccs, scalar @{ $itms } + : $ccs + ) ; - my $attr3 = "COLSPAN=$COLS BGCOLOR=\"YELLOW\"" ; + my $attr3 = "COLSPAN=$COLS BGCOLOR=\"YELLOW\"" ; printf PPP "$ccs\n" ; - for my $itm ( sort by_type_site @{ $itms } ) - { my ( $type, $url, $site ) = @{ $itm } ; - my ( $time, $stat, $hstp, $hsts, $vrfy ) ; - my ( $pr_time, $pr_last, $pr_hstp, $pr_hsts ) ; - - print PPP "\n" ; - printf PPP - " %s  %s\n" - . " %s\n" - , url ( $url , $site ) - , url ( home ( $url ), '@' ) - , $type - ; - - if ( exists $RES { $url } ) - { ( $time, $stat, $vrfy, $hstp, $hsts ) = @{ $RES { $url } } ; - $pr_time = $time =~ /^\d+$/ - ? diff $time, $^T - max_age2 : ' ' ; - $pr_last = $vrfy =~ /^\d+$/ - ? diff $vrfy, $^T - max_vrfy : ' ' ; + for my $itm ( sort by_type_site @{ $itms } ) + { my ( $type, $url, $site ) = @{ $itm } ; + my ( $time, $stat, $hstp, $hsts, $vrfy ) ; + my ( $pr_time, $pr_last, $pr_hstp, $pr_hsts ) ; + + print PPP "\n" ; + printf PPP + " %s  %s\n" + . " %s\n" + , url ( $url , $site ) + , url ( home ( $url ), '@' ) + , $type + ; + + if ( exists $RES { $url } ) + { ( $time, $stat, $vrfy, $hstp, $hsts ) = @{ $RES { $url } } ; + $pr_time = $time =~ /^\d+$/ + ? diff $time, $^T - max_age2 : ' ' ; + $pr_last = $vrfy =~ /^\d+$/ + ? diff $vrfy, $^T - max_vrfy : ' ' ; $pr_hstp = show_hist $hstp ; $pr_hsts = show_hist_age $hsts, $time ; - } - else - { ( $pr_time, $pr_last, $pr_hstp, $pr_hsts, $stat ) = - ( ' ', ' ', '', '', ' ' ) ; - } - - $stat = RED $stat if $stat ne 'ok' ; - printf PPP " %s
%s\n" - , $pr_time, $pr_hsts ; - printf PPP " %s
%s\n" - , $pr_last, $pr_hstp ; - printf PPP " %s\n", $stat ; - print PPP "\n" ; - } + } + else + { ( $pr_time, $pr_last, $pr_hstp, $pr_hsts, $stat ) = + ( ' ', ' ', '', '', ' ' ) ; + } + + $stat = RED $stat if $stat ne 'ok' ; + printf PPP " %s
%s\n" + , $pr_time, $pr_hsts ; + printf PPP " %s
%s\n" + , $pr_last, $pr_hstp ; + printf PPP " %s\n", $stat ; + print PPP "\n" ; + } } print PPP "\n" ; print PPP "\n" ; @@ -1062,7 +1066,7 @@ configuration parameters : -

last probe, probe stats

+

last probe, probe stats

Last probe indicates when the last successful probe was made. @@ -1072,7 +1076,7 @@ A probe is either a failure.
-

last stat

+

last stat

Last stat gives the status of the last probe. @@ -1096,13 +1100,13 @@ sub start_date if ( $res ) { $WGT -> blocking ( 0 ) ; $GET -> add ( $WGT ) ; - $URL { $WGT } = $url ; + $URL { $WGT } = $url ; } else { err $url, 'no pipe' ; } } -sub get_date +sub get_date { my $WGT = shift ; my $url = $URL { $WGT } ; my $time = undef ; @@ -1113,13 +1117,12 @@ sub get_date $WGT -> flush ; $WGT -> close ; - unless ( defined $time ) { return err $url, 'no time' ; } + return err $url, 'no time' unless defined $time ; + return err $url, "empty" if $time =~ /^\s*$/ ; $time = ( split ' ', $time ) [ 0 ] ; - if ( $time eq '' ) - { err $url, "empty" ; } - elsif ( $time !~ /^\d+$/ ) + if ( $time !~ /^\d+$/ ) { $time = htmlquote $time ; $time = substr ( $time, 0, 15 ) . '..' if length $time > 15 ; err $url, "'$time'" ; @@ -1136,61 +1139,61 @@ sub get_dates for my $url ( sort keys %LST ) { if ( $opt{get} eq 'all' or ! exists $OLD { $url } ) { push @QUE, $url ; } - elsif ( $opt{get} eq 'update' ) - { my $stat = $OLD { $url } [ 1 ] ; - my $vrfy = $OLD { $url } [ 2 ] ; - my $lprb = $OLD { $url } [ 5 ] ; - if ( ( $lprb eq 'undef' - or aprx_le $lprb, $^T - tim_to_s $CNF { min_poll } - ) - and ( $stat ne 'ok' - or aprx_le $vrfy, $^T - tim_to_s $CNF { max_poll } - ) - ) - { push @QUE, $url ; } - elsif ( $CNF { randomize } and 0 == int rand $cnt_LST ) - { push @QUE, $url ; } - else - { $RES { $url } = $OLD { $url } ; } - } - else - { Error "unknown opt_get '$opt{get}'" ; } + elsif ( $opt{get} eq 'update' ) + { my $stat = $OLD { $url } [ 1 ] ; + my $vrfy = $OLD { $url } [ 2 ] ; + my $lprb = $OLD { $url } [ 5 ] ; + if ( ( $lprb eq 'undef' + or aprx_le $lprb, $^T - tim_to_s $CNF { min_poll } + ) + and ( $stat ne 'ok' + or aprx_le $vrfy, $^T - tim_to_s $CNF { max_poll } + ) + ) + { push @QUE, $url ; } + elsif ( $CNF { randomize } and 0 == int rand $cnt_LST ) + { push @QUE, $url ; } + else + { $RES { $url } = $OLD { $url } ; } + } + else + { Error "unknown opt_get '$opt{get}'" ; } } while ( @QUE ) { while ( $GET -> count () < $PAR and @QUE ) { my $url = shift @QUE ; if ( gethost site $url ) - { start_date $url, $CMD ; } - else - { err $url, 'site not found' ; } + { start_date $url, $CMD ; } + else + { err $url, 'site not found' ; } } - my @can_read = $GET -> can_read ( 0 ) ; + my @can_read = $GET -> can_read ( 0 ) ; + + printf "que %d, get %d, can %d\n", + scalar @QUE, $GET -> count (), scalar @can_read + if $opt{v} ; - printf "que %d, get %d, can %d\n", - scalar @QUE, $GET -> count (), scalar @can_read - if $opt{v} ; - for my $can_read ( @can_read ) - { get_date $can_read ; } + { get_date $can_read ; } sleep 1 ; } my $stop = time + $CNF { timeout } + 10 ; - + while ( $GET -> count () and time < $stop ) { sleep 1 ; my @can_read = $GET -> can_read ( 0 ) ; - printf "wait %2d, get %d, can %d\n", - $stop - scalar time, $GET -> count (), scalar @can_read - if $opt{v} ; - + printf "wait %2d, get %d, can %d\n", + $stop - scalar time, $GET -> count (), scalar @can_read + if $opt{v} ; + for my $can_read ( @can_read ) - { get_date $can_read ; } + { get_date $can_read ; } } for my $WGT ( $GET -> handles () ) @@ -1250,7 +1253,7 @@ __END__ with the results. The subset contains the sites that are new, bad and/or not probed for a specified time. - When no 'get' option is specified, the program just generates a + When no 'get' option is specified, the program just generates a new web page from the last known state. The program checks the mirrors by running a (user specified) @@ -1365,7 +1368,7 @@ __END__ Here it is assumed that each hour the root server writes a timestamp in /path/to/archive/TIME, for instance with a crontab entry like - + 42 * * * * perl -e 'printf "%s\n", time' > /path/to/archive/TIME Mirmon reads one line of output from the probe and interprets @@ -1411,14 +1414,12 @@ __END__ project_logo /icons/apache.gif project_logo http://www.apache.org/icons/... -=head2 htm_foot +=head2 htm_head - Optionally specify HTML to be placed near the bottom of the page. + Optionally specify some HTML to be placed before . - htm_foot -
- -
+ htm_head + =head2 htm_top @@ -1427,6 +1428,15 @@ __END__ htm_top testing 1, 2, 3 +=head2 htm_foot + + Optionally specify HTML to be placed near the bottom of the page. + + htm_foot +
+ +
+ =head2 put_histo top|bottom|nowhere Optionally specify where the age histogram must be placed. @@ -1579,7 +1589,7 @@ __END__ Computer Science Department, Utrecht University
- $Id: mirmon,v 1.36 2004/12/28 17:54:10 henkp Exp $ + $Id: mirmon,v 1.37 2006/12/04 15:16:11 henkp Exp henkp $
=end html -- 2.30.2