From owner-freebsd-isp Tue Aug 19 16:16:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA12584 for isp-outgoing; Tue, 19 Aug 1997 16:16:27 -0700 (PDT) Received: from panda.hilink.com.au (panda.hilink.com.au [203.8.15.25]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA12578 for ; Tue, 19 Aug 1997 16:16:22 -0700 (PDT) Received: (from danny@localhost) by panda.hilink.com.au (8.8.5/8.8.5) id JAA09427; Wed, 20 Aug 1997 09:16:10 +1000 (EST) Date: Wed, 20 Aug 1997 09:16:09 +1000 (EST) From: "Daniel O'Callaghan" To: Brandon Gillespie cc: Nicholas Merrill , freebsd-isp@FreeBSD.ORG Subject: Re: WinNT to FreeBSD In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Tue, 19 Aug 1997, Brandon Gillespie wrote: > On Tue, 19 Aug 1997, Nicholas Merrill wrote: > > At 02:35 AM 8/20/97 +0800, you wrote: > > >We are currently operating an ISP under Windows NT Server 4, and are > > >seriously thinking about changing and running it under FreeBSD 2.2.2. > > > > > >There is only one thing holding us back, it is very important that we keep > > >track of our users, such as login times and length of login plus how much > > >they are downloading per call. > > > > > >Windows NT displays all this information easily, I have not yet found a > > >way to receive the same level of info from FreeBSD .. Can anyone please > > >suggest some ideas? As we _REALLY_ want to change over ASAP. > > > > > >Thank you, > > >Jason McKay. > > > > Actually I heard it wasn't possible to track any information like that > > with FreeBSD. That may be the one edge that NT has in this competition. > > It is. Everything is logged. You can either use the 'last' command [man > last(1)], or write your own interface to the last log [man utmp(5)]. Both > of these options are trivial. I am not as sure what to do if you want to > know byte information, a simple approach may be to have their logout > script call netstat, ala: > > netstat -b -I INTERFACE > > (where INTERFACE is their current interface--i.e. their ppp interface, do > 'netstat -i' to see them all) > > You may have some problems in determining the interface. I'm sure I could > figure out a simple way to do it, given enough time--of which I have not > much of :) This should at least give you some pointers of where to look. This is why I made sliplogin, pppd and ppp (thanks Brian) generate a file in /var/run which gives the sl/ppp/tun interface of the daemon attached to a particular tty. e.g. /var/run/ttyd0.if contains "ppp0". Since 'w' tells you the tty the user is on (from /var/run/utmp), it is a simple hop to get the sl/ppp/tun interface they are using. /* Daniel O'Callaghan */ /* HiLink Internet danny@hilink.com.au */ /* FreeBSD - works hard, plays hard... danny@freebsd.org */