diff options
author | Joe <rbo@gmx.us> | 2024-12-24 12:17:13 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-12-24 12:17:13 +0100 |
commit | 88cd0d91863c65f5007da7e06a6fb78b74b050bb (patch) | |
tree | 75e9752229dc5ac8000eac4dc27efffe5adf54c7 /.local/bin/status/sb-memory | |
parent | up (diff) | |
download | dotfiles-bsd-88cd0d91863c65f5007da7e06a6fb78b74b050bb.tar.gz dotfiles-bsd-88cd0d91863c65f5007da7e06a6fb78b74b050bb.tar.bz2 dotfiles-bsd-88cd0d91863c65f5007da7e06a6fb78b74b050bb.tar.xz dotfiles-bsd-88cd0d91863c65f5007da7e06a6fb78b74b050bb.tar.zst dotfiles-bsd-88cd0d91863c65f5007da7e06a6fb78b74b050bb.zip |
bar update
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/status/sb-memory | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.local/bin/status/sb-memory b/.local/bin/status/sb-memory index 4901b83..a8ba56f 100755 --- a/.local/bin/status/sb-memory +++ b/.local/bin/status/sb-memory @@ -1,14 +1,15 @@ #!/bin/sh +echo -n "^c#b8bb26^ " case $(hostname -s) in mother|po-rbo) - free | sed -n '2p' | awk '{printf (" %2.2fG/%2.2fG\n", ($2 / (1000 ^ 2)) - ($7 / (1000 ^ 2)), ($2 / (1000 ^ 2)))}' + free | sed -n '2p' | awk '{print int(100 - ($7 * 100 / $2))"%"}' ;; mars) sysctl -n hw.physmem \ hw.pagesize \ vm.stats.vm.v_inactive_count \ vm.stats.vm.v_free_count \ - vm.stats.vm.v_cache_count | xargs | awk '{printf (" %2.2fG/%2.2fG\n", ($1 / (1024 ^ 3)) - (($3 + $4 + $5) * $2 / (1024 ^ 3)), ($1 / (1024 ^ 3)))}' + vm.stats.vm.v_cache_count | xargs | awk '{printf ("%2.2fG/%2.2fG\n", ($1 / (1024 ^ 3)) - (($3 + $4 + $5) * $2 / (1024 ^ 3)), ($1 / (1024 ^ 3)))}' ;; esac |