From owner-freebsd-questions@FreeBSD.ORG Tue Jan 4 13:26:12 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0414916A4CE for ; Tue, 4 Jan 2005 13:26:12 +0000 (GMT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id B58EF43D45 for ; Tue, 4 Jan 2005 13:26:11 +0000 (GMT) (envelope-from infofarmer@mail.ru) Received: from [83.237.208.123] (port=1242 helo=[172.17.0.69]) by mx2.mail.ru with esmtp id 1ClohO-00042J-00; Tue, 04 Jan 2005 16:26:10 +0300 Message-ID: <41DA9974.5010504@mail.ru> Date: Tue, 04 Jan 2005 16:26:12 +0300 From: "Andrew P." User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alexandr Lookoshkoff References: <1325122753.20050104154355@inbox.ru> In-Reply-To: <1325122753.20050104154355@inbox.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam: Not detected cc: FreeBSD-Questions Questions Subject: Re: traffic counting X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: infofarmer@mail.ru List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2005 13:26:12 -0000 Alexandr Lookoshkoff wrote: > How to make such thing as traffic counting? > > There is a gateway (with NAT) and a local network. Every month > i must send a report how many traffic get everybody. > > ipfw count ... > Counters zeroed every reboot (so - everyday) I currently have a script, running every minute, which adds all counters to ones in a file and zeros them. I don't have daily/weekly statistics collected, but that's easily implemented. I also wrote a simple C program, which saves counter infoformation without zeroing them. A very simple CGI script shows every user in a network their personal traffic count. Это не так сложно. > How to collect and store these counters? And how to list a summary > trafic (by days if possible)? > Best wishes, Andrew P.