This commit is contained in:
Dylan Araps 2019-01-07 22:53:51 +02:00
parent a450fc88c5
commit 594e1fa10d
1 changed files with 2 additions and 2 deletions

View File

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