slitaz-forge view chub/web/graphs.php @ rev 714

Virtual machines have moved
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 01 10:43:39 2021 +0000 (2021-02-01)
parents 1f255fd08adf
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>Chub RRD stats</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="slitaz chub rrdtool graphs" />
8 <meta name="robots" content="index, follow, all" />
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 <?php include("lib/html/header.html"); ?>
17 <!-- Block -->
18 <div id="block">
19 <!-- Navigation -->
20 <div id="block_nav">
21 <h4><img src="images/server.png" alt="[ Server ]" />Project servers</h4>
22 <ul>
23 <li><a href="http://tank.slitaz.org/">Tank server</a></li>
24 <li><a href="http://mirror.slitaz.org/">Mirror server</a></li>
25 <li><a href="http://pangolin.slitaz.org/">Pangolin server</a></li>
26 </ul>
27 </div>
28 <!-- Information/image -->
29 <div id="block_info">
30 <h4>Codename: chub</h4>
31 <p>
32 This is the SliTaz GNU/Linux Community HUB server. This
33 virtual machine is gracefully hosted by COSI at Clarkson
34 University <a href="http://cosi.clarkson.edu/">cosi.clarkson.edu</a>
35 </p>
36 <p>
37 Chub CPU is a quad Xeon E5410 2.33GHz - 4GB RAM
38 </p>
39 </div>
40 </div>
42 <!-- Content -->
43 <div id="content">
45 <div align="center"> <?php echo date("r"); ?> </div>
46 <?php
48 $myurl="http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
50 function one_graphic($img,$name)
51 {
52 echo '<img src="images/rrd/'.$img.'" title="'.
53 $name.'" alt="'.$name.'" />'."\n";
54 }
56 function graphic($res, $img='')
57 {
58 global $myurl;
59 if (!$img) $img=$res;
60 echo "<a name=\"".$res."\"></a>";
61 echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
62 one_graphic($img."-day.png",$res." daily");
63 echo "</a>";
64 if (isset($_GET['stats']) && $_GET['stats'] == $res) {
65 one_graphic($img."-week.png",$res." weekly");
66 one_graphic($img."-month.png",$res." monthly");
67 one_graphic($img."-year.png",$res." yearly");
68 }
69 }
71 echo "<h2>CPU</h2>\n";
72 graphic("cpu");
73 echo "<h2>Memory</h2>\n";
74 graphic("memory");
75 echo "<h2>Disk</h2>\n";
76 graphic("disk");
77 echo "<h2>Network</h2>\n";
78 $eth = array();
79 exec("/sbin/route -n | awk '{ if (/^0.0.0.0/) print $8 }'", $eth);
80 graphic("net",$eth[0]);
82 ?>
84 <!-- End of content -->
85 </div>
87 <?php include("lib/html/footer.html"); ?>
89 </body>
90 </html>