Below are a few lines of PHP code I've used before on linux servers and thought I should share on here , a small contribution to the BetterPHP Community but every contribution however big or small helps .
How to find out the processor that's installed in a linux server.
<?php $proc = (explode(":",shell_exec("cat /proc/cpuinfo | grep \"model name\""))); echo "<b>Processor:</b>$proc[1]"; ?>Result on my local linux server:
How to find out the operating system that's installed on a linux server.Processor: AMD Athlon(tm) II P320 Dual-Core Processor
<?php $serveros = (explode(":",shell_exec("lsb_release -d"))); echo "<b>Operating System:</b>$serveros[1]"; ?>Result on my local linux server:
Enjoy , I hope this will be useful to others.Operating System: Ubuntu 10.04.3 LTS