Issue #104 /proc/meminfo is not language specific.
This commit is contained in:
parent
1cdbeba70d
commit
809d6003eb
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue