slitaz-forge view tank/web/index.php @ rev 710

Update tank & pangolin/graphs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 01 13:42:50 2020 +0100 (2020-01-01)
parents 17ab49508a9f
children 9e7953989d74
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>SliTaz Tank</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="slitaz tank server" />
8 <meta name="robots" content="index, nofollow" />
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/development.png" alt="development.png" />Developers Corner</h4>
22 <div class="right_box">
23 <ul>
24 <li><a href="http://tank.slitaz.org/">Tank Server</a></li>
25 <li><a href="http://mirror1.slitaz.org/">Main Mirror</a></li>
26 <li><a href="http://tank.slitaz.org/console/">Console</a></li>
27 </ul>
28 </div>
29 <div class="left_box">
30 <ul>
31 <li><a href="http://www.slitaz.org/en/devel/">Devel Doc</a></li>
32 <li><a href="http://people.slitaz.org/">SliTaz People</a></li>
33 <li><a href="http://cook.slitaz.org/">Cooker</a></li>
34 <li><a href="http://mypizza.slitaz.org/">Pizza Builder</a></li>
35 </ul>
36 </div>
37 </div>
38 <!-- Information/image -->
39 <div id="block_info">
40 <h4>Codename: tank</h4>
41 <p>
42 This is the SliTaz GNU/Linux main server and build host.
43 The server runs naturally SliTaz and provides some services
44 to all contributors.
45 </p>
46 <p>
47 Tank CPU is a <?php system("sed -e '/^model name/!d;s/.*Intel(R) //;" .
48 "s/@//;s/(.*)//;s/CPU //;s/.*AMD //;s/.*: //;s/Processor //' </proc/cpuinfo |" .
49 " awk '{ s=$0; n++ } END { if (n == 2) printf \"dual \";" .
50 "if (n == 4) printf \"quad \"; print s }' ")?> -
51 <?php system("free | awk '/Mem:/ { x=2*$2-1; while (x >= 1024) { x /= 1024; ".
52 "n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ".
53 "printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?> - Located in Gravelines,
54 France. Tank is also monitored by RRDtool which provides
55 <a href="graphs.php">graphical stats</a>.
56 </p>
57 </div>
58 </div>
60 <!-- Content -->
61 <div id="content">
63 <h2><a href="graphs.php"><img
64 style="vertical-align: middle; padding: 0 4px 4px 0;"
65 title="Tank RRDtool graphs" alt="graphs"
66 src="images/monitor.png" /></a>System stats</h2>
68 <h4>Uptime</h4>
70 <pre>
71 <?php
72 system("uptime | sed 's/^\s*//'");
73 ?>
74 </pre>
76 <h4>Disk usage</h4>
77 <pre>
78 <?php
79 system("[ -d /sys/block ] && [ -x /usr/sbin/smartctl ] && { cd /sys/block ; for i in [hs]d? ; do echo -n \$i ; /usr/sbin/smartctl -a /dev/\$i 2> /dev/null | sed '/Power_On_Hours/{s/.*Pow/: Pow/;s/ours.*-/ours/;p};/offline/!d;q'; echo; done; }");
80 system("df -h | sed '/^rootfs/d' | grep '\(^/dev\|Filesystem\)'");
81 ?>
82 </pre>
84 <h4>Network</h4>
85 <pre>
86 <?php
87 system("ifconfig eth0 | awk '{ if (/X packet/ || /X byte/) print }' | sed 's/^\s*//'");
88 ?>
89 </pre>
91 <h2><a href="/stats/awstats.pl?config=www.slitaz.org"><img
92 style="padding: 0 4px 4px 0;" title="Tank Virtual hosts" alt="vhosts"
93 src="images/network.png" /></a>Virtual hosts</h2>
95 <ul>
96 <!-- <li><a href="http://pkgs.slitaz.org/">pkgs.slitaz.org</a> - Packages Web interface.
97 (<a href="/stats/awstats.pl?config=pkgs.slitaz.org">stats</a>)</li> -->
98 <li><a href="http://boot.slitaz.org/">boot.slitaz.org</a> - SliTaz Web boot.
99 (<a href="/stats/awstats.pl?config=boot.slitaz.org">stats</a>)</li>
100 <!-- <li><a href="http://hg.slitaz.org/?sort=lastchange">hg.slitaz.org</a> - Mercurial repositories.
101 (<a href="/stats/awstats.pl?config=hg.slitaz.org">stats</a>)</li> -->
102 <li><a href="http://cook.slitaz.org/">cook.slitaz.org</a> - SliTaz Build Bot.
103 (<a href="/stats/awstats.pl?config=cook.slitaz.org">stats</a>)</li>
104 <li><a href="http://people.slitaz.org/">people.slitaz.org</a> - SliTaz People stuff.
105 (<a href="/stats/awstats.pl?config=people.slitaz.org">stats</a>)</li>
106 <li><a href="http://roadmap.slitaz.org/">roadmap.slitaz.org</a> -
107 SliTaz Roadmap.
108 (<a href="/stats/awstats.pl?config=roadmap.slitaz.org">stats</a>)</li>
109 <li><a href="http://bugs.slitaz.org/">bugs.slitaz.org</a> -
110 SliTaz Bug Tracker.
111 (<a href="/stats/awstats.pl?config=bugs.slitaz.org">stats</a>)</li>
112 <li><a href="http://irc.slitaz.org/">irc.slitaz.org</a> -
113 SliTaz IRC logs and webchat.
114 (<a href="/stats/awstats.pl?config=irc.slitaz.org">stats</a>)</li>
115 <li><a href="http://try.slitaz.org/">try.slitaz.org</a> -
116 To try some CGI scripts and other web services.
117 (<a href="/stats/awstats.pl?config=try.slitaz.org">stats</a>)</li>
118 </ul>
120 <h2>Tank Log</h2>
122 <pre>
123 <?php
124 system("tac /var/log/tank.log | head -50");
125 ?>
126 </pre>
128 <!-- End of content -->
129 </div>
131 <?php include("lib/html/footer.html"); ?>
133 </body>
134 </html>