From owner-freebsd-questions@FreeBSD.ORG Tue Oct 11 20:40:36 2011 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 C30AA106566C for ; Tue, 11 Oct 2011 20:40:36 +0000 (UTC) (envelope-from cjr@cruwe.de) Received: from cruwe.de (cruwe.de [188.40.164.98]) by mx1.freebsd.org (Postfix) with ESMTP id 47D3A8FC17 for ; Tue, 11 Oct 2011 20:40:36 +0000 (UTC) Received: from cruwe.de (unknown [127.0.0.4]) by cruwe.de (Postfix) with ESMTP id A44132866A for ; Tue, 11 Oct 2011 20:23:36 +0000 (UTC) Received: by cruwe.de (Postfix, from userid 65534) id 783AB28668; Tue, 11 Oct 2011 20:23:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.cruwe.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=4.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 Received: from dijkstra (p5B37AAA9.dip.t-dialin.net [91.55.170.169]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by cruwe.de (Postfix) with ESMTPSA id ED83A28664; Tue, 11 Oct 2011 20:23:33 +0000 (UTC) Date: Tue, 11 Oct 2011 22:23:27 +0200 From: "Christopher J. Ruwe" To: freebsd-questions@freebsd.org Message-ID: <20111011222327.6002c397@dijkstra> In-Reply-To: <20111011160619.840c69f8.freebsd@edvax.de> References: <20111011160619.840c69f8.freebsd@edvax.de> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV on mail.cruwe.de using ClamSMTP Cc: Polytropon Subject: Re: Turning system accounting data into money 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: Tue, 11 Oct 2011 20:40:36 -0000 On Tue, 11 Oct 2011 16:06:19 +0200 Polytropon wrote: > This is _not_ a spam message trying to sell something > stupid to the list. I'm just searching for a solution > to turn consumed computing resources into a number and > a currency symbol. :-) > > Reason: A growing amount of (my) customers seems to > like this concept: They speed a low fee for access to > systems and applications, and they want to pay according > to what they did with that system. The access fee covers > access and some basic services (backup & quota), and for > anything "more advanced" they want to be charged per > "units" used, or per "consumed resources". This can be dialog > time (SSH), disk I/O, disk occupied, pages printed (can happen) > or pages required to print on exceptional specific forms > (can happen once or twice a year and is charged with an > additional fee for fold, staple & mutilate). > > Sounds stupid? I have _real_ customers intendedly > requesting that payment model (instead of "just pay > amount n Euro a month and do whatever you like"). > > Accidentally, I remembered history. > > So I thought: This funcitonality has been present on > UNIX systems for many decades. But _how_ to use it? I > know there's the command set for accounting, for example > the "ac" command. But what does its output "total 7264.15" > mean? There also are "acct" (process accounting), "sa" > (for system accounting) and "pac" (for printer accounting, > just dooesn't seem to work with CUPS). > > I'd also like to use the /etc/csh.logout resp. ~/.logout > mechanism. When a user logs in, he will be presented the > program he uses (or a menu, in case he uses different ones). > This can also be a regular "remote desktop" session. When > he logs out, a message should be displayed that informs > him how much will be charged for the session. At the end > of the month, he should get an invoice with the proper > accumulated amount. > > For example, if a user wishes to issue a "make a backup > _now_, because I intendedly want _this_ current state > backed up _now_", this will be seen as additional I/O > load and disk occupation (because it's handled aside of > the regular backup runs that should be part of the > "basic package" charged with the "conneciton fee"). > Or as I said, he issues printing for stuff he cannot > print at home, so he will be charged for 500 pages. > And in case he transfers 10 GB data in, and 10 GB data > out, he will be charged for that traffic, as well as > for the I/O. > > The sessions in questions will be SSH sessions (text mode) > as well as SSH/X sessions (remote desktops). > > Maybe someone already uses something similar he wants > to share? Suggestions and inspirations are welcome. > > Cannot be of any direct help, but ... You remember that 'astronomer chases hacker on Berkely computer systes'- novel, Cliff Stoll: The Cookoo's Egg? If not, try wikipedia. As an aside, I was told that at some universities' CS-classes, it is required lecture. In that novel, user's departments where charged according to resources spent on the university's computers and the main figure was tasked to find out about a 0.75$ accounting error and found a hacker instead. The system in the novel was a Berkeley Unix. So, systems that do what you want (and customers who want to pay on a per use basis) must be around for quite some time. The novel is copyrighted 1989, I cannot track when the real event circling around a certain Markus Hess, cf. also wikipedia, took place. My guess about the system is 4.3BSD Tahoe or earlier 4.3BSD. Cheers, -- Christopher J. Ruwe TZ GMT + 2