This commit is contained in:
Dylan Araps 2019-01-07 22:53:51 +02:00
parent a450fc88c5
commit 594e1fa10d

View file

@ -2277,8 +2277,8 @@ get_memory() {
"Solaris") "Solaris")
hw_pagesize="$(pagesize)" hw_pagesize="$(pagesize)"
pages_total=$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}') pages_total="$(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}')"
pages_free=$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}') pages_free="$(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}')"
mem_total="$((pages_total * hw_pagesize / 1024 / 1024))" mem_total="$((pages_total * hw_pagesize / 1024 / 1024))"
mem_free="$((pages_free * hw_pagesize / 1024 / 1024))" mem_free="$((pages_free * hw_pagesize / 1024 / 1024))"
mem_used="$((mem_total - mem_free))" mem_used="$((mem_total - mem_free))"