Memory [Solaris]: Detect using a new method using pages
This commit is contained in:
parent
801760a01b
commit
0168516a2c
1 changed files with 3 additions and 2 deletions
5
neofetch
5
neofetch
|
@ -2269,8 +2269,9 @@ get_memory() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Solaris")
|
"Solaris")
|
||||||
mem_total="$(prtconf | awk '/Memory/ {print $3}')"
|
hw_pagesize="$(pagesize)"
|
||||||
mem_free="$(($(vmstat | awk 'NR==3{printf $5}') / 1024))"
|
mem_total="$(($(kstat -p unix:0:system_pages:pagestotal | awk '{print $2}') * hw_pagesize / 1024 / 1024))"
|
||||||
|
mem_free="$(($(kstat -p unix:0:system_pages:pagesfree | awk '{print $2}') * hw_pagesize / 1024 / 1024))"
|
||||||
mem_used="$((mem_total - mem_free))"
|
mem_used="$((mem_total - mem_free))"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue