From owner-freebsd-questions@FreeBSD.ORG Mon Dec 15 17:50:32 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 480351065673 for ; Mon, 15 Dec 2008 17:50:32 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 82A608FC1E for ; Mon, 15 Dec 2008 17:50:31 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id mBFHo5ej055856; Mon, 15 Dec 2008 18:50:05 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id mBFHo4Vt055853; Mon, 15 Dec 2008 18:50:05 +0100 (CET) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 15 Dec 2008 18:50:04 +0100 (CET) From: Wojciech Puchar To: Polytropon In-Reply-To: <20081215150931.dbc8ea64.freebsd@edvax.de> Message-ID: <20081215184718.P55852@wojtek.tensor.gdynia.pl> References: <20081215150931.dbc8ea64.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Questions Subject: Re: Uptime logging with (maybe) ppp's log functionality X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 17:50:32 -0000 > > I'm going to setup a system with a dial-up modem for sporadic > Internet access; a provider that charges per second online time > is used. Is there a way ppp (which is used for dialing) can log > the online time (or at least the connection's start and stop time) > so the costs can be calculated? option a: simply make a script (say ppp-bill.sh) that will browse through logs and search for lines indicating connection and disconnect option b: you may put anything to /etc/ppp/ppp.link{up,down} scripts, for example linkup could record current time, then linkdown substract it from what linkup recorded, multiply by price and you have logged how much each connection cost you