From df199be23e52d66ed4ac067d6d9313af1f14629f Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 18 Aug 2022 11:40:42 +0200 Subject: cleaner --- .local/bin/status/sb-memory | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.local/bin/status/sb-memory b/.local/bin/status/sb-memory index 2ab06bd..ecd0e3c 100755 --- a/.local/bin/status/sb-memory +++ b/.local/bin/status/sb-memory @@ -1,3 +1,7 @@ #!/bin/sh -freecolor -o | sed -n '2p' | awk '{printf ("﬙ %2.2fG/%2.2fG\n", ($3 / (1024 ^ 2)), ($2 / (1024 ^ 2)))}' +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)))}' -- cgit v1.2.3