From owner-freebsd-hubs Thu Nov 21 7:33:28 2002 Delivered-To: freebsd-hubs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCBFA37B401; Thu, 21 Nov 2002 07:33:26 -0800 (PST) Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 886FC43E88; Thu, 21 Nov 2002 07:33:25 -0800 (PST) (envelope-from langd@informatik.tu-muenchen.de) Received: from mailrelay1.informatik.tu-muenchen.de (mailrelay1.informatik.tu-muenchen.de [131.159.254.5]) by mailout.informatik.tu-muenchen.de (Postfix) with ESMTP id EA2EB6167; Thu, 21 Nov 2002 16:33:22 +0100 (MET) Received: from atrbg11.informatik.tu-muenchen.de (atrbg11.informatik.tu-muenchen.de [131.159.42.129]) by mailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id D49607942; Thu, 21 Nov 2002 16:33:22 +0100 (MET) Received: by atrbg11.informatik.tu-muenchen.de (Postfix, from userid 20455) id 64F6813AE7; Thu, 21 Nov 2002 16:33:17 +0100 (CET) Date: Thu, 21 Nov 2002 16:33:17 +0100 From: Daniel Lang To: Alexandr Kovalenko Cc: Murray Stokely , hubs@FreeBSD.ORG, re@FreeBSD.ORG Subject: Re: 4.7 Download Statistics Message-ID: <20021121153317.GG44442@atrbg11.informatik.tu-muenchen.de> References: <20021010082732.G1982@freebsdmall.com> <20021010155247.GB20985@atrbg11.informatik.tu-muenchen.de> <20021010090635.K1982@freebsdmall.com> <20021030114453.GA29081@atrbg11.informatik.tu-muenchen.de> <20021111145038.GA54392@nevermind.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021111145038.GA54392@nevermind.kiev.ua> X-Geek: GCS/CC d-- s: a- C++$ UBS++++$ P+++$ L- E-(---) W+++(--) N++ o K w--- O? M? V? PS+(++) PE--(+) Y+ PGP+ t++ 5+++ X R+(-) tv+ b+ DI++ D++ G++ e+++ h---(-) r++>+++ y+ User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hubs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Dear Alexandr, sorry for my late answer, you mail vanished down the stack. :-/ Alexandr Kovalenko wrote on Mon, Nov 11, 2002 at 04:50:38PM +0200: [..] > > I finally can come up with some statistics: > What ftpd are you using? > If stock ftpd, could you please supply a script to calculate those stats? :) I use proftpd, not the stock one. The script is dead simple. I just grep the RETR lines from the xferlog with the directory/section (e.g. FreeBSD) and count the byte-fields: #!/usr/bin/perl -w # # $Id$ # # Small script to count the lines and sum up the # bytes of the fed-in input lines # must be in "leolog" format # use strict; my $count = 0; my $bytes = 0; while() { if(/RETR\s+.*\s\(\"RETR .*\"\) took .* for (\d+) bytes/) { ++$count; $bytes += $1; } } my $mbytes = $bytes / 1024.0 / 1024.0; my $gbytes = $mbytes / 1024.0; printf "Count: $count\nBytes: $bytes\nMBytes: %.2f\nGBytes: %.2f\n", $mbytes, $gbytes; __END__ -- IRCnet: Mr-Spock - "I hear that, if you play the WindowsXP CD backwards, you get a Satanic message!" - "That's nothing. If you play it forward, it installs WindowsXP!" Daniel Lang * dl@leo.org * +49 89 289 18532 * http://www.leo.org/~dl/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hubs" in the body of the message