slitaz-forge view pangolin/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 5091de3dc58d
children cfad9fa3f53c
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>Pangolin RRD stats</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="slitaz pangolin 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 <div id="logo"></div>
18 <div id="network">
19 <a href="http://www.slitaz.org/">
20 <img src="images/network.png" alt="network.png" /></a>
21 <a href="http://scn.slitaz.org/">Community</a>
22 <a href="http://doc.slitaz.org/">Doc</a>
23 <a href="http://forum.slitaz.org/">Forum</a>
24 <a href="http://bugs.slitaz.org">Bugs</a>
25 <a href="http://hg.slitaz.org/">Hg</a>
26 </div>
27 <h1><a href="http://www.slitaz.org/">SliTaz Pangolin</a></h1>
28 </div>
30 <!-- Block -->
31 <div id="block">
32 <!-- Navigation -->
33 <div id="block_nav">
34 <h4><img src="images/development.png" alt="development.png" />Developers Corner</h4>
35 <ul>
36 <li><a href="http://www.slitaz.org/en/devel/">Website devel</a></li>
37 <li><a href="http://scn.slitaz.org/">Community</a></li>
38 <li><a href="http://labs.slitaz.org/">Laboratories</a></li>
39 <li><a href="http://hg.slitaz.org/">Mercurial Repos</a></li>
40 <li><a href="http://cook.slitaz.org/">Build Bot</a></li>
41 <li><a href="http://tank.slitaz.org/">Tank Server</a></li>
42 <li><a href="http://mirror1.slitaz.org/info/">Mirror Server</a></li>
43 </ul>
44 </div>
45 <!-- Information/image -->
46 <div id="block_info">
47 <h4>Codename: pangolin</h4>
48 <p>
49 This is the SliTaz GNU/Linux main server and build host.
50 The server runs naturally SliTaz and provides some services
51 to all contributors such as: secure access, disk space, a
52 public directory or cron jobs. The virtual machine provided by
53 <a href="https://www.linkedin.com/company/balinor-technologies/">balinor-technologies</a>.
54 </p>
55 <p>
56 Pangolin CPU is a <?php system("sed -e '/^model name/!d;s/.*Intel(R) //;" .
57 "s/@//;s/(.*)//;s/CPU //;s/.*AMD //;s/.*: //;s/Processor //' </etc/cpuinfo |" .
58 " awk '{ s=$0; n++ } END { if (n == 2) printf \"dual \";" .
59 "if (n == 4) printf \"quad \"; print s }' ")?> -
60 <?php system("free | awk '/Mem:/ { x=2*$2-1; while (x >= 1024) { x /= 1024; ".
61 "n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ".
62 "printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?>
63 - Located in Paris,
64 France.
65 </p>
66 </div>
67 </div>
69 <!-- Content -->
70 <div id="content">
72 <div align="center"> <?php echo date("r"); ?> </div>
73 <?php
75 $myurl="http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
77 function one_graphic($img,$name)
78 {
79 echo '<img src="pics/rrd/'.$img.'" title="'.
80 $name.'" alt="'.$name.'" />'."\n";
81 }
83 function graphic($res, $img='')
84 {
85 global $myurl;
86 if (!$img) $img=$res;
87 echo "<a name=\"".$res."\"></a>";
88 echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
89 one_graphic($img."-day.png",$res." daily");
90 echo "</a>";
91 if (isset($_GET['stats']) && $_GET['stats'] == $res) {
92 one_graphic($img."-week.png",$res." weekly");
93 one_graphic($img."-month.png",$res." monthly");
94 one_graphic($img."-year.png",$res." yearly");
95 }
96 }
98 echo "<h2>CPU</h2>\n";
99 graphic("cpu");
100 echo "<h2>Memory</h2>\n";
101 graphic("memory");
102 echo "<h2>Disk</h2>\n";
103 graphic("disk");
104 echo "<h2>Network</h2>\n";
105 $eth = array();
106 exec("/sbin/route -n | awk '{ if (/^0.0.0.0/) print $8 }'", $eth);
107 graphic("net",$eth[0]);
109 ?>
111 <!-- End of content -->
112 </div>
114 <!-- Footer -->
115 <div id="footer">
116 Copyright &copy; <span class="year"></span>
117 <a href="http://www.slitaz.org/">SliTaz</a> - Network:
118 <a href="http://scn.slitaz.org/">Community</a>
119 <a href="http://doc.slitaz.org/">Doc</a>
120 <a href="http://forum.slitaz.org/">Forum</a>
121 <a href="http://pkgs.slitaz.org/">Packages</a>
122 <a href="http://bugs.slitaz.org">Bugs</a>
123 <a href="http://hg.slitaz.org/">Hg</a>
124 <p>
125 SliTaz @
126 <a href="http://twitter.com/slitaz">Twitter</a>
127 <a href="http://www.facebook.com/slitaz">Facebook</a>
128 <a href="http://distrowatch.com/slitaz">Distrowatch</a>
129 <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a>
130 <a href="http://flattr.com/profile/slitaz">Flattr</a>
131 </p>
132 </div>
134 </body>
135 </html>