6 use lib qw{blib/lib blib/arch};
8 use Linux::SysInfo qw/sysinfo LS_HAS_EXTENDED/;
11 die 'sysinfo() failed ! (should be pretty rare but it did happen)' unless $si;
13 print 'Extended fields are ', (LS_HAS_EXTENDED ? '' : 'NOT '), "available on your system.\n\n";
16 print "- $_: $si->{$_}\n" for sort keys %$si;
18 if (LS_HAS_EXTENDED) {
20 print 'You have the mem_unit field set to ', $si->{mem_unit}, ', hence ',
21 ($si->{mem_unit} == 1) ? "the memory values are the actual sizes in bytes :\n"
22 : "the sizes in bytes are actually :\n";
23 print '- ', $_, ': ', $si->{$_} * $si->{mem_unit}, "\n" for sort
24 qw/totalram freeram sharedram bufferram totalswap freeswap totalhigh freehigh/;