From e72cc2ecab679ae7347156e435d20a1b42f1748b Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Fri, 11 Nov 2022 21:56:04 +0300 Subject: [PATCH] [~] Refactor --- dotfiles/.local/bin/commands | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/.local/bin/commands b/dotfiles/.local/bin/commands index 4ffdd2d..a99966c 100755 --- a/dotfiles/.local/bin/commands +++ b/dotfiles/.local/bin/commands @@ -143,8 +143,9 @@ def memory_stats(): and not re.compile(r'^\s*\d+\.\s*$').match(o[1]) is None \ and not re.compile(r'^[a-zA-Z0-9\_\-\s]+$').match(o[0]) is None } - mem_used = mem_total - ( - t3['pages_inactive'] + t3['pages_free'] + mem_used = ( + t3['pages_active'] + \ + t3['pages_wired_down'] ) * vm_pagesize return dict(