add free example

This commit is contained in:
Doug MacEachern 2007-09-05 04:19:11 +00:00
parent 79fda5c0bd
commit a2c2f2e448
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
$sigar = new Sigar();
$mem = $sigar->mem();
$swap = $sigar->swap();
echo "\tTotal\tUsed\tFree\n";
echo "Mem: " .
($mem->total() / 1024) . "\t" .
($mem->used() / 1024) . "\t" .
($mem->free() / 1024) . "\n";
echo "Swap: " .
($swap->total() / 1024) . "\t" .
($swap->used() / 1024) . "\t" .
($swap->free() / 1024) . "\n";
echo "RAM: " . $mem->ram() . "MB\n";