mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
physmem is 32bit on netbsd, physmem64 for 64bit
This commit is contained in:
5
neofetch
5
neofetch
@@ -1172,7 +1172,10 @@ getmemory() {
|
||||
*) memfree="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;;
|
||||
esac
|
||||
|
||||
memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))"
|
||||
case "$distro" in
|
||||
"NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
|
||||
*) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
|
||||
esac
|
||||
memused="$((memtotal - memfree))"
|
||||
;;
|
||||
|
||||
|
Reference in New Issue
Block a user