diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-03-18 18:58:24 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-03-18 18:58:24 +0000 |
commit | e1777f87f6d4ecb7e09f641035d89bc9d3533419 (patch) | |
tree | 63a320a147f8d498b8a4d6ed314952b120c23cb5 /etc | |
parent | 27bda80fd42d23345607dface322e657aef41a63 (diff) | |
download | pfsense-e1777f87f6d4ecb7e09f641035d89bc9d3533419.zip pfsense-e1777f87f6d4ecb7e09f641035d89bc9d3533419.tar.gz |
If /var/log/dmesg.boot is unavailable, then use dmesg -a
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 8e5b5c6..fe6a5f3 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1128,6 +1128,14 @@ function get_memory() { if (preg_match_all("/avail memory = .* \((.*) MB/", $mem, $matches)) $avail = $matches[1]; return array($real[0],$avail[0]); + } else { + $mem = `dmesg -a`; + $matches = ""; + if (preg_match_all("/real memory = .* \((.*) MB/", $mem, $matches)) + $real = $matches[1]; + if (preg_match_all("/avail memory = .* \((.*) MB/", $mem, $matches)) + $avail = $matches[1]; + return array($real[0],$avail[0]); } return array("64","64"); } |