From owner-freebsd-hubs Sun Apr 6 05:42:21 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA19600 for hubs-outgoing; Sun, 6 Apr 1997 05:42:21 -0700 (PDT) Received: from time.cdrom.com (root@time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA19595 for ; Sun, 6 Apr 1997 05:42:15 -0700 (PDT) Received: from time.cdrom.com (jkh@localhost [127.0.0.1]) by time.cdrom.com (8.8.5/8.6.9) with ESMTP id FAA02036; Sun, 6 Apr 1997 05:39:30 -0700 (PDT) To: Taavi Talvik cc: hubs@FreeBSD.ORG Subject: Re: stats?? *whine* :-} In-reply-to: Your message of "Sun, 06 Apr 1997 15:12:24 +0300." Date: Sun, 06 Apr 1997 05:39:30 -0700 Message-ID: <2032.860330370@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-hubs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Dou you have any scripts which extract relevant statistics and send them > in uniform way? Well, assuming that you have a reasonably standard FTP log record, e.g. lines like this: Sun Apr 6 10:04:57 1997 1 megillah.demos.su 4606 /.16/FreeBSD/FreeBSD-stable/src/libexec/getty/init.c b _ o a root@megillah.demos.su Then this will generate a daily download summary: #!/bin/sh if [ $? -lt 1 ]; then file=/var/log/xferlog.day else file=$1 fi date=`ls -l $file | awk '{print $6 " " $7 " " $8}'` echo "FreeBSD downloads over last 24 hours (up to $date) from `uname -n`:" awk '/XXXsomeplaceXXX\/FreeBSD\/.*\/bin\/bin.aa/ { files[$9]++; } END { for (i in files) printf("\t%s\t%4d copies.\n", i, files[i]); }' $file | sed -e 's;/XXXsomeplaceXXX/FreeBSD/\(.*\)/bin/bin.aa;\1;' Where "XXXsomeplaceXXX" is the root of your full path to the FreeBSD directory. Feel free to use this as a template - it's what I'm using right now to send ftp.freebsd.org's stats to freebsd-stats@freebsd.org Jordan