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

Copied code in mirror index.php to help display cpu type and ram amount on running system. No need for my older code i added in last commit.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 26 17:42:16 2011 +0000 (2011-02-26)
parents 5c6b1e00206f
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>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 <!-- 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>Codename: tank</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 <p>
51 Tank CPU is a <?php system("sed -e '/^model name/!d;s/.*Intel(R) //;" .
52 "s/@//;s/(.*)//;s/CPU //;s/.*AMD //;s/.*: //;s/Processor //' </proc/cpuinfo |" .
53 " awk '{ s=$0; n++ } END { if (n == 2) printf \"dual \";" .
54 "if (n == 4) printf \"quad \"; print s }' ")?> -
55 <?php system("free | awk '/Mem:/ { x=2*$2-1; while (x >= 1024) { x /= 1024; ".
56 "n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ".
57 "printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?> - Located next to Lausanne,
58 Switzerland and offered by Thomas Hinterberger and hosted by Christophe
59 Lincoln. Tank is also monitored by RRDtool which provides
60 <a href="graphs.php">graphical stats</a>.
61 </p>
62 <!-- Top block end -->
63 </div>
64 <!-- Block end -->
65 </div>
67 <h2><a href="graphs.php"><img
68 style="vertical-align: middle; padding: 0 4px 0 0;"
69 title="Tank RRDtool graphs" alt="graphs"
70 src="pics/website/monitor.png" /></a>System stats</h2>
72 <h4>Uptime</h4>
74 <pre class="package">
75 <?php
76 system("uptime | sed 's/^\s*//'");
77 ?>
78 </pre>
80 <h4>Disk usage</h4>
82 <pre class="package">
83 <?php
84 system("df -h | sed '/^rootfs/d' | grep '\(^/dev\|Filesystem\)'");
85 ?>
86 </pre>
88 <h4>Network</h4>
89 <pre class="package">
90 <?php
91 system("ifconfig eth0 | awk '{ if (/X packet/ || /X byte/) print }' | sed 's/^\s*//'");
92 ?>
93 </pre>
95 <h2><a href="/stats/awstats.pl?config=www.slitaz.org"><img
96 style="vertical-align: middle; padding: 0 4px 0 0;"
97 title="Tank Virtual hosts" alt="vhosts"
98 src="pics/website/vhosts.png" /></a>Virtual hosts</h2>
100 <ul>
101 <li><a href="http://www.slitaz.org/">www.slitaz.org</a> - SliTaz Website.
102 (<a href="/stats/awstats.pl?config=www.slitaz.org">stats</a>)</li>
103 <li><a href="http://doc.slitaz.org/">doc.slitaz.org</a> - Documentation platform.</li>
104 <li><a href="http://pkgs.slitaz.org/">pkgs.slitaz.org</a> - Packages Web interface.</li>
105 <li><a href="http://boot.slitaz.org/">boot.slitaz.org</a> - gPXE Web boot.</li>
106 <li><a href="http://hg.slitaz.org/">hg.slitaz.org</a> - Mercurial repositories.</li>
107 <li><a href="http://bb.slitaz.org/">bb.slitaz.org</a> - SliTaz Build Bot.</li>
108 <li><a href="http://people.slitaz.org/">people.slitaz.org</a> - SliTaz People stuff.</li>
109 <li><a href="http://pro.slitaz.org/">pro.slitaz.org</a> - SliTaz Professional services.</li>
110 </ul>
112 <h2><img
113 style="vertical-align: middle; padding: 0 4px 0 0;"
114 title="Erjo Virtual hosts" alt="vhosts"
115 src="pics/website/vhosts.png" />Other hosts</h2>
117 <p>
118 These services are hosted by some individual sponsors who gracefully offer
119 resources to the SliTaz project.
120 </p>
121 <ul>
122 <li><a href="http://forum.slitaz.org/">forum.slitaz.org</a> - SliTaz support forum.</li>
123 <li><a href="http://labs.slitaz.org/">labs.slitaz.org</a> - SliTaz Laboratories.</li>
124 <li><a href="http://mirror.slitaz.org/">mirror.slitaz.org</a> - SliTaz main mirror and replicas.
125 (<a href="http://mirror.slitaz.org/info/">more...</a>)</li>
126 <li><a href="http://scn.slitaz.org/">scn.slitaz.org</a> - Community platform.</li>
127 <li><a href="http://pizza.slitaz.org/">pizza.slitaz.org</a> - SliTaz flavor builder.</li>
128 </ul>
130 <h2><a href="http://mirror.slitaz.org/info/"> <img
131 style="vertical-align: middle; padding: 0 4px 0 0;"
132 src="pics/website/vhosts.png"
133 title="Secondary mirrors" alt="mirrors" /></a>Mirrors</h2>
134 <p>
135 These mirrors are updated using the url <b>rsync://mirror.slitaz.org/slitaz/</b>
136 (<a href="http://mirror.slitaz.org/awstats.pl?config=rsync">stats</a>)
137 </p>
138 <ul>
139 <li><a href="http://mirror.switch.ch/ftp/mirror/slitaz/">
140 http://mirror.switch.ch/ftp/mirror/slitaz/</a> or
141 <a href="ftp://mirror.switch.ch/mirror/slitaz/">
142 ftp://mirror.switch.ch/mirror/slitaz/</a></li>
143 <li><a href="http://download.tuxfamily.org/slitaz/">
144 http://download.tuxfamily.org/slitaz/</a></li>
145 <li><a href="http://www.linuxembarque.com/slitaz/mirror/">
146 http://www.linuxembarque.com/slitaz/mirror/</a></li>
147 <li><a href="http://mirror.lupaworld.com/slitaz/">
148 http://mirror.lupaworld.com/slitaz/</a></li>
149 <li><a href="http://slitaz.c3sl.ufpr.br/">
150 http://slitaz.c3sl.ufpr.br/</a> or
151 <a href="ftp://slitaz.c3sl.ufpr.br/slitaz/">
152 ftp://slitaz.c3sl.ufpr.br/slitaz/</a></li>
153 <li><a href="http://slitaz.mirror.garr.it/mirrors/slitaz/">
154 http://slitaz.mirror.garr.it/mirrors/slitaz/</a></li>
155 <li><a href="http://www.gtlib.gatech.edu/pub/slitaz/">
156 http://www.gtlib.gatech.edu/pub/slitaz/</a> or
157 <a href="ftp://ftp.gtlib.gatech.edu/pub/slitaz/">
158 ftp://ftp.gtlib.gatech.edu/pub/slitaz/</a></li>
159 <li><a href="ftp://ftp.pina.si/slitaz/">
160 ftp://ftp.pina.si/slitaz/</a></li>
161 </ul>
163 <!-- End of content -->
164 </div>
166 <!-- Footer -->
167 <div id="footer">
168 <div class="right_box">
169 <h4>SliTaz Network</h4>
170 <ul>
171 <li><a href="http://doc.slitaz.org/">Documentation</a></li>
172 <li><a href="http://forum.slitaz.org/">Support Forum</a></li>
173 <li><a href="http://scn.slitaz.org/">Community Network</a></li>
174 <li><a href="http://labs.slitaz.org/">Laboratories</a></li>
175 <li><a href="http://twitter.com/slitaz">SliTaz on Twitter</a></li>
176 <li><a href="http://distrowatch.com/slitaz">SliTaz on DistroWatch</a></li>
177 </ul>
178 </div>
179 <h4>SliTaz Website</h4>
180 <ul>
181 <li><a href="#header">Top of the page</a></li>
182 <li>Copyright &copy; <?php echo date('Y'); ?>
183 <a href="http://www.slitaz.org/">SliTaz</a></li>
184 <li><a href="http://www.slitaz.org/en/about/">About the project</a></li>
185 <li><a href="http://www.slitaz.org/netmap.php">Network Map</a></li>
186 <li>Page modified the <?php echo (date( "d M Y", getlastmod())); ?></li>
187 <li><a href="http://validator.w3.org/check?uri=referer"><img
188 src="pics/website/xhtml10.png" alt="Valid XHTML 1.0"
189 title="Code validé XHTML 1.0"
190 style="width: 80px; height: 15px; vertical-align: middle;" /></a></li>
191 </ul>
192 </div>
194 </body>
195 </html>