php get system informations ram usage and storage usage
<p>Hey guys i am currently working on a little script which shows me cpu load, ram usage and storage usage. I have already managed to get the cpu usage with this little script:</p>

<pre><code>$dat = getrusage();
$usertime= $dat['ru_utime.tv_usec'];
$systemtime= $dat['ru_stime.tv_usec'];
$finalresultcpu= ($systemtime/$usertime);
$cpuload = $finalresultcpu * 10;
echo $cpuload;
</code></pre>

<p>So now i want to get ram usage and storage usage too. The web server is running on a Linux machine. I know there is the monitor script phpsysinfo, but i want to use my own solution. Then i tried <code>shell_exec</code>, but this wasn't really helpful. Has someone an idea how i can solve this with php or with a combination of php and javascript?</p>
