From 5246889725e5fc5cfa2a8da7fa9a0321ec43a2b2 Mon Sep 17 00:00:00 2001 From: Vincent Gerris Date: Wed, 22 May 2024 14:05:23 +0200 Subject: [PATCH] Update check_mem.pl memory array values to match output of free from procps-ng 3.3.17 and free from procps-ng 4.0.4 --- check_mem.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_mem.pl b/check_mem.pl index 6c62634..bfee759 100755 --- a/check_mem.pl +++ b/check_mem.pl @@ -166,8 +166,8 @@ sub sys_stats { my $mem_used; if ( $DONT_INCLUDE_BUFFERS) { $mem_used = $memory[15]; } else { $mem_used = $memory[8];} - my $swap_total = $memory[18]; - my $swap_used = $memory[19]; + my $swap_total = $memory[14]; + my $swap_used = $memory[15]; my $mem_percent = ($mem_used / $mem_total) * 100; my $swap_percent; if ($swap_total == 0) {