Commit 215f22c9 authored by Hideki Yamane's avatar Hideki Yamane 🐈

Imported Upstream version 2.11

parent 3ec2baef
# Copyright (c) 2003-2014 Henk Penning, all rights reserved.
# Copyright (c) 2003-2016 Henk Penning, all rights reserved.
# penning@uu.nl, http://www.staff.science.uu.nl/~penni101/
# Version 1.1 was donated to the Apache Software Foundation 2003 Jan 28.
#
......
#! /usr/bin/perl -w
# Copyright (c) 2003-2014 Henk Penning, all rights reserved.
# Copyright (c) 2003-2016 Henk Penning, all rights reserved.
# penning@uu.nl, http://www.staff.science.uu.nl/~penni101/
# Version 1.1 was donated to the Apache Software Foundation 2003 Jan 28.
#
......@@ -29,7 +29,7 @@
use strict ;
our $PRG = 'mirmon' ;
our $VER = "2.10" ;
our $VER = "2.11" ;
our $DEF_TIMEOUT = 300 ;
our $HIST = 14 ;
......@@ -665,16 +665,21 @@ sub age_avg
for my $age ( @tab ) { $tot += $age ; }
my $mean = $tot / $cnt ;
# @tab 0 1 2 3 4 5 6 7
# $#tab -1 0 1 2 3 4 5 6
# mid U 0 0 1 1 2 2 3
# res U 0 0+1 1 1+2 2 2+3 3
my $median ;
if ( $cnt == 1 )
{ $median = $tab [ 0 ] ; }
elsif ( $cnt % 2 )
{ my $mid = int ( $#tab / 2 ) ;
$median = ( $tab [ $mid ] + $tab [ $mid + 1 ] ) / 2 ;
elsif ( $cnt % 2 ) # cnt is odd ; $#tab is even
{ my $mid = int ( $#tab / 2 + 0.5 ) ;
$median = $tab [ $mid ] ;
}
else
else # cnt is even ; $#tab is odd
{ my $mid = int ( $#tab / 2 ) ;
$median = $tab [ $mid ] ;
$median = ( $tab [ $mid ] + $tab [ $mid + 1 ] ) / 2 ;
}
if ( @tab < 2 )
......@@ -1839,12 +1844,12 @@ mirmon(1)
=begin html
<p>
&copy; 2003-2014
&copy; 2003-2016
<a href="http://www.staff.science.uu.nl/~penni101/">Henk P. Penning</a>,
<a href="http://www.uu.nl/faculty/science/EN/">Faculty of Science</a>,
<a href="http://www.uu.nl/">Utrecht University</a>
<br />
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp ;
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp ;
<a href="http://validator.w3.org/check?uri=referer">verify html</a>
</p>
......@@ -1852,19 +1857,19 @@ mirmon(1)
=begin man
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
=end man
=begin text
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
=end text
......
......@@ -6,6 +6,11 @@ Upgrading :
-- It is advisable to update the countries.list :
http://www.staff.science.uu.nl/~penni101/mirmon/svn/trunk/countries.list
----------------------------------------------------------------------
mirmon 2.11 -- 22 juli 2016
o Brent Thompson spotted a bug in the computation for 'median' ; fixed.
----------------------------------------------------------------------
mirmon 2.10 -- 15 augustus 2014
......
mirmon-2.10
mirmon-2.11
# based on : http://www.iso.org/iso/list-en1-semic-3.txt
ad - Andorra
ae - United Arab Emirates
af - Afghanistan
......@@ -38,7 +37,7 @@ by - Belarus
bz - Belize
ca - Canada
cc - Cocos (Keeling) Islands
cd - Congo
cd - Congo, the Democratic Republic of the
cf - Central African Republic
cg - Congo
ch - Switzerland
......
#! /usr/bin/perl -w
# Copyright (c) 2003-2014 Henk Penning, all rights reserved.
# Copyright (c) 2003-2016 Henk Penning, all rights reserved.
# penning@uu.nl, http://www.staff.science.uu.nl/~penni101/
# Version 1.1 was donated to the Apache Software Foundation 2003 Jan 28.
#
......@@ -29,7 +29,7 @@
use strict ;
our $PRG = 'mirmon' ;
our $VER = "2.10" ;
our $VER = "2.11" ;
our $DEF_TIMEOUT = 300 ;
our $HIST = 14 ;
......@@ -665,16 +665,21 @@ sub age_avg
for my $age ( @tab ) { $tot += $age ; }
my $mean = $tot / $cnt ;
# @tab 0 1 2 3 4 5 6 7
# $#tab -1 0 1 2 3 4 5 6
# mid U 0 0 1 1 2 2 3
# res U 0 0+1 1 1+2 2 2+3 3
my $median ;
if ( $cnt == 1 )
{ $median = $tab [ 0 ] ; }
elsif ( $cnt % 2 )
{ my $mid = int ( $#tab / 2 ) ;
$median = ( $tab [ $mid ] + $tab [ $mid + 1 ] ) / 2 ;
elsif ( $cnt % 2 ) # cnt is odd ; $#tab is even
{ my $mid = int ( $#tab / 2 + 0.5 ) ;
$median = $tab [ $mid ] ;
}
else
else # cnt is even ; $#tab is odd
{ my $mid = int ( $#tab / 2 ) ;
$median = $tab [ $mid ] ;
$median = ( $tab [ $mid ] + $tab [ $mid + 1 ] ) / 2 ;
}
if ( @tab < 2 )
......@@ -1839,12 +1844,12 @@ mirmon(1)
=begin html
<p>
&copy; 2003-2014
&copy; 2003-2016
<a href="http://www.staff.science.uu.nl/~penni101/">Henk P. Penning</a>,
<a href="http://www.uu.nl/faculty/science/EN/">Faculty of Science</a>,
<a href="http://www.uu.nl/">Utrecht University</a>
<br />
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp ;
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp ;
<a href="http://validator.w3.org/check?uri=referer">verify html</a>
</p>
......@@ -1852,19 +1857,19 @@ mirmon(1)
=begin man
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
=end man
=begin text
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
=end text
......@@ -1876,7 +1881,7 @@ use IO::Pipe ;
use IO::Select ;
use Net::hostent ;
my $VERSION = Base::Version . ' - Fri Aug 15 12:26:55 2014 - henkp' ;
my $VERSION = Base::Version . ' - Sat Jul 23 09:12:31 2016 - henkp' ;
my $DEF_CNF = join ', ', Mirmon -> config_list ;
my $TIMEOUT = Base::DEF_TIMEOUT ;
......@@ -2522,12 +2527,12 @@ mirmon.pm(3)
=begin html
<p>
&copy; 2003-2014
&copy; 2003-2016
<a href="http://www.staff.science.uu.nl/~penni101/">Henk P. Penning</a>,
<a href="http://www.uu.nl/faculty/science/EN/">Faculty of Science</a>,
<a href="http://www.uu.nl/">Utrecht University</a>
<br />
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp ;
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp ;
<a href="http://validator.w3.org/check?uri=referer">verify html</a>
</p>
......@@ -2535,19 +2540,19 @@ mirmon.pm(3)
=begin man
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
=end man
=begin text
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
=end text
......
This diff is collapsed.
......@@ -3,11 +3,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file is generated from pod source by user 'csg'.
This file is generated from pod source by user 'penni101'.
Generator : trunk/admin/doc/pod2htm
Source : trunk/admin/doc/../mirmon.pl
Date/time : Fri Aug 15 12:26:56 2014 [UTC]
Date/time : Sat Jul 23 09:12:32 2016 [UTC]
-->
<head>
......@@ -627,12 +627,12 @@ existing database.</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>
&copy; 2003-2014
&copy; 2003-2016
<a href="http://www.staff.science.uu.nl/~penni101/">Henk P. Penning</a>,
<a href="http://www.uu.nl/faculty/science/EN/">Faculty of Science</a>,
<a href="http://www.uu.nl/">Utrecht University</a>
<br />
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp ;
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp ;
<a href="http://validator.w3.org/check?uri=referer">verify html</a>
</p>
</body>
......
......@@ -12,7 +12,7 @@ use IO::Pipe ;
use IO::Select ;
use Net::hostent ;
my $VERSION = Base::Version . ' - Fri Aug 15 12:26:55 2014 - henkp' ;
my $VERSION = Base::Version . ' - Sat Jul 23 09:12:31 2016 - henkp' ;
my $DEF_CNF = join ', ', Mirmon -> config_list ;
my $TIMEOUT = Base::DEF_TIMEOUT ;
......@@ -658,12 +658,12 @@ mirmon.pm(3)
=begin html
<p>
&copy; 2003-2014
&copy; 2003-2016
<a href="http://www.staff.science.uu.nl/~penni101/">Henk P. Penning</a>,
<a href="http://www.uu.nl/faculty/science/EN/">Faculty of Science</a>,
<a href="http://www.uu.nl/">Utrecht University</a>
<br />
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp ;
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp ;
<a href="http://validator.w3.org/check?uri=referer">verify html</a>
</p>
......@@ -671,19 +671,19 @@ mirmon.pm(3)
=begin man
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
=end man
=begin text
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
=end text
......
.\" Automatically generated by Pod::Man 2.26 (Pod::Simple 3.23)
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
......@@ -17,11 +25,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
......@@ -38,36 +46,24 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
. if \nF \{
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{
. nr % 0
. nr F 2
. \}
. \}
. nr % 0
. rr F
.\}
.rr rF
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
......@@ -133,35 +129,37 @@
.\" ========================================================================
.\"
.IX Title "Mirmon 3"
.TH Mirmon 3 "2014-08-15" "perl v5.8.5" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.TH Mirmon 3 "2016-07-23" "perl v5.8.8" "User Contributed Perl Documentation"
.SH "NAME"
Mirmon \- OO interface for mirmon objects
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& use Mirmon ;
\&
\& $m = Mirmon \-> new ( [ $path\-to\-config ] )
\&
\& $conf = $m \-> conf ; # a Mirmon::Conf object
\& $state = $m \-> state ; # the mirmon state
\&
.Ve
.PP
.Vb 1
\& $m = Mirmon -> new ( [ $path-to-config ] )
.Ve
.PP
.Vb 2
\& $conf = $m -> conf ; # a Mirmon::Conf object
\& $state = $m -> state ; # the mirmon state
.Ve
.PP
.Vb 5
\& for my $url ( keys %$state )
\& { $mirror = $state \-> { $url } ; # a Mirmon::Mirror object
\& $mail = $mirror \-> mail ; # contact address
\& $mirror \-> age ( time ) ; # set mirror age
\& { $mirror = $state -> { $url } ; # a Mirmon::Mirror object
\& $mail = $mirror -> mail ; # contact address
\& $mirror -> age ( time ) ; # set mirror age
\& }
.Ve
.PP
Many class and object methods can be used to get or set attributes :
.PP
.Vb 2
\& $object \-> attribute # get an atttibute
\& $object \-> attribute ( $attr ) # set an atttibute
\& $object -> attribute # get an atttibute
\& $object -> attribute ( $attr ) # set an atttibute
.Ve
.SH "Mirmon class methods"
.IX Header "Mirmon class methods"
......@@ -202,7 +200,7 @@ Returns the list of default locations for config files.
.el .IP "\fBget_dates ( \f(CB$get\fB [, \f(CB$URL\fB] )\fR" 4
.IX Item "get_dates ( $get [, $URL] )"
Probes all mirrors if \f(CW$get\fR is \f(CW\*(C`all\*(C'\fR ; or a subset if \f(CW$get\fR is \f(CW\*(C`update\*(C'\fR ;
or only \fI\f(CI$URL\fI\fR if \f(CW$get\fR is \f(CW\*(C`url\*(C'\fR.
or only \fI$URL\fR if \f(CW$get\fR is \f(CW\*(C`url\*(C'\fR.
.SH "Mirmon::Conf object methods"
.IX Header "Mirmon::Conf object methods"
A Mirmon::Conf object represents a mirmon conguration.
......@@ -228,7 +226,7 @@ A Mirmon::Mirror object represents the last known state of a mirror.
It is normaly created by \fIMirmon::new()\fR from the state file,
as specified in the mirmon config file.
Mirmon::Mirror objects can be used to probe mirrors.
.SS "attribute methods"
.Sh "attribute methods"
.IX Subsection "attribute methods"
.IP "\fBurl\fR" 4
.IX Item "url"
......@@ -267,7 +265,7 @@ One or more 'skip's are inserted, if the timestamp is two or more days old
.IP "\fBlast_probe\fR" 4
.IX Item "last_probe"
The timestamp of the last probe, or 'undef' if the mirror was never probed.
.SS "object methods"
.Sh "object methods"
.IX Subsection "object methods"
.IP "\fBmirmon\fR" 4
.IX Item "mirmon"
......@@ -305,15 +303,18 @@ the handles and the mirror objects.
.ie n .IP "\fBfinish_probe ( \fB$handle\fB )\fR" 4
.el .IP "\fBfinish_probe ( \f(CB$handle\fB )\fR" 4
.IX Item "finish_probe ( $handle )"
Sets the (IO::Handle) \fB\f(CB$handle\fB\fR to blocking \s-1IO\s0 ;
Sets the (IO::Handle) \fB$handle\fR to blocking \s-1IO\s0 ;
reads a result from the handle,
and updates the state of the mirror.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
mirmon(1)
.SH "AUTHOR"
.IX Header "AUTHOR"
(c) 2003-2014 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
.Vb 4
\& (c) 2003-2016 Henk P. Penning
\& Faculty of Science, Utrecht University
\& http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
\& mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
.Ve
......@@ -3,11 +3,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file is generated from pod source by user 'csg'.
This file is generated from pod source by user 'penni101'.
Generator : trunk/admin/doc/pod2htm
Source : trunk/admin/doc/../Mirmon.pm
Date/time : Fri Aug 15 12:26:56 2014 [UTC]
Date/time : Sat Jul 23 09:12:32 2016 [UTC]
-->
<head>
......@@ -288,12 +288,12 @@ and updates the state of the mirror.</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>
&copy; 2003-2014
&copy; 2003-2016
<a href="http://www.staff.science.uu.nl/~penni101/">Henk P. Penning</a>,
<a href="http://www.uu.nl/faculty/science/EN/">Faculty of Science</a>,
<a href="http://www.uu.nl/">Utrecht University</a>
<br />
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp ;
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp ;
<a href="http://validator.w3.org/check?uri=referer">verify html</a>
</p>
</body>
......
Mirmon(3) User Contributed Perl Documentation Mirmon(3)
Mirmon(3) User Contributed Perl Documentation Mirmon(3)
......@@ -33,8 +33,8 @@ MMiirrmmoonn ccllaassss mmeetthhooddss
verbosity
Mirmon always reports errors. Normally it only reports changes
(inserts/deletes) found in the mirror_list ; in _q_u_i_e_t mode, it
doesn’t. In _v_e_r_b_o_s_e mode, it reports progress: the startup and
finishing of probes.
doesn’t. In _v_e_r_b_o_s_e mode, it reports progress: the startup and fin-
ishing of probes.
Mirmon::verbose ( [ $bool ] ) # get/set verbose
Mirmon::quiet ( [ $bool ] ) # get/set quiet
......@@ -45,9 +45,8 @@ MMiirrmmoonn oobbjjeecctt mmeetthhooddss
Returns Mirmon’s Mirmon::Conf object.
ssttaattee
Returns a hashref "{ url => mirror, ... }", where _u_r_l is as
specified in the mirror list and _m_i_r_r_o_r is a Mirmon::Mirror
object.
Returns a hashref "{ url => mirror, ... }", where _u_r_l is as speci-
fied in the mirror list and _m_i_r_r_o_r is a Mirmon::Mirror object.
rreeggiioonnss
Returns a hashref "{ country_code => country_name, ... }".
......@@ -61,8 +60,8 @@ MMiirrmmoonn oobbjjeecctt mmeetthhooddss
MMiirrmmoonn::::CCoonnff oobbjjeecctt mmeetthhooddss
A Mirmon::Conf object represents a mirmon conguration. It is normaly
created by _M_i_r_m_o_n_:_:_n_e_w_(_). A specified (or default) config file is
read and interpreted.
created by _M_i_r_m_o_n_:_:_n_e_w_(_). A specified (or default) config file is read
and interpreted.
attribute methods
For every config file entry, there is an attribute method :
......@@ -75,16 +74,18 @@ MMiirrmmoonn::::CCoonnff oobbjjeecctt mmeetthhooddss
Returns the file name of (the root of) the configuration file(s).
ssiittee__uurrll
Returns a hashref "{ site => url, ... }", as specified in the
mirmon config file.
Returns a hashref "{ site => url, ... }", as specified in the mir-
mon config file.
MMiirrmmoonn::::MMiirrrroorr oobbjjeecctt mmeetthhooddss
A Mirmon::Mirror object represents the last known state of a mirror.
It is normaly created by _M_i_r_m_o_n_:_:_n_e_w_(_) from the state file, as
specified in the mirmon config file. Mirmon::Mirror objects can be
used to probe mirrors.
It is normaly created by _M_i_r_m_o_n_:_:_n_e_w_(_) from the state file, as speci-
fied in the mirmon config file. Mirmon::Mirror objects can be used to
probe mirrors.
aattttrriibbuuttee mmeetthhooddss
aattttrriibbuuttee mmeetthhooddss
uurrll The url as given in the mirror list.
aaggee The mirror’s timestamp found by the last successful probe, or
......@@ -95,33 +96,35 @@ MMiirrmmoonn::::MMiirrrroorr oobbjjeecctt mmeetthhoodd
probed.
llaasstt__ookk__pprroobbee
The timestamp of the last successful probe or ’undef’ if the
mirror was never successfully probed.
The timestamp of the last successful probe or ’undef’ if the mirror
was never successfully probed.
pprroobbee__hhiissttoorryy
The probe history is a list of ’s’ (for success) and ’f’ (for
failure) characters indicating the result of the probe. New
results are appended whenever the mirror is probed.
The probe history is a list of ’s’ (for success) and ’f’ (for fail-
ure) characters indicating the result of the probe. New results are
appended whenever the mirror is probed.
ssttaattee__hhiissttoorryy
The state history consists of a timestamp, a ’-’ char, and a list
of chars indicating a past status: ’s’ (fresh), ’b’ (oldish), ’f’
(old), ’z’ (bad) or ’x’ (skip). The timestamp indicates when the
state history was last updated. The current status of the mirror
is determined by the mirror’s age and a few configuration
parameters (min_sync, max_sync, max_poll). The state history is
updated when the mirror is probed. If the last update of the
history was less than 24 hours ago, the last status is replaced by
the current status. If the last update of the history was more
than 24 hours ago, the current status is appended to the history.
One or more ’skip’s are inserted, if the timestamp is two or more
days old (when mirmon hasn’t run for more than two days).
is determined by the mirror’s age and a few configuration parame-
ters (min_sync, max_sync, max_poll). The state history is updated
when the mirror is probed. If the last update of the history was
less than 24 hours ago, the last status is replaced by the current
status. If the last update of the history was more than 24 hours
ago, the current status is appended to the history. One or more
’skip’s are inserted, if the timestamp is two or more days old
(when mirmon hasn’t run for more than two days).
llaasstt__pprroobbee
The timestamp of the last probe, or ’undef’ if the mirror was
never probed.
The timestamp of the last probe, or ’undef’ if the mirror was never
probed.
oobbjjeecctt mmeetthhooddss
oobbjjeecctt mmeetthhooddss
mmiirrmmoonn
Returns the parent Mirmon object.
......@@ -136,10 +139,10 @@ MMiirrmmoonn::::MMiirrrroorr oobbjjeecctt mmeetthhoodd
the ssiittee is _w_w_w_._s_o_m_e_._o_r_g, and hhoommee is _f_t_p_:_/_/_w_w_w_._s_o_m_e_._o_r_g_/.
aaggee__iinn__ddaayyss
Returns the mirror’s age (in fractional days), based on the
mirror’s timestamp as found by the last successful probe ; or
based on the length of the state history if no probe was ever
successful. Returns ’undef’ if the mirror was never probed.
Returns the mirror’s age (in fractional days), based on the mir-
ror’s timestamp as found by the last successful probe ; or based on
the length of the state history if no probe was ever successful.
Returns ’undef’ if the mirror was never probed.
mmaaiill
Returns the mirror’s contact address as specified in the mirror
......@@ -160,12 +163,13 @@ MMiirrmmoonn::::MMiirrrroorr oobbjjeecctt mmeetthhoodd
SSEEEE AALLSSOO
mirmon(1)
AAUUTTHHOORR
(c) 2003-2014 Henk P. Penning
(c) 2003-2016 Henk P. Penning
Faculty of Science, Utrecht University
http://www.staff.science.uu.nl/~penni101/ -- penning@uu.nl
mirmon-2.10 - Fri Aug 15 12:26:55 2014 ; henkp
mirmon-2.11 - Sat Jul 23 09:12:31 2016 ; henkp
perl v5.8.5 2014-08-15 Mirmon(3)
perl v5.8.8 2016-07-23 Mirmon(3)
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment