From patchwork Fri Oct 8 21:38:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 4771 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4HR1m32Wj6z3xCR for ; Fri, 8 Oct 2021 21:38:59 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4HR1m274qCz6mR; Fri, 8 Oct 2021 21:38:58 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4HR1m26Hm6z2yTr; Fri, 8 Oct 2021 21:38:58 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4HR1m232CTz2yS8 for ; Fri, 8 Oct 2021 21:38:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4HR1m21prnz6lf; Fri, 8 Oct 2021 21:38:58 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1633729138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vdmnOL2fXAZ3xy/Z1qY4pSfizjSAfcd51RpQLiYu/Js=; b=oiG7eLHpzt96to9/9Iz0s3Pa2Ehlsz1LVtfFq2caagsaF5mDfT/5uZ2VWvpAHcaQnIYGKq KRUZAypmQskErmDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1633729138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vdmnOL2fXAZ3xy/Z1qY4pSfizjSAfcd51RpQLiYu/Js=; b=rh0aXUjhuTij36qlAqheBxtr5GIlqZEMZlxsIRtsM8sM8mPWGhNuYkgwA0niSbQsqZPmYV eJBiQJDl466bWc5X1LYSMN49HrKEaB5mxyHKLQvvjm5r4O5bw+IVzNkfUPW1tRiBcSZTNe lJbRWmxPPAvrVohD/sXGnzqHmjlxzaXmnQcC/3u9TR8k8c3j9U/375VM/6uU2oAxIHvija 0QxQb3VONTA46kCdL/UN4s+lddByIeoscE60zc6T9LjEemNgkkPNWmqqg0fGfKC6++4mtN 6c9Nz1c3gTXElZyJsEE9/TQJFsTAP9eKHKrv3dfhZXsERceUfV7Id36LDLFRHw== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] makegraphs: Update script for new iostat output format - Bug#12702 Date: Fri, 8 Oct 2021 23:38:24 +0200 Message-Id: <20211008213824.2754445-2-adolf.belka@ipfire.org> In-Reply-To: <20211008213824.2754445-1-adolf.belka@ipfire.org> References: <20211008213824.2754445-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Modification of iostat line as per input in Bug#12702 Fixes: 12702 Signed-off-by: Adolf Belka --- src/scripts/makegraphs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs index 5bfb05d2a..cbfc83c77 100644 --- a/src/scripts/makegraphs +++ b/src/scripts/makegraphs @@ -120,7 +120,7 @@ foreach (@disks){ $diskstats = `cat /var/run/hddstats-$array[$#array] 2>/dev/null`; chomp $diskstats; - my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -2 | head -1 | awk '{ print \$5","\$6}'`; + my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -3 | head -1 | awk '{ print \$6","\$7}'`; chomp $newdiskstats; my $status = `hdparm -C /dev/$disk | tail -1 | cut -d: -f2`; chomp $status; @@ -140,7 +140,7 @@ foreach (@disks){ if ( $diskstats eq $newdiskstats ) { # update diskstat because read temp change the status - my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -2 | head -1 | awk '{ print \$5","\$6}'`; + my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -3 | head -1 | awk '{ print \$6","\$7}'`; chomp $newdiskstats; open(DATEI, ">/var/run/hddstats-$array[$#array]") || die "Datei nicht gefunden"; print DATEI $newdiskstats;