add Mem.Actual{Free,Used}

This commit is contained in:
Doug MacEachern 2004-11-20 02:11:12 +00:00
parent fee5b18641
commit 6e7e2a4b0d
2 changed files with 33 additions and 1 deletions

View File

@ -74,7 +74,35 @@ my %classes = (
},
{
name => 'free', type => 'Long',
desc => 'Total free system memory',
desc => 'Total free system memory (e.g. Linux plus cached)',
plat => '*',
cmd => {
AIX => '',
Darwin => '',
FreeBSD => '',
HPUX => '',
Linux => 'free',
Solaris => '',
Win32 => 'taskman',
},
},
{
name => 'actual_used', type => 'Long',
desc => 'Actual total used system memory (e.g. Linux minus buffers)',
plat => '*',
cmd => {
AIX => '',
Darwin => '',
FreeBSD => '',
HPUX => '',
Linux => 'free',
Solaris => '',
Win32 => 'taskman',
},
},
{
name => 'actual_free', type => 'Long',
desc => 'Actual total free system memory',
plat => '*',
cmd => {
AIX => '',

View File

@ -20,6 +20,10 @@ public class TestMem extends SigarTestCase {
assertGtZeroTrace("Free", mem.getFree());
assertGtZeroTrace("ActualUsed", mem.getUsed());
assertGtZeroTrace("ActualFree", mem.getFree());
assertGtZeroTrace("Ram", mem.getRam());
assertTrue((mem.getRam() % 8) == 0);