Merge 3ebb62876f
into efaf57383d
This commit is contained in:
commit
b843518b8a
2 changed files with 1130 additions and 0 deletions
|
@ -217,6 +217,9 @@ sub os_setup {
|
||||||
} else {
|
} else {
|
||||||
if ($os =~ /Linux/) {
|
if ($os =~ /Linux/) {
|
||||||
$physical_memory = `free -b | grep Mem | awk '{print \$2}'` or memerror;
|
$physical_memory = `free -b | grep Mem | awk '{print \$2}'` or memerror;
|
||||||
|
if ($physical_memory == 0) {
|
||||||
|
$physical_memory = `echo \$(( \`cat /proc/meminfo | grep 'MemTotal' | awk '{print \$2}'\` * 1024 ))` or memerror;
|
||||||
|
}
|
||||||
$swap_memory = `free -b | grep Swap | awk '{print \$2}'` or memerror;
|
$swap_memory = `free -b | grep Swap | awk '{print \$2}'` or memerror;
|
||||||
} 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