Issue #104 /proc/meminfo is not language specific.

This commit is contained in:
Jean-Marie RENOUARD 2015-08-19 09:51:22 +02:00
parent 1cdbeba70d
commit 809d6003eb

View file

@ -273,10 +273,10 @@ sub os_setup {
} }
} else { } else {
if ($os =~ /Linux/) { if ($os =~ /Linux/) {
$physical_memory = `LANG=en grep -i memtotal: /proc/meminfo | awk '{print \$2}'` or memerror; $physical_memory = `grep -i memtotal: /proc/meminfo | awk '{print \$2}'` or memerror;
$physical_memory*=1024; $physical_memory*=1024;
$swap_memory = `LANG=en grep -i swaptotal: /proc/meminfo | awk '{print \$2}'` or memerror; $swap_memory = `grep -i swaptotal: /proc/meminfo | awk '{print \$2}'` or memerror;
$swap_memory*=1024; $swap_memory*=1024;
} elsif ($os =~ /Darwin/) { } elsif ($os =~ /Darwin/) {
$physical_memory = `sysctl -n hw.memsize` or memerror; $physical_memory = `sysctl -n hw.memsize` or memerror;