slitaz-forge rev 81
tank: Fixed graphs.php to know what cpu the system is running.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Sep 05 22:14:13 2011 +0000 (2011-09-05) |
parents | 8d4f1836a270 |
children | 642b77c71c04 |
files | tank/web/graphs.php |
line diff
1.1 --- a/tank/web/graphs.php Fri Sep 02 02:16:16 2011 +0000 1.2 +++ b/tank/web/graphs.php Mon Sep 05 22:14:13 2011 +0000 1.3 @@ -51,7 +51,13 @@ 1.4 public directory or cron jobs. 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. 1.16 </p> 1.17 </div>