slitaz-dev-tools rev 163

mirror-info: moved mirror-info to slitaz/forge/mirror/info
author Christophe Lincoln <pankso@slitaz.org>
date Tue Mar 20 13:12:03 2012 +0100 (2012-03-20)
parents 0727a5993538
children 82ee66991963
files mirror-tools/mirror-info/bin/makegraphs mirror-tools/mirror-info/graphs.php mirror-tools/mirror-info/index.php mirror-tools/mirror-info/pics/website/au.png mirror-tools/mirror-info/pics/website/br.png mirror-tools/mirror-info/pics/website/cdrom.png mirror-tools/mirror-info/pics/website/ch.png mirror-tools/mirror-info/pics/website/cn.png mirror-tools/mirror-info/pics/website/de.png mirror-tools/mirror-info/pics/website/fr.png mirror-tools/mirror-info/pics/website/it.png mirror-tools/mirror-info/pics/website/monitor.png mirror-tools/mirror-info/pics/website/nl.png mirror-tools/mirror-info/pics/website/si.png mirror-tools/mirror-info/pics/website/us.png mirror-tools/mirror-info/pics/website/vhosts.png
line diff
     1.1 --- a/mirror-tools/mirror-info/bin/makegraphs	Tue Mar 20 12:46:15 2012 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,311 +0,0 @@
     1.4 -#!/bin/sh
     1.5 -#*/5  * * * * /var/www/mirror-info/bin/makegraphs >/dev/null
     1.6 -
     1.7 -# RRD database directory
     1.8 -rrdlog="/var/spool/rrd"
     1.9 -
    1.10 -# Images directory
    1.11 -rrdgraph="/var/www/mirror-info/pics/rrd"
    1.12 -
    1.13 -# Colors
    1.14 -#rrdcolors="--color SHADEA#EAE9EE --color SHADEB#EAE9EE --color BACK#EAE9EE" 
    1.15 -rrdcolors="--color SHADEA#FFFFFF --color SHADEB#FFFFFF --color BACK#FFFFFF" 
    1.16 -rrdgraphargs="-aPNG -i -z --alt-y-grid -w 600 -h 100 -r $rrdcolors"
    1.17 -
    1.18 -[ -d $rrdlog ] || mkdir -p $rrdlog
    1.19 -[ -d $rrdgraph ] || mkdir -p $rrdgraph
    1.20 -
    1.21 -updatecpudata() {
    1.22 -	[ -e "$rrdlog/cpu.rrd" ] || rrdtool create $rrdlog/cpu.rrd --step=300 \
    1.23 -			DS:user:COUNTER:600:0:500000000 \
    1.24 -			DS:system:COUNTER:600:0:500000000 \
    1.25 -			DS:idle:COUNTER:600:0:500000000 \
    1.26 -			RRA:AVERAGE:0.5:1:576  RRA:AVERAGE:0.5:6:672 \
    1.27 -			RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460
    1.28 -	grep '^cpu' /proc/stat | while read cpu user nice system idle misc; do
    1.29 -		rrdtool update $rrdlog/cpu.rrd -t user:system:idle \
    1.30 -			N:$(( $user + $nice )):$system:$idle
    1.31 -		break
    1.32 -	done
    1.33 -
    1.34 -	[ -e "$rrdlog/cpu2.rrd" ] &&
    1.35 -	grep '^cpu' /proc/stat | while read cpu user nice system idle misc; do
    1.36 -		rrdtool update $rrdlog/cpu2.rrd -t nice:user:system:idle \
    1.37 -			N:$nice:$user:$system:$idle
    1.38 -		break
    1.39 -	done
    1.40 -}
    1.41 -
    1.42 -updatecpugraph() {
    1.43 -	period=$1
    1.44 -	info="$(grep '^model name' /proc/cpuinfo | cut -d: -f2 \
    1.45 -		| sed 's/ * / /g' | head -1)"
    1.46 -	rrdtool graph "$rrdgraph/cpu-$period.png" --start -1$period \
    1.47 -		$rrdgraphargs -l 0 -u 100 -t "cpu usage per $period [$info ]" \
    1.48 -		DEF:user=$rrdlog/cpu.rrd:user:AVERAGE \
    1.49 -		DEF:system=$rrdlog/cpu.rrd:system:AVERAGE \
    1.50 -		DEF:idle=$rrdlog/cpu.rrd:idle:AVERAGE \
    1.51 -		'CDEF:total=user,system,idle,+,+' \
    1.52 -		'CDEF:userpct=100,user,total,/,*' \
    1.53 -		'CDEF:systempct=100,system,total,/,*' \
    1.54 -		'CDEF:idlepct=100,idle,total,/,*' \
    1.55 -		'AREA:userpct#0000FF:user cpu usage' \
    1.56 -		'STACK:systempct#FF0000:system cpu usage' \
    1.57 -		'STACK:idlepct#00FF00:idle cpu usage\j'
    1.58 -}
    1.59 -
    1.60 -
    1.61 -updatememgraph() {
    1.62 -	period=$1
    1.63 -	info="$(free | awk '\
    1.64 -{ \
    1.65 -  if (/Mem:/) { \
    1.66 -	if ($2 < 10000) printf "%d KB",$2; \
    1.67 -	else if ($2 < 10000000) printf "%d MB",$2/1024; \
    1.68 -	else printf "%d GB",$2/1024/1024; \
    1.69 -  } \
    1.70 -}')"
    1.71 -	info2="$(free | awk '\
    1.72 -{ \
    1.73 -  if (/Swap:/) { \
    1.74 -	if ($2 < 10000) printf "%d KB",$2; \
    1.75 -	else if ($2 < 10000000) printf "%d MB",$2/1024; \
    1.76 -	else printf "%d GB",$2/1024/1024; \
    1.77 -  } \
    1.78 -}')"
    1.79 -	rrdtool graph "$rrdgraph/memory-$period.png" --start -1$period \
    1.80 -		$rrdgraphargs -l 0 -u 100 \
    1.81 -		-t "memory usage per $period [ $info + $info2 swap ]" \
    1.82 -		DEF:used=$rrdlog/mem.rrd:memused:AVERAGE \
    1.83 -		DEF:free=$rrdlog/mem.rrd:memfree:AVERAGE \
    1.84 -		DEF:shared=$rrdlog/mem.rrd:memshared:AVERAGE \
    1.85 -		DEF:buffer=$rrdlog/mem.rrd:membuffers:AVERAGE \
    1.86 -		DEF:cache=$rrdlog/mem.rrd:memcache:AVERAGE \
    1.87 -		DEF:swused=$rrdlog/mem.rrd:swapused:AVERAGE \
    1.88 -		DEF:swfree=$rrdlog/mem.rrd:swapfree:AVERAGE \
    1.89 -		'CDEF:total=used,free,+' \
    1.90 -		'CDEF:used2=used,buffer,cache,shared,+,+,-' \
    1.91 -		'CDEF:usedpct=100,used2,total,/,*' \
    1.92 -		'CDEF:sharedpct=100,shared,total,/,*' \
    1.93 -		'CDEF:bufferpct=100,buffer,total,/,*' \
    1.94 -		'CDEF:cachepct=100,cache,total,/,*' \
    1.95 -		'CDEF:freepct=100,free,total,/,*' \
    1.96 -		'CDEF:swtotal=swused,swfree,+' \
    1.97 -		'CDEF:swusedpct=100,swused,swtotal,/,*' \
    1.98 -		'AREA:usedpct#0000FF:used memory' \
    1.99 -		'STACK:sharedpct#FF7F00:shared memory' \
   1.100 -		'STACK:bufferpct#FF00FF:buffered memory' \
   1.101 -		'STACK:cachepct#FFFF00:cached memory' \
   1.102 -		'STACK:freepct#00FF00:free memory' \
   1.103 -		'LINE2:swusedpct#FF0000:used swap\j'
   1.104 -}
   1.105 -
   1.106 -updatememdata () {
   1.107 -	[ -e "$rrdlog/mem.rrd" ] ||
   1.108 -		rrdtool create "$rrdlog/mem.rrd" --step=300 \
   1.109 -			DS:memused:ABSOLUTE:600:0:5000000000 \
   1.110 -			DS:memfree:ABSOLUTE:600:0:5000000000 \
   1.111 -			DS:memshared:ABSOLUTE:600:0:5000000000 \
   1.112 -			DS:membuffers:ABSOLUTE:600:0:5000000000 \
   1.113 -			DS:memcache:ABSOLUTE:600:0:5000000000 \
   1.114 -			DS:swapused:ABSOLUTE:600:0:5000000000 \
   1.115 -			DS:swapfree:ABSOLUTE:600:0:5000000000 \
   1.116 -			RRA:AVERAGE:0.5:1:576  RRA:AVERAGE:0.5:6:672 \
   1.117 -			RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460
   1.118 -
   1.119 -	while read tag count unit; do
   1.120 -		case "$tag" in
   1.121 -		MemTotal:)  memtotal=$(($count * 1024));;
   1.122 -		MemFree:)   memfree=$(($count * 1024))
   1.123 -			    memused=$(($memtotal - $memfree))
   1.124 -			    memshared=0;;
   1.125 -		MemShared:) memshared=$(($count * 1024));;
   1.126 -		Buffers:)   membuffers=$(($count * 1024));;
   1.127 -		Cached:)    memcache=$(($count * 1024));;
   1.128 -		SwapTotal:) swaptotal=$(($count * 1024));;
   1.129 -		SwapFree:)  swapfree=$(($count * 1024))
   1.130 -			    swapused=$(( $swaptotal - $swapfree));;
   1.131 -		esac
   1.132 -	done < /proc/meminfo
   1.133 -
   1.134 -	rrdtool update "$rrdlog/mem.rrd" \
   1.135 -		-t memused:memfree:memshared:membuffers:memcache:swapused:swapfree \
   1.136 -		"N:$memused:$memfree:$memshared:$membuffers:$memcache:$swapused:$swapfree"
   1.137 -}
   1.138 -
   1.139 -getmax() {
   1.140 -	rrdtool fetch $rrdlog/$1.rrd AVERAGE | awk '\
   1.141 -BEGIN {max=0} \
   1.142 -/^[0-9]/ { \
   1.143 -   if ($2 != "nan" && $2 > max) max=$2; \
   1.144 -   if ($3 != "nan" && $3 > max) max=$3; \
   1.145 -} \
   1.146 -END { print max }' | sed 's/,/./'
   1.147 -}
   1.148 -
   1.149 -updatediskgraph() {
   1.150 -	period=$1
   1.151 -	[ "$period" == "day" ] && maxdisk="$(getmax disk)"
   1.152 -	info=""
   1.153 -	[ -r $2 ] &&
   1.154 -	info="[ $(fdisk -l 2> /dev/null | grep "^Disk $2:" | \
   1.155 -		  sed "s|Disk $2: \(.*\), .*|\1|") ]"
   1.156 -	if [ -e /sys/block/${2#/dev/}/device/iodone_cnt ]; then
   1.157 -#		--right-axis-label "I/O state %"
   1.158 -	rrdtool graph "$rrdgraph/disk-$period.png" --start -1$period \
   1.159 -		$rrdgraphargs -t "disk access per $period $info" \
   1.160 -		--logarithmic --lower-limit 1 -v "Sectors/second" --units=si \
   1.161 -		DEF:read=$rrdlog/disk.rrd:readsect:AVERAGE \
   1.162 -		DEF:write=$rrdlog/disk.rrd:writesect:AVERAGE \
   1.163 -		DEF:req=$rrdlog/iodisk.rrd:req:AVERAGE \
   1.164 -		DEF:done=$rrdlog/iodisk.rrd:done:AVERAGE \
   1.165 -		DEF:err=$rrdlog/iodisk.rrd:err:AVERAGE \
   1.166 -		"CDEF:readpct=100,read,$maxdisk,/,*" \
   1.167 -		"CDEF:writepct=100,write,$maxdisk,/,*" \
   1.168 -		"CDEF:errpct=100,err,req,/,*" \
   1.169 -		"CDEF:donepct=100,done,req,/,*" \
   1.170 -		'AREA:readpct#0000FF:sectors read from disk' \
   1.171 -		'STACK:writepct#00FF00:sectors written to disk' \
   1.172 -		'LINE2:donepct#FFFF00:I/O complete' \
   1.173 -		'LINE2:errpct#FF0000:I/O error\j'
   1.174 -	else
   1.175 -	rrdtool graph "$rrdgraph/disk-$period.png" --start -1$period \
   1.176 -		$rrdgraphargs -t "disk access per $period $info" \
   1.177 -		--logarithmic --lower-limit 1 -v "Sectors/second" --units=si \
   1.178 -		DEF:read=$rrdlog/disk.rrd:readsect:AVERAGE \
   1.179 -		DEF:write=$rrdlog/disk.rrd:writesect:AVERAGE \
   1.180 -		"CDEF:readpct=100,read,$maxdisk,/,*" \
   1.181 -		"CDEF:writepct=100,write,$maxdisk,/,*" \
   1.182 -		'AREA:readpct#0000FF:sectors read from disk' \
   1.183 -		'STACK:writepct#00FF00:sectors written to disk'
   1.184 -	fi
   1.185 -}
   1.186 -
   1.187 -updatediskdata() {
   1.188 -	dev=$1
   1.189 -	[ -e "$rrdlog/disk.rrd" ] ||
   1.190 -		rrdtool create "$rrdlog/disk.rrd" --step=300 \
   1.191 -			DS:readsect:COUNTER:600:0:5000000000 \
   1.192 -			DS:writesect:COUNTER:600:0:5000000000 \
   1.193 -			RRA:AVERAGE:0.5:1:576  RRA:AVERAGE:0.5:6:672 \
   1.194 -			RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460
   1.195 -	[ -e "$rrdlog/iodisk.rrd" ] ||
   1.196 -		rrdtool create "$rrdlog/iodisk.rrd" --step=300 \
   1.197 -			DS:done:GAUGE:600:0:U  DS:err:GAUGE:600:0:U \
   1.198 -			DS:req:GAUGE:600:0:U \
   1.199 -			RRA:AVERAGE:0.5:1:576  RRA:AVERAGE:0.5:6:672 \
   1.200 -			RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460
   1.201 -
   1.202 -	while read major minor name readreq readsect writereq writesect misc; do
   1.203 -		[ $major = $(( 0x$(stat -c %t $dev) )) ] || continue
   1.204 -		[ $minor = $(( 0x$(stat -c %T $dev) )) ] || continue
   1.205 -		rrdtool update "$rrdlog/disk.rrd" -t readsect:writesect \
   1.206 -			N:$readsect:$writesect
   1.207 -	done < /proc/diskstats
   1.208 -	disk=${dev:0:8}
   1.209 -	dir=/sys/block/${disk#/dev/}/device
   1.210 -	done=$(printf "%d\n" $(cat $dir/iodone_cnt 2> /dev/null) )
   1.211 -	err=$(printf "%d\n" $(cat $dir/ioerr_cnt 2> /dev/null) )
   1.212 -	req=$(printf "%d\n" $(cat $dir/iorequest_cnt 2> /dev/null) )
   1.213 -	rrdtool update "$rrdlog/iodisk.rrd" -t done:err:req N:$done:$err:$req
   1.214 -}
   1.215 -
   1.216 -updateifgraph() {
   1.217 -	interface=$1
   1.218 -	period=$2
   1.219 -	rrdtool graph "$rrdgraph/$interface-$period.png" --start -1$period \
   1.220 -		$rrdgraphargs -t "traffic on $interface graph per $period" \
   1.221 -		--logarithmic -A -v "Bytes/second" --units=si \
   1.222 -		DEF:incoming=$rrdlog/$interface.rrd:incoming:AVERAGE \
   1.223 -		DEF:outgoing=$rrdlog/$interface.rrd:outgoing:AVERAGE \
   1.224 -		'AREA:incoming#00FF00:incoming traffic' \
   1.225 -		'LINE1:outgoing#0000FF:outgoing traffic\j'
   1.226 -}
   1.227 -
   1.228 -netframes() {
   1.229 -ifconfig $1 | grep "$2 packets" | sed -re "s/.*$3:([0-9]+).*/\1/g"
   1.230 -}
   1.231 -
   1.232 -netstats() {
   1.233 -ifconfig $1 | grep bytes | sed -re "s/.*$2 bytes:([0-9]+).*/\1/g"
   1.234 -}
   1.235 -
   1.236 -updateifdata() {
   1.237 -	interface=$1
   1.238 -	[ -e "$rrdlog/$interface.rrd" ] ||
   1.239 -		rrdtool create "$rrdlog/$interface.rrd" --step=300 \
   1.240 -			DS:incoming:COUNTER:600:0:U \
   1.241 -			DS:outgoing:COUNTER:600:0:U \
   1.242 -			RRA:AVERAGE:0.5:1:576  RRA:AVERAGE:0.5:6:672 \
   1.243 -			RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460
   1.244 -	[ -e "$rrdlog/packets-$interface.rrd" ] ||
   1.245 -		rrdtool create "$rrdlog/packets-$interface.rrd" --step=300 \
   1.246 -			DS:in:COUNTER:600:0:U      DS:out:COUNTER:600:0:U \
   1.247 -			DS:inerr:COUNTER:600:0:U   DS:outerr:COUNTER:600:0:U \
   1.248 -			DS:indrop:COUNTER:600:0:U  DS:outdrop:COUNTER:600:0:U \
   1.249 -			DS:inov:COUNTER:600:0:U    DS:outov:COUNTER:600:0:U \
   1.250 -			DS:frame:COUNTER:600:0:U   DS:carrier:COUNTER:600:0:U \
   1.251 -			RRA:AVERAGE:0.5:1:576  RRA:AVERAGE:0.5:6:672 \
   1.252 -			RRA:AVERAGE:0.5:24:732 RRA:AVERAGE:0.5:144:1460
   1.253 -	rx=$(netstats $interface RX)
   1.254 -	tx=$(netstats $interface TX)
   1.255 -	rrdtool update "$rrdlog/$interface.rrd" -t incoming:outgoing \
   1.256 -		N:${rx:-U}:${tx:-U}
   1.257 -	rx=$(netframes $interface RX packets)
   1.258 -	tx=$(netframes $interface TX packets)
   1.259 -	rxerr=$(netframes $interface RX errors)
   1.260 -	txerr=$(netframes $interface TX errors)
   1.261 -	rxdrop=$(netframes $interface RX dropped)
   1.262 -	txdrop=$(netframes $interface TX dropped)
   1.263 -	rxov=$(netframes $interface RX overruns)
   1.264 -	txov=$(netframes $interface TX overruns)
   1.265 -	frame=$(netframes $interface RX frame)
   1.266 -	carrier=$(netframes $interface TX carrier)
   1.267 -	rrdtool update "$rrdlog/packets-$interface.rrd" \
   1.268 -		-t in:out:inerr:outerr:indrop:outdrop:inov:outov:frame:carrier \
   1.269 -		N:${rx:-U}:${tx:-U}:${rxerr:-U}:${txerr:-U}:${rxdrop:-U}:${txdrop:-U}:${rxov:-U}:${txov:-U}:${frame:-U}:${carrier:-U}
   1.270 -}
   1.271 -
   1.272 -getdisk()
   1.273 -{
   1.274 -	local d
   1.275 -	local i
   1.276 -	d=$(stat -c %04D $1)
   1.277 -	for i in /dev/* ; do 
   1.278 -		[ $(stat -c "%02t%02T" $i) == $d ] || continue
   1.279 -		echo $i
   1.280 -		break
   1.281 -	done
   1.282 -}
   1.283 -
   1.284 -###
   1.285 -### System graphs
   1.286 -###
   1.287 -
   1.288 -updatecpudata
   1.289 -updatecpugraph day
   1.290 -updatecpugraph week
   1.291 -updatecpugraph month
   1.292 -updatecpugraph year
   1.293 -
   1.294 -updatememdata
   1.295 -updatememgraph day
   1.296 -updatememgraph week
   1.297 -updatememgraph month
   1.298 -updatememgraph year
   1.299 -
   1.300 -if [ -e /proc/diskstats ]; then
   1.301 -	disk=$(getdisk $0)
   1.302 -	updatediskdata $disk
   1.303 -	updatediskgraph day ${disk:0:8}
   1.304 -	updatediskgraph week ${disk:0:8}
   1.305 -	updatediskgraph month ${disk:0:8}
   1.306 -	updatediskgraph year ${disk:0:8}
   1.307 -fi
   1.308 -
   1.309 -iface=$(/sbin/route -n | awk '{ if (/^0.0.0.0/) print $8 }')
   1.310 -updateifdata $iface
   1.311 -updateifgraph $iface day
   1.312 -updateifgraph $iface week
   1.313 -updateifgraph $iface month
   1.314 -updateifgraph $iface year
     2.1 --- a/mirror-tools/mirror-info/graphs.php	Tue Mar 20 12:46:15 2012 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,145 +0,0 @@
     2.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     2.5 -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     2.6 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     2.7 -<head>
     2.8 -	<title>Mirror RRD stats</title>
     2.9 -	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    2.10 -	<meta name="description" content="slitaz mirror rrdtool graphs" />
    2.11 -	<meta name="robots" content="noindex" />
    2.12 -	<meta name="author" content="SliTaz Contributors" />
    2.13 -	<link rel="shortcut icon" href="/css/favicon.ico" />
    2.14 -	<link rel="stylesheet" type="text/css" href="/css/slitaz.css" />
    2.15 -	<style type="text/css">
    2.16 -#copy {
    2.17 -	text-align: center;
    2.18 -}
    2.19 -
    2.20 -#bottom {
    2.21 -	text-align: center;
    2.22 -}
    2.23 -	</style>
    2.24 -</head>
    2.25 -<body>
    2.26 -
    2.27 -<!-- Header -->
    2.28 -<div id="header">
    2.29 -	<div id="logo"></div>
    2.30 -	<div id="network">
    2.31 -		<a href="http://www.slitaz.org/">
    2.32 -		<img src="/css/pics/network.png" alt="network.png" /></a>
    2.33 -		<a href="http://scn.slitaz.org/">Community</a>
    2.34 -		<a href="http://doc.slitaz.org/" title="SliTaz Community Documentation">Doc</a>
    2.35 -		<a href="http://forum.slitaz.org/" title="Slitaz Forum">Forum</a>
    2.36 -		<a href="http://bugs.slitaz.org/" title="Bug Tracking System">Bugs</a>
    2.37 -		<a href="http://hg.slitaz.org/" title="SliTaz repositories">Hg</a>
    2.38 -	</div>
    2.39 -	<h1><a href="http://<?php echo $_SERVER["HTTP_HOST"]; ?>/">SliTaz 
    2.40 -	<?php $host=preg_replace('/(\w+).*/i','$1',$_SERVER["HTTP_HOST"]); echo $host; ?></a></h1>
    2.41 -</div>
    2.42 -
    2.43 -<!-- Block -->
    2.44 -<div id="block">
    2.45 -	<!-- Navigation -->
    2.46 -	<div id="block_nav">
    2.47 -		<h4><img src="/css/pics/development.png" alt="development.png" />Developers Corner</h4>
    2.48 -		<ul>
    2.49 -			<li><a href="http://www.slitaz.org/en/devel/">Website devel</a></li>
    2.50 -			<li><a href="http://scn.slitaz.org/">Community</a></li>
    2.51 -			<li><a href="http://labs.slitaz.org/">Laboratories</a></li>
    2.52 -			<li><a href="http://hg.slitaz.org/">Mercurial Repos</a></li>
    2.53 -			<li><a href="http://cook.slitaz.org/">Build Bot</a></li>
    2.54 -			<li><a href="http://tank.slitaz.org/">Tank Server</a></li>
    2.55 -			<li><a href="http://mirror.slitaz.org/info/">Mirror Server</a></li>
    2.56 -		</ul>
    2.57 -	</div>
    2.58 -	<!-- Information/image -->
    2.59 -	<div id="block_info">
    2.60 -	<h4>Codename: <?php echo $host; ?></h4>
    2.61 -		<p>
    2.62 -			This is the SliTaz GNU/Linux main mirror. The server runs naturally SliTaz 
    2.63 -			(stable) in an lguest virtual machine provided by 
    2.64 -			<a href="http://www.ads-lu.com/">Allied Data Sys. (ADS)</a>.
    2.65 -		</p>
    2.66 -		<p>
    2.67 -			Mirror CPU is a <?php system("sed -e '/^model name/!d;s/.*Intel(R) //;" .         
    2.68 -			"s/@//;s/(.*)//;s/CPU //;s/.*AMD //;s/.*: //;s/Processor //' </proc/cpuinfo |" .
    2.69 -			" awk '{ s=$0; n++ } END { if (n == 2) printf \"dual \";" .
    2.70 -			"if (n == 4) printf \"quad \"; print s }' ")?> -
    2.71 -			<?php system("free | awk '/Mem:/ { x=2*$2-1; while (x >= 1024) { x /= 1024; ".
    2.72 -			"n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ".
    2.73 -			"printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?> - Located in France next to 
    2.74 -			Roubaix. This page has real time statistics provided by PHP 
    2.75 -			<code>system()</code> Mirror is also monitored by RRDtool which provides 
    2.76 -			<a href="graphs.php">graphical stats</a>.
    2.77 -		</p>
    2.78 -	</div>
    2.79 -</div>
    2.80 -
    2.81 -<!-- Content -->
    2.82 -<div id="content">
    2.83 -
    2.84 -<?php
    2.85 -
    2.86 -$myurl="http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
    2.87 -
    2.88 -function one_graphic($img,$name)
    2.89 -{
    2.90 -	echo '<img src="pics/rrd/'.$img.'" title="'.
    2.91 -		$name.'" alt="'.$name.'" />'."\n";
    2.92 -}
    2.93 -
    2.94 -function graphic($res, $img='')
    2.95 -{
    2.96 -	global $myurl;
    2.97 -	if (!$img) $img=$res;
    2.98 -	echo "<a name=\"".$res."\"></a>";
    2.99 -	echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
   2.100 -	one_graphic($img."-day.png",$res." daily");
   2.101 -	echo "</a>";
   2.102 -	if ($_GET['stats'] == $res) {
   2.103 -		one_graphic($img."-week.png",$res." weekly");
   2.104 -		one_graphic($img."-month.png",$res." monthly");
   2.105 -		one_graphic($img."-year.png",$res." yearly");
   2.106 -	}
   2.107 -}
   2.108 -
   2.109 -echo "<h2>CPU</h2>\n";
   2.110 -graphic("cpu");
   2.111 -echo "<h2>Memory</h2>\n";
   2.112 -graphic("memory");
   2.113 -echo "<h2>Disk</h2>\n";
   2.114 -graphic("disk");
   2.115 -echo "<h2>Network</h2>\n";
   2.116 -$eth = array();
   2.117 -exec("/sbin/route -n | awk '{ if (/^0.0.0.0/) print $8 }'", $eth);
   2.118 -graphic("net",$eth[0]);
   2.119 -
   2.120 -?>
   2.121 -
   2.122 -<!-- End of content -->
   2.123 -</div>
   2.124 -
   2.125 -<!-- Start of footer and copy notice -->
   2.126 -<div id="copy">
   2.127 -<p>                                                                          
   2.128 -Last update : <?php echo date('r'); ?>
   2.129 -</p> 
   2.130 -<p>
   2.131 -Copyright &copy; <?php echo date('Y'); ?> <a href="http://www.slitaz.org/">SliTaz</a> -
   2.132 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   2.133 -</p>
   2.134 -<!-- End of copy -->
   2.135 -</div>
   2.136 -
   2.137 -<!-- Bottom and logo's -->
   2.138 -<div id="bottom">
   2.139 -<p>
   2.140 -<a href="http://validator.w3.org/check?uri=referer"><img
   2.141 -   src="/css/pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   2.142 -   title="Code validé XHTML 1.0"
   2.143 -   style="width: 80px; height: 15px;" /></a>
   2.144 -</p>
   2.145 -</div>
   2.146 -
   2.147 -</body>
   2.148 -</html>
     3.1 --- a/mirror-tools/mirror-info/index.php	Tue Mar 20 12:46:15 2012 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,375 +0,0 @@
     3.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     3.5 -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3.6 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     3.7 -<head>
     3.8 -	<title>SliTaz Mirror</title>
     3.9 -	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    3.10 -	<meta name="description" content="slitaz mirror server" />
    3.11 -	<meta name="robots" content="index, nofollow" />
    3.12 -	<meta name="author" content="SliTaz Contributors" />
    3.13 -	<link rel="shortcut icon" href="/css/favicon.ico" />
    3.14 -	<link rel="stylesheet" type="text/css" href="/css/slitaz.css" />
    3.15 -	<style type="text/css">
    3.16 -#copy {
    3.17 -	text-align: center;
    3.18 -}
    3.19 -
    3.20 -#bottom {
    3.21 -	text-align: center;
    3.22 -}
    3.23 -	</style>
    3.24 -</head>
    3.25 -<body>
    3.26 -
    3.27 -<!-- Header -->
    3.28 -<div id="header">
    3.29 -	<div id="logo"></div>
    3.30 -	<div id="network">
    3.31 -		<a href="http://www.slitaz.org/">
    3.32 -		<img src="/css/pics/network.png" alt="network.png" /></a>
    3.33 -		<a href="http://scn.slitaz.org/">Community</a>
    3.34 -		<a href="http://doc.slitaz.org/" title="SliTaz Community Documentation">Doc</a>
    3.35 -		<a href="http://forum.slitaz.org/" title="Slitaz Forum">Forum</a>
    3.36 -		<a href="http://bugs.slitaz.org/" title="Bug Tracking System">Bugs</a>
    3.37 -		<a href="http://hg.slitaz.org/" title="SliTaz repositories">Hg</a>
    3.38 -	</div>
    3.39 -	<h1><a href="http://<?php echo $_SERVER["HTTP_HOST"]; ?>/">SliTaz 
    3.40 -	<?php $host=preg_replace('/(\w+).*/i','$1',$_SERVER["HTTP_HOST"]); echo $host; ?></a></h1>
    3.41 -</div>
    3.42 -
    3.43 -<!-- Block -->
    3.44 -<div id="block">
    3.45 -	<!-- Navigation -->
    3.46 -	<div id="block_nav">
    3.47 -		<h4><img src="/css/pics/development.png" alt="development.png" />Developers Corner</h4>
    3.48 -		<ul>
    3.49 -			<li><a href="http://www.slitaz.org/en/devel/">Website devel</a></li>
    3.50 -			<li><a href="http://scn.slitaz.org/">Community</a></li>
    3.51 -			<li><a href="http://cook.slitaz.org/">Build Bot</a></li>
    3.52 -			<li><a href="http://tank.slitaz.org/">Tank Server</a></li>
    3.53 -			<li><a href="http://mirror.slitaz.org/info/">Mirror Server</a> -
    3.54 -			<a href="http://mirror.slitaz.org/console/">Console</a>
    3.55 -			</li>
    3.56 -		</ul>
    3.57 -	</div>
    3.58 -	<!-- Information/image -->
    3.59 -	<div id="block_info">
    3.60 -	<h4>Codename: <?php echo $host; ?></h4>
    3.61 -		<p>
    3.62 -			This is the SliTaz GNU/Linux main mirror. The server runs naturally SliTaz 
    3.63 -			(stable) in an lguest virtual machine provided by 
    3.64 -			<a href="http://www.ads-lu.com/">Allied Data Sys. (ADS)</a>.
    3.65 -		</p>
    3.66 -		<p>
    3.67 -			Mirror CPU is a <?php system("sed -e '/^model name/!d;s/.*Intel(R) //;" .         
    3.68 -			"s/@//;s/(.*)//;s/CPU //;s/.*AMD //;s/.*: //;s/Processor //' </proc/cpuinfo |" .
    3.69 -			" awk '{ s=$0; n++ } END { if (n == 2) printf \"dual \";" .
    3.70 -			"if (n == 4) printf \"quad \"; print s }' ")?> -
    3.71 -			<?php system("free | awk '/Mem:/ { x=2*$2-1; while (x >= 1024) { x /= 1024; ".
    3.72 -			"n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ".
    3.73 -			"printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?> - Located in France next to 
    3.74 -			Roubaix. This page has real time statistics provided by PHP 
    3.75 -			<code>system()</code> Mirror is also monitored by RRDtool which provides 
    3.76 -			<a href="graphs.php">graphical stats</a>.
    3.77 -		</p>
    3.78 -	</div>
    3.79 -</div>
    3.80 -
    3.81 -<!-- Content -->
    3.82 -<div id="content">
    3.83 -
    3.84 -<h2><a href="graphs.php"><img 
    3.85 -	style="vertical-align: middle; padding: 0 4px 0 0;"
    3.86 -	title="Mirror RRDtool graphs" alt="graphs"
    3.87 -    src="pics/website/monitor.png" /></a>System stats</h2>
    3.88 -
    3.89 -<h4>Uptime</h4>
    3.90 -
    3.91 -<pre class="package">
    3.92 -<?php
    3.93 -system("uptime | sed 's/^\s*//'");
    3.94 -?>
    3.95 -</pre>
    3.96 -
    3.97 -<h4>Disk usage</h4>
    3.98 -
    3.99 -<pre class="package">
   3.100 -<?php
   3.101 -system("df -h | sed '/^rootfs/d' | grep  '\(^/dev\|Filesystem\)'");
   3.102 -?>
   3.103 -</pre>
   3.104 -
   3.105 -<h4>Network</h4>
   3.106 -<pre class="package">
   3.107 -<?php
   3.108 -system("ifconfig eth0 | awk '{ if (/X packet/ || /X byte/) print }' | sed 's/^\s*//'");
   3.109 -?>
   3.110 -</pre>
   3.111 -
   3.112 -
   3.113 -<?php if (isset($_GET["all"])) { ?>
   3.114 -<h4>Logins</h4>
   3.115 -<pre class="package">
   3.116 -<?php
   3.117 -system("last");
   3.118 -?>
   3.119 -</pre>
   3.120 -
   3.121 -<h4>Processes</h4>
   3.122 -<pre class="package">
   3.123 -<?php
   3.124 -system("top -n1 -b");
   3.125 -?>
   3.126 -</pre>
   3.127 -<?php } ?>
   3.128 -
   3.129 -<a name="vhosts"></a>
   3.130 -<h3><a href="http://mirror.slitaz.org/awstats.pl?config=info.mirror.slitaz.org" target="_blank">
   3.131 -	<img title="Mirror Virtual hosts" alt="vhosts"
   3.132 -    src="pics/website/vhosts.png" /></a>Virtual hosts</h3>
   3.133 -
   3.134 -<ul>
   3.135 -	<li><a href="http://mirror.slitaz.org/">mirror.slitaz.org</a> - SliTaz Mirror.
   3.136 -	(<a href="http://mirror.slitaz.org/stats" target="_blank">stats</a>)</li>
   3.137 -	<li><a href="http://scn.slitaz.org/">scn.slitaz.org</a> - SliTaz Community Network.
   3.138 -	(<a href="http://mirror.slitaz.org/awstats.pl?config=scn.slitaz.org" target="_blank">stats</a>)</li>
   3.139 -	<li><a href="http://pizza.slitaz.org/">pizza.slitaz.org</a> - SliTaz Flavor builder.
   3.140 -	(<a href="http://mirror.slitaz.org/awstats.pl?config=pizza.mirror.slitaz.org" target="_blank">stats</a>)</li>
   3.141 -	<li><a href="http://tiny.slitaz.org/">tiny.slitaz.org</a> - Tiny SliTaz builder.
   3.142 -	(<a href="http://mirror.slitaz.org/awstats.pl?config=tiny.slitaz.org" target="_blank">stats</a>)</li>
   3.143 -	<li><a href="https://ajaxterm.slitaz.org/">ajaxterm.slitaz.org</a> - Slitaz Web Console.
   3.144 -	(<a href="http://mirror.slitaz.org/awstats.pl?config=ajaxterm.slitaz.org" target="_blank">stats</a>)</li>
   3.145 -</ul>
   3.146 -
   3.147 -<a name="replicas"></a>
   3.148 -<h3><a href="http://mirror.slitaz.org/awstats.pl?config=replicas.mirror.slitaz.org" target="_blank">
   3.149 -         <img title="Tank replicas" alt="replicas"
   3.150 -    src="pics/website/vhosts.png" /></a>Tank replicas</h3>
   3.151 -
   3.152 -<ul>
   3.153 -	<li><a href="http://mirror.slitaz.org/www/">www.slitaz.org</a> - SliTaz Website.
   3.154 -	(<a href="http://www.slitaz.org/" target="_blank">main</a>)</li>
   3.155 -	<li><a href="http://mirror.slitaz.org/doc/">doc.slitaz.org</a> - Documentation.
   3.156 -	(<a href="http://doc.slitaz.org/" target="_blank">main</a>)</li>
   3.157 -	<li><a href="http://mirror.slitaz.org/pkgs/">pkgs.slitaz.org</a> - Packages Web interface.
   3.158 -	(<a href="http://pkgs.slitaz.org/" target="_blank">main</a>)</li>
   3.159 -	<li><a href="http://mirror.slitaz.org/hg/">hg.slitaz.org</a> - Mercurial repositories (read only).
   3.160 -	(<a href="http://hg.slitaz.org/" target="_blank">main</a>
   3.161 -	<a href="http://hg.tuxfamily.org/mercurialroot/slitaz/" target="_blank">tuxfamily</a>)</li>
   3.162 -	<li><a href="http://mirror.slitaz.org/webboot/">boot.slitaz.org</a> - gPXE Web boot.
   3.163 -	(<a href="http://boot.slitaz.org/" target="_blank">main</a>)</li>
   3.164 -</ul>
   3.165 -
   3.166 -<a name="boot"></a>
   3.167 -<h3><a href="http://doc.slitaz.org/en:guides:pxe#web-booting" target="_blank">
   3.168 -	<img title="Web boot" src="pics/website/vhosts.png" 
   3.169 -	 alt="web boot" /></a>Web boot services</h3>
   3.170 -	 The SliTaz mirror provides a <b>tftp</b> access and a 
   3.171 -	 <a href="/pxe">pxe</a> tree. Simply add to your DHCP server configuration file:
   3.172 -	 <ul>
   3.173 -	 <li>for <b>udhcpd</b><!-- siaddr? sname? tftp? -->
   3.174 -	 <pre>
   3.175 -siaddr mirror.slitaz.org
   3.176 -boot_file gpxe.pxe</pre>
   3.177 -	 </li>
   3.178 -	 <li>for <b>dhcpd</b>
   3.179 -	 <pre>
   3.180 -next-server "mirror.slitaz.org"
   3.181 -filemane "gpxe.pxe"</pre>
   3.182 -	 </li>
   3.183 -	 <li>for <b>dnsmasq</b>
   3.184 -	 <pre>
   3.185 -dhcp-boot=gpxe.pxe,mirror.slitaz.org</pre>
   3.186 -	 </li>
   3.187 -	 </ul>
   3.188 -
   3.189 -<a name="mirrors"></a>
   3.190 -<h3><a href="http://mirror.slitaz.org/awstats.pl?config=rsync" target="_blank">
   3.191 -	<img title="Secondary mirrors" src="pics/website/vhosts.png" 
   3.192 -	 alt="mirrors" /></a>Mirrors</h3>
   3.193 -	Most mirrors are updated using the url: <b>rsync://mirror.slitaz.org/slitaz/</b>
   3.194 -	(<a href="http://mirror.slitaz.org/awstats.pl?config=rsync">stats</a>)
   3.195 -	<pre>
   3.196 -rsync -azH --delete rsync://mirror.slitaz.org/slitaz/ /local/slitaz/mirror/ </pre>
   3.197 -	New mirrors should be announced on the 
   3.198 -	<a href="http://www.slitaz.org/en/mailing-list.html">mailing list</a>.
   3.199 -<ul>
   3.200 -<?php
   3.201 -$output_url_file="";
   3.202 -$output_url_handler;
   3.203 -$mirrors_url_file="/tmp/mirrors";
   3.204 -
   3.205 -function test_url($link, $proto)
   3.206 -{
   3.207 -	global $output_url_file;
   3.208 -	global $mirrors_url_file;
   3.209 -	global $output_url_handler;
   3.210 -	
   3.211 -	if ($output_url_file != "") {
   3.212 -		switch($proto) {
   3.213 -		case "http" :
   3.214 -		case "ftp" :
   3.215 -			$cmd = "busybox wget -s $link/README" ;
   3.216 -			break;
   3.217 -		case "rsync" :
   3.218 -			$cmd = "rsync $link > /dev/null 2>&1" ;
   3.219 -			break;
   3.220 -		default :
   3.221 -			return FALSE;
   3.222 -		}
   3.223 -		if (shell_exec("$cmd && echo -n OK") == "OK") {
   3.224 -			fwrite($output_url_handler,$link."\n");
   3.225 -			return TRUE;
   3.226 -		} 
   3.227 -		return FALSE;
   3.228 -	}
   3.229 -	return shell_exec("grep -qs ^$link$ $mirrors_url_file && echo -n OK") == "OK"; 
   3.230 -}
   3.231 -
   3.232 -if (! file_exists($mirrors_url_file)) {
   3.233 -	$output_url_file = tempnam('/tmp','mkmirrors');
   3.234 -	$output_url_handler = fopen($output_url_file, "w");
   3.235 -	fwrite($output_url_handler,"http://mirror.slitaz.org/\n");
   3.236 -	fwrite($output_url_handler,"rsync://mirror.slitaz.org/\n");
   3.237 -}
   3.238 -
   3.239 -# Flags icons from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip
   3.240 -foreach (array(
   3.241 -	array(	"flag"  => "ch",
   3.242 -		"http"  => "http://mirror.switch.ch/ftp/mirror/slitaz/",
   3.243 -		"ftp"   => "ftp://mirror.switch.ch/mirror/slitaz/"),
   3.244 -	array(	"flag"  => "us",
   3.245 -		"http"  => "http://www.gtlib.gatech.edu/pub/slitaz/",
   3.246 -		"ftp"   => "ftp://ftp.gtlib.gatech.edu/pub/slitaz/",
   3.247 -		"rsync" => "rsync://www.gtlib.gatech.edu/slitaz/"),
   3.248 -	array(	"flag"  => "fr",
   3.249 -		"http"  => "http://download.tuxfamily.org/slitaz/",
   3.250 -		"ftp"   => "ftp://download.tuxfamily.org/slitaz/",
   3.251 -		"rsync" => "rsync://download.tuxfamily.org/pub/slitaz/"),
   3.252 -	array(	"flag"  => "fr",
   3.253 -		"http"  => "http://www.linuxembarque.com/slitaz/mirror/"),
   3.254 -	array(	"flag"  => "cn",
   3.255 -		"http"  => "http://mirror.lupaworld.com/slitaz/"),
   3.256 -	array(	"flag"  => "cn",
   3.257 -		"http"  => "http://ks.lupaworld.com/slitaz/"),
   3.258 -	array(	"flag"  => "br",
   3.259 -		"http"  => "http://slitaz.c3sl.ufpr.br/",
   3.260 -		"ftp"   => "ftp://slitaz.c3sl.ufpr.br/slitaz/",
   3.261 -		"rsync" => "rsync://slitaz.c3sl.ufpr.br/slitaz/"),
   3.262 -	array(	"flag"  => "it",
   3.263 -		"http"  => "http://slitaz.mirror.garr.it/mirrors/slitaz/",
   3.264 -		"ftp"   => "ftp://slitaz.mirror.garr.it/mirrors/slitaz/",
   3.265 -		"rsync" => "rsync://slitaz.mirror.garr.it/mirrors/slitaz/"),
   3.266 -	array(	"flag"  => "si",
   3.267 -		"http"  => "http://mirror.drustvo-dns.si/slitaz/"),
   3.268 -	array(	"flag"  => "si",
   3.269 -		"ftp"   => "ftp://ftp.pina.si/slitaz/"),
   3.270 -	array(	"flag"  => "us",
   3.271 -		"http"  => "http://distro.ibiblio.org/pub/linux/distributions/slitaz/",
   3.272 -		"ftp"   => "ftp://distro.ibiblio.org/pub/linux/distributions/slitaz/"),
   3.273 -	array(	"flag"  => "nl",
   3.274 -		"http"  => "http://ftp.vim.org/ftp/os/Linux/distr/slitaz/",
   3.275 -		"ftp"   => "ftp://ftp.vim.org/mirror/os/Linux/distr/slitaz/"),
   3.276 -	array(	"flag"  => "nl",
   3.277 -		"http"  => "http://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/",
   3.278 -		"ftp"   => "ftp://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/"),
   3.279 -	array(	"flag"  => "ch",
   3.280 -		"http"  => "http://ftp.ch.xemacs.org/ftp/pool/2/mirror/slitaz/",
   3.281 -		"ftp"   => "ftp://ftp.ch.xemacs.org//pool/2/mirror/slitaz/"),
   3.282 -	array(	"flag"  => "de",
   3.283 -		"http"  => "http://ftp.uni-stuttgart.de/slitaz/",
   3.284 -		"ftp"   => "ftp://ftp.uni-stuttgart.de/slitaz/"),
   3.285 -	array(	"flag"  => "au",
   3.286 -		"http"  => "http://mirror.iprimus.com/slitaz/"),
   3.287 -	array(	"flag"  => "au",
   3.288 -		"http"  => "http://mirror01.ipgn.com.au/slitaz/"),
   3.289 -	array(	"flag"  => "us",
   3.290 -		"http"  => "http://mirror.clarkson.edu/slitaz/",
   3.291 -		"rsync" => "rsync://mirror.clarkson.edu/slitaz/")) as $mirror) {
   3.292 -	$flag = "pics/website/".$mirror["flag"].".png";
   3.293 -	$head = TRUE;
   3.294 -	foreach(array("http", "ftp", "rsync") as $proto) {
   3.295 -		if (!isset($mirror[$proto])) continue;
   3.296 -		$link = $mirror[$proto];
   3.297 -		if (!test_url($link, $proto)) continue;
   3.298 -		$serveur = parse_url($link, PHP_URL_HOST);
   3.299 -		if ($head) echo <<<EOT
   3.300 -	<li><a href="http://en.utrace.de/?query=$serveur">
   3.301 -		<img title="map" src="$flag" alt="map" /></a>
   3.302 -		<a href="$link">$link</a>
   3.303 -EOT;
   3.304 -		else echo <<<EOT
   3.305 -		or <a href="$link">$proto</a>
   3.306 -EOT;
   3.307 -		$head = FALSE;
   3.308 -	}
   3.309 -	if ($head) continue;
   3.310 -	echo "	</li>\n";
   3.311 -}
   3.312 -
   3.313 -if ($output_url_file != "") {
   3.314 -	fclose($output_url_handler);
   3.315 -	rename($output_url_file, $mirrors_url_file);
   3.316 -	chmod($mirrors_url_file, 0644);
   3.317 -}
   3.318 -
   3.319 -?>
   3.320 -</ul>
   3.321 -
   3.322 -<a name="builds"></a>
   3.323 -<h3><img title="Daily builds" src="pics/website/cdrom.png" alt="builds" 
   3.324 -     width="25" height="25" />
   3.325 -    Daily builds</h3>
   3.326 -
   3.327 -<?php
   3.328 -function display_log($file,$anchor,$url)
   3.329 -{
   3.330 -echo '<a name="'.$anchor.'"></a>';
   3.331 -echo "<h4><a href=\"$url\">";
   3.332 -system("stat -c '%y %n' ".$file." | sed 's/.000000000//;s|/var/log/\(.*\).log|\\1.iso|'");
   3.333 -echo "</a></h4>";
   3.334 -echo "<pre>";
   3.335 -$sed_script="s/.\[[0-9][^mG]*.//g";
   3.336 -$sed_script.=";:a;s/^\(.\{1,68\}\)\(\[ [A-Za-z]* \]\)/\\1 \\2/;ta";
   3.337 -$sed_script.=";s#\[ OK \]#[ <span style=\"color:green\">OK</span> ]#";
   3.338 -$sed_script.=";s#\[ Failed \]#[ <span style=\"color:red\">Failed</span> ]#";
   3.339 -system("sed '".$sed_script."' < $file");
   3.340 -echo "</pre>";
   3.341 -}
   3.342 -
   3.343 -display_log("/var/log/packages-stable.log", "buildstable", "/iso/stable/packages-3.0.iso");
   3.344 -display_log("/var/log/packages-cooking.log","buildcooking","/iso/cooking/packages-cooking.iso");
   3.345 -?>
   3.346 -
   3.347 -<!-- End of content -->
   3.348 -</div>
   3.349 -
   3.350 -<div id="content_bottom">
   3.351 -<div class="bottom_left"></div>
   3.352 -<div class="bottom_right"></div>
   3.353 -</div>
   3.354 -
   3.355 -<!-- Start of footer and copy notice -->
   3.356 -<div id="copy">
   3.357 -<p>                                                                          
   3.358 -Last update : <?php echo date('r'); ?>
   3.359 -</p> 
   3.360 -<p>
   3.361 -Copyright &copy; <?php echo date('Y'); ?> <a href="http://www.slitaz.org/">SliTaz</a> -
   3.362 -<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   3.363 -</p>
   3.364 -<!-- End of copy -->
   3.365 -</div>
   3.366 -
   3.367 -<!-- Bottom and logo's -->
   3.368 -<div id="bottom">
   3.369 -<p>
   3.370 -<a href="http://validator.w3.org/check?uri=referer"><img
   3.371 -   src="/css/pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   3.372 -   title="Code validé XHTML 1.0"
   3.373 -   style="width: 80px; height: 15px;" /></a>
   3.374 -</p>
   3.375 -</div>
   3.376 -
   3.377 -</body>
   3.378 -</html>
     4.1 Binary file mirror-tools/mirror-info/pics/website/au.png has changed
     5.1 Binary file mirror-tools/mirror-info/pics/website/br.png has changed
     6.1 Binary file mirror-tools/mirror-info/pics/website/cdrom.png has changed
     7.1 Binary file mirror-tools/mirror-info/pics/website/ch.png has changed
     8.1 Binary file mirror-tools/mirror-info/pics/website/cn.png has changed
     9.1 Binary file mirror-tools/mirror-info/pics/website/de.png has changed
    10.1 Binary file mirror-tools/mirror-info/pics/website/fr.png has changed
    11.1 Binary file mirror-tools/mirror-info/pics/website/it.png has changed
    12.1 Binary file mirror-tools/mirror-info/pics/website/monitor.png has changed
    13.1 Binary file mirror-tools/mirror-info/pics/website/nl.png has changed
    14.1 Binary file mirror-tools/mirror-info/pics/website/si.png has changed
    15.1 Binary file mirror-tools/mirror-info/pics/website/us.png has changed
    16.1 Binary file mirror-tools/mirror-info/pics/website/vhosts.png has changed