slitaz-forge view tank/web/graphs.php @ rev 12

Add tank/web folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Feb 23 22:16:38 2011 +0000 (2011-02-23)
parents
children 08ebcbf62731
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>Tank RRD stats</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="slitaz tank 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>
13 <body>
15 <!-- Header -->
16 <div id="header">
17 <a href="http://tank.slitaz.org/"><img id="logo"
18 src="pics/website/logo.png"
19 title="tank.slitaz.org" alt="tank.slitaz.org" /></a>
20 <p id="titre">#!/Tank</p>
21 </div>
23 <!-- Content -->
24 <div id="content-full">
26 <!-- Block begin -->
27 <div class="block">
28 <!-- Nav block begin -->
29 <div id="block_nav">
30 <h3><img src="pics/website/development.png" alt="png" />Devel corner</h3>
31 <ul>
32 <li><a href="http://www.slitaz.org/en/devel/">Website/devel</a></li>
33 <li><a href="http://labs.slitaz.org/">Laboratories</a></li>
34 <li><a href="http://hg.slitaz.org/">Mercurial Repos</a></li>
35 <li><a href="http://bb.slitaz.org/">Build Bot</a></li>
36 <li><a href="http://scn.slitaz.org/">Community Network</a></li>
37 <li><a href="http://people.slitaz.org/">SliTaz People</a></li>
38 </ul>
39 <!-- Nav block end -->
40 </div>
41 <!-- Top block begin -->
42 <div id="block_top">
43 <h1>Tank RRD stats</h1>
44 <p>
45 This is the SliTaz GNU/Linux main server and build host. The server runs
46 naturally SliTaz (stable) and provides some services to all contributors
47 such as: secure access, disk space, a public directory, cron jobs and the
48 <a href="http://bb.slitaz.org/">Build Bot</a>.
49 </p>
50 <!-- Top block end -->
51 </div>
52 <!-- Block end -->
53 </div>
55 <?php
57 $myurl="http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
59 function one_graphic($img,$name)
60 {
61 echo '<img src="pics/rrd/'.$img.'" title="'.
62 $name.'" alt="'.$name.'" />'."\n";
63 }
65 function graphic($res, $img='')
66 {
67 global $myurl;
68 if (!$img) $img=$res;
69 echo "<a name=\"".$res."\"></a>";
70 echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
71 one_graphic($img."-day.png",$res." daily");
72 echo "</a>";
73 if ($_GET['stats'] == $res) {
74 one_graphic($img."-week.png",$res." weekly");
75 one_graphic($img."-month.png",$res." monthly");
76 one_graphic($img."-year.png",$res." yearly");
77 }
78 }
80 echo "<h2>CPU</h2>\n";
81 graphic("cpu");
82 echo "<h2>Memory</h2>\n";
83 graphic("memory");
84 echo "<h2>Disk</h2>\n";
85 graphic("disk");
86 echo "<h2>Network</h2>\n";
87 $eth = array();
88 exec("/sbin/route -n | awk '{ if (/^0.0.0.0/) print $8 }'", $eth);
89 graphic("net",$eth[0]);
91 ?>
93 <!-- End of content -->
94 </div>
96 <!-- Footer -->
97 <div id="footer">
98 <div class="right_box">
99 <h4>SliTaz Network</h4>
100 <ul>
101 <li><a href="http://doc.slitaz.org/">Documentation</a></li>
102 <li><a href="http://forum.slitaz.org/">Support Forum</a></li>
103 <li><a href="http://scn.slitaz.org/">Community Network</a></li>
104 <li><a href="http://labs.slitaz.org/">Laboratories</a></li>
105 <li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
106 <li><a href="http://distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
107 </ul>
108 </div>
109 <h4>SliTaz Website</h4>
110 <ul>
111 <li><a href="#header">Top of the page</a></li>
112 <li>Copyright &copy; <?php echo date('Y'); ?>
113 <a href="http://www.slitaz.org/">SliTaz</a></li>
114 <li><a href="http://www.slitaz.org/en/about/">About the project</a></li>
115 <li><a href="http://www.slitaz.org/netmap.php">Network Map</a></li>
116 <li>Page modified the <?php echo (date( "d M Y", getlastmod())); ?></li>
117 <li><a href="http://validator.w3.org/check?uri=referer"><img
118 src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
119 title="Code validé XHTML 1.0"
120 style="width: 80px; height: 15px; vertical-align: middle;" /></a></li>
121 </ul>
122 </div>
124 </body>
125 </html>