From patchwork Mon Apr 13 07:45:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 2945 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 "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4910zg35hgz3yC0 for ; Mon, 13 Apr 2020 07:46:07 +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 "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4910zZ2JlZz2kw; Mon, 13 Apr 2020 07:46:02 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4910zZ19ZKz2yXv; Mon, 13 Apr 2020 07:46: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 "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4910zW4gM0z2yP9 for ; Mon, 13 Apr 2020 07:45:59 +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) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 4910zW150YzRj; Mon, 13 Apr 2020 07:45:59 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1586763959; 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=Uj09bSH7nylYrdw8LbztSmDQL4xooUJWRJtfkoFgLX4=; b=Tf0NV/lnrc+jgEE9Yu75ljUh3rOIEo23USz38HYoxw4Gh2Em8fgzXxaY9jbxMIRcIftz4X VR26Lc6TYIQlQaBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1586763959; 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=Uj09bSH7nylYrdw8LbztSmDQL4xooUJWRJtfkoFgLX4=; b=CsJ/JChRgmprJsInB7tigbxg/nSIkdWx4LGdLd9VapoDaJzAxD9bKji1joxE2U4lW5gE0n 8Ql6PO+2ymgQZsG1YNk1tX8vBUj1TFcRKmiy7vJY2oslb65H4SpGTgPtgCCU33enVPKyzQ eICKwO/dxcJwZOSCltLOlRFS9bcuMastrBdN5Ir0frYSYoRp2HtXMaHWhbTg8tapzNr0SH gCbe8E2HwvYLH/4k80zWyG2WHI6td62Y92fBwfm+ru1auzT2nXnfmd35c+mUUVIc1ZhOQs KWrFBd4gjhXve+a3t//R/NPR1/JZe9bm7go4dOFuKcG/PZu9Zb66xmLhVVFuKw== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 05/19] ovpnclients.dat: Display traffic details in a human-readable format. Date: Mon, 13 Apr 2020 09:45:36 +0200 Message-Id: <20200413074550.2735-5-stefan.schantl@ipfire.org> In-Reply-To: <20200413074550.2735-1-stefan.schantl@ipfire.org> References: <20200413074550.2735-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=stefan.schantl@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: Stefan Schantl --- html/cgi-bin/logs.cgi/ovpnclients.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/logs.cgi/ovpnclients.dat b/html/cgi-bin/logs.cgi/ovpnclients.dat index bb7bdfb7b..b601fd292 100755 --- a/html/cgi-bin/logs.cgi/ovpnclients.dat +++ b/html/cgi-bin/logs.cgi/ovpnclients.dat @@ -250,8 +250,8 @@ while(my @row = $statement_handle->fetchrow_array()) { my $connection_name = $row[0]; my $connection_open_time = $row[1]; my $connection_close_time = $row[2]; - my $connection_bytes_recieved = $row[3]; - my $connection_bytes_sent = $row[4]; + my $connection_bytes_recieved = &General::formatBytes($row[3]); + my $connection_bytes_sent = &General::formatBytes($row[4]); # Colorize columns. if ($lines % 2) {