Date: Tue, 20 Feb 1996 15:20:14 -0300 (EST) From: "Lenzi, Sergio" <lenzi@cwbone.bsi.com.br> To: Ian Wynne <ianw@ee.usyd.edu.au> Cc: questions@freebsd.org Subject: Billing on ISP Message-ID: <Pine.BSF.3.91.960220145712.337D-100000@lenzi> In-Reply-To: <m0toc8I-000JnaC@cassius.ee.usyd.EDU.AU>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Feb 1996, Ian Wynne wrote:
> I'm setting up an Internet Provider Service using FreeBSD 2.1.
>
> I don't know how to get the user information for billing purposes,
> ie login and logout times and duration spent on the system.
>
I had the same type of problem here at bsi.com.br.
After billing the users using the "last" or "ac" command, I decided to
use an DBMS for that.
I use ingres (university ingres version 8.9).
1) The /etc/profile inserts data in the ingres database using:
ingres db <<%
range of m is account
append account (login="xxx",timein=$time,machine=uname,tty=$tty)
%
2) when the user logs-out, a program (ingresgetty) is executed.
3) this program does:
range of m is account
replace m (timeout=$time) where m.machine=$machine and m.tty=$tty and
m.timeout=0
4) This closes the entry in the ingres relation. and then,
the program execvp ("/usr/libexec/getty",argv);
for billing extracts, I use the query language of the ingres to retrieve
information and printing extracts. The data-base is also source for
consulting by the users of the isp using Netscape and a cgi-bin program
that asks for username and password and give uses the ammount of time
consummed during the month. Take a look at http://www.bsi.com.br/acc.html
5) Due my ISP is in Brazil, the answer for the query is in Portuguese, but
you can have an idea. Please use Netscape or Mosaic.
Hope this will help.
Sergio Lenzi.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960220145712.337D-100000>
