wok-stable view mirror-tools/stuff/var/www/mirror-info/graphs.php @ rev 6076

mirror-tools: add mirror-info web page
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 28 18:05:48 2010 +0200 (2010-08-28)
parents
children
line source
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>Mirror RRD stats</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="slitaz mirror rrdtool graphs" />
8 <meta name="robots" content="noindex" />
9 <meta name="author" content="SliTaz Contributors" />
10 <link rel="shortcut icon" href="favicon.ico" />
11 <link rel="stylesheet" type="text/css" href="slitaz.css" />
12 </head>
14 <body bgcolor="#ffffff">
15 <!-- Header -->
16 <div id="header">
17 <a name="top"></a>
18 <a href="http://mirror.slitaz.org/"><img id="logo"
19 src="pics/website/logo.png" title="mirror.slitaz.org" alt="mirror.slitaz.org"
20 style="border: 0px solid ; width: 200px; height: 74px;" /></a>
21 <p id="titre">#!/project/mirror</p>
22 </div>
23 <!-- Navigation menu -->
24 <div id="nav">
26 <div class="nav_box">
27 <h4>About Mirror</h4>
28 <p>
29 This is the SliTaz GNU/Linux main mirror. The server runs naturally SliTaz
30 (stable) in an lguest virtual machine provided by
31 <a href="http://www.ads-lu.com/">ADS</a>.
32 </p>
34 </div>
36 <div class="nav_box">
37 <h4>SliTaz Network</h4>
38 <ul>
39 <li><a href="http://www.slitaz.org/">Main Website</a></li>
40 <li><a href="http://forum.slitaz.org/">Community Forum</a></li>
41 <li><a href="http://community.slitaz.org/">Community Platform</a></li>
42 <li><a href="http://labs.slitaz.org/">SliTaz Laboratories</a></li>
43 <li><a href="http://pkgs.slitaz.org/">Packages Database</a></li>
44 <li><a href="http://boot.slitaz.org/">SliTaz Web Boot</a></li>
45 <li><a href="http://tank.slitaz.org/">SliTaz main server</a></li>
46 <li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
47 <li><a href="http://www.distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
48 </ul>
49 </div>
51 <!-- End navigation menu -->
52 </div>
54 <!-- Content top. -->
55 <div id="content_top">
56 <div class="top_left"></div>
57 <div class="top_right"></div>
58 </div>
60 <!-- Content -->
61 <div id="content">
63 <h1><font color="#3E1220">Mirror RRD stats</font></h1>
64 <h2><font color="#DF8F06">/usr/bin/rrdtool</font></h2>
66 <?php
68 $myurl="http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
70 function one_graphic($img,$name)
71 {
72 echo '<img src="pics/rrd/'.$img.'" title="'.
73 $name.'" alt="'.$name.'" />'."\n";
74 }
76 function graphic($res, $img='')
77 {
78 global $myurl;
79 if (!$img) $img=$res;
80 echo "<a name=\"".$res."\"></a>";
81 echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
82 one_graphic($img."-day.png",$res." daily");
83 echo "</a>";
84 if (isset($_GET['stats']) && $_GET['stats'] == $res) {
85 one_graphic($img."-week.png",$res." weekly");
86 one_graphic($img."-month.png",$res." monthly");
87 one_graphic($img."-year.png",$res." yearly");
88 }
89 }
91 echo "<h3>CPU</h3>\n";
92 graphic("cpu");
93 echo "<h3>Memory</h3>\n";
94 graphic("memory");
95 echo "<h3>Disk</h3>\n";
96 graphic("disk");
97 echo "<h3>Network</h3>\n";
98 graphic("net","eth0");
100 ?>
102 <!-- End of content with round corner -->
103 </div>
104 <div id="content_bottom">
105 <div class="bottom_left"></div>
106 <div class="bottom_right"></div>
107 </div>
109 <!-- Start of footer and copy notice -->
110 <div id="copy">
111 <p>
112 Last update : <?php echo date('r'); ?>
113 </p>
114 <p>
115 Copyright &copy; <?php echo date('Y'); ?> <a href="http://www.slitaz.org/">SliTaz</a> -
116 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
117 </p>
118 <!-- End of copy -->
119 </div>
121 <!-- Bottom and logo's -->
122 <div id="bottom">
123 <p>
124 <a href="http://validator.w3.org/check?uri=referer"><img
125 src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
126 title="Code validé XHTML 1.0"
127 style="width: 80px; height: 15px;" /></a>
128 </p>
129 </div>
131 </body>
132 </html>