mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 19:49:54 +00:00
Memory: [OpenBSD] Fix OpenBSD memory usage - @Head-on-a-Stick (Closes #413)
This commit is contained in:
6
neofetch
6
neofetch
@@ -1073,7 +1073,11 @@ getmemory() {
|
||||
"NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
|
||||
*) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
|
||||
esac
|
||||
memused="$((memtotal - memfree))"
|
||||
|
||||
case "$distro" in
|
||||
"OpenBSD"*) memused="$(($(vmstat | awk 'END {printf $4}') / 1024))" ;;
|
||||
*) memused="$((memtotal - memfree))" ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"Solaris")
|
||||
|
||||
Reference in New Issue
Block a user