slitaz-forge 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 | 281ba88018cf |
files | tank/web/index.php |
line diff
1.1 --- a/tank/web/index.php Sat Feb 26 05:01:53 2011 +0000 1.2 +++ b/tank/web/index.php Sat Feb 26 17:42:16 2011 +0000 1.3 @@ -48,7 +48,13 @@ 1.4 <a href="http://bb.slitaz.org/">Build Bot</a>. 1.5 </p> 1.6 <p> 1.7 - Tank CPU is a AMD Dual Core 2 GHz - 2GB RAM - Located next to Lausanne, 1.8 + Tank CPU is a <?php system("sed -e '/^model name/!d;s/.*Intel(R) //;" . 1.9 + "s/@//;s/(.*)//;s/CPU //;s/.*AMD //;s/.*: //;s/Processor //' </proc/cpuinfo |" . 1.10 + " awk '{ s=$0; n++ } END { if (n == 2) printf \"dual \";" . 1.11 + "if (n == 4) printf \"quad \"; print s }' ")?> - 1.12 + <?php system("free | awk '/Mem:/ { x=2*$2-1; while (x >= 1024) { x /= 1024; ". 1.13 + "n++ }; y=1; while (x > 2) { x /= 2; y *= 2}; ". 1.14 + "printf \"%d%cB RAM\",y,substr(\"MG\",n,1) }' ")?> - Located next to Lausanne, 1.15 Switzerland and offered by Thomas Hinterberger and hosted by Christophe 1.16 Lincoln. Tank is also monitored by RRDtool which provides 1.17 <a href="graphs.php">graphical stats</a>. 1.18 @@ -63,14 +69,6 @@ 1.19 title="Tank RRDtool graphs" alt="graphs" 1.20 src="pics/website/monitor.png" /></a>System stats</h2> 1.21 1.22 -<h4>Cpu</h4> 1.23 - 1.24 -<pre class="package"> 1.25 -<?php 1.26 -system("uname -p") 1.27 -?> 1.28 -</pre> 1.29 - 1.30 <h4>Uptime</h4> 1.31 1.32 <pre class="package">