forked from ungleich-public/cdist
code diet on "memory"
This commit is contained in:
parent
e727824964
commit
981f8068d2
1 changed files with 2 additions and 3 deletions
|
@ -25,13 +25,12 @@
|
||||||
os=$("$__explorer/os")
|
os=$("$__explorer/os")
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"macosx")
|
"macosx")
|
||||||
let memsize=$(sysctl -n hw.memsize)/1024
|
echo "$(sysctl -n hw.memsize)/1024" | bc
|
||||||
echo "$memsize"
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if [ -r /proc/meminfo ]; then
|
if [ -r /proc/meminfo ]; then
|
||||||
echo "$(grep "MemTotal:" /proc/meminfo | awk '{print $2}')"
|
grep "MemTotal:" /proc/meminfo | awk '{print $2}'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue