cvs: php-master-web /scripts mirror-test
| From: | Gabor Hojtsy | Date: | Sun, 27 Jun 2004 14:52:42 +0000 |
| Subject: | cvs: php-master-web /scripts mirror-test | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-25150@lists.php.net to get a copy of this message | ||
goba Sun Jun 27 10:52:42 2004 EDT
Modified files:
/php-master-web/scripts mirror-test
Log:
let me get some diagnostical info on how these two data sources compare
http://cvs.php.net/diff.php/php-master-web/scripts/mirror-test?r1=1.59&r2=1.60&ty=u
Index: php-master-web/scripts/mirror-test
diff -u php-master-web/scripts/mirror-test:1.59 php-master-web/scripts/mirror-test:1.60
--- php-master-web/scripts/mirror-test:1.59 Sun Jun 27 09:12:38 2004
+++ php-master-web/scripts/mirror-test Sun Jun 27 10:52:41 2004
@@ -23,7 +23,7 @@
mysql_select_db("php3");
// Get mirror information for all active mirrors (regardless of their type!)
-$query = "SELECT maintainer, hostname, id, has_search, has_stats, lang,
+$query = "SELECT maintainer, hostname, id, has_search, has_stats, lang, lastchecked,
UNIX_TIMESTAMP(lastupdated) AS lastupdated
FROM mirrors WHERE active = 1";
$result = mysql_query($query)
@@ -55,6 +55,13 @@
// Get all mirror sites, and count the index of them
foreach ($hosts as $index => $host) {
+ // Diagnostical info
+ $doublecheck .= $host['hostname'] . ' : ' .
+ date("r", $host['lastupdate']) . "/" .
+ date("r", $mirrmon[$host['hostname']][0]) . " ..
" .
+ date("r", $host['lastchecked']) . "/" .
+ date("r", $mirrmon[$host['hostname']][1]) . "\n";
+
// Open port 80 on the mirror site
$fp = @fsockopen($host['hostname'], 80, $errno, $errstr, 15);
@@ -197,7 +204,7 @@
@mail(
"goba@php.net",
"Mirror site updates done",
- "$doublecheck" .
+ "$doublecheck\n" .
"$mirrorsupdated mirror sites properly updated (out of " . count($hosts) .
")\n\nProblematic mirrors:\n\n" . $problems
);
//}