From patchwork Sat May 22 13:25:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 4359 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 4FnPPQ4SHSz3wbl for ; Sat, 22 May 2021 13:26:02 +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 4FnPPQ2RmKz1YS; Sat, 22 May 2021 13:26:02 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4FnPPQ1jBNz2yTP; Sat, 22 May 2021 13:26:02 +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 4FnPPP0bZRz2xNt for ; Sat, 22 May 2021 13:26:01 +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 4FnPPN4xhHz1TL for ; Sat, 22 May 2021 13:26:00 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1621689960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=DvswALxdChTFapEObUC0pM6jedVcGRGe2OCKF1HRpL8=; b=tagPM9mWtFalyPlJGOtYhAue/m98OS95f3vXz3XEeNEinMT0v2HfEr/ecLEJXEVLL07TZN HI3QoyWOcZAAeuDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1621689960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=DvswALxdChTFapEObUC0pM6jedVcGRGe2OCKF1HRpL8=; b=XkzE784/Itnl77FMOuAw0bUaLKN+IU8ndImZwg3jgpsYO2CuRXINaCFvFietSPoW7tMTMn y6kHJeSZmOfvfu3EtuohM5+YD/HBdqBygAOFxeplA0Wt0zSQlNqLjKCeJNlOlfEq92IeoK f9ZWd1Ia95UulZfSKS2Bv0PfYT0MdZn+G3Dc7TX/XMowI2skV2K++DYQkg8LWfaXPnzN7r l2KvWHFG9ZbVZhXfDjllPz8SbKEcLs/bTgaRtAm9UGPSmOOHW4/mLXMxJ9/e/USquKfvzo iFQ79KwFMtAa+XJxOP4311uEwCrGNSgHSNoDJOfPddRH9eOyN0uqQrz1LgBbzQ== From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] vnstat 2.7: Adjusted 'traffic.cgi' to display 5-minute graphs Date: Sat, 22 May 2021 15:25:56 +0200 Message-Id: <20210522132556.3382-1-matthias.fischer@ipfire.org> 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" Signed-off-by: Matthias Fischer Reviewed-by: Peter Müller --- html/cgi-bin/traffic.cgi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/cgi-bin/traffic.cgi b/html/cgi-bin/traffic.cgi index cafccf73f..4846cfdf9 100644 --- a/html/cgi-bin/traffic.cgi +++ b/html/cgi-bin/traffic.cgi @@ -86,7 +86,10 @@ sub display_vnstat if ( $testdata =~ 'enough') { print"No data for $device !
"; } else { + # Summary system("/usr/bin/vnstati -c 1 -s -i $device -o /srv/web/ipfire/html/graphs/vnstat-s-$device.png"); + # 5-minute graphs + system("/usr/bin/vnstati -c 1 -5 -i $device -o /srv/web/ipfire/html/graphs/vnstat-5-$device.png"); # Hour graph system("/usr/bin/vnstati -c 1 -h -i $device -o /srv/web/ipfire/html/graphs/vnstat-h-$device.png"); # Day graph @@ -100,6 +103,7 @@ sub display_vnstat print < +