usage accounting
Malaclypse the Elder
dwc at homxc.UUCP
Sun Nov 13 04:50:53 AEST 1988
In article <1156 at orion.cf.uci.edu>, fredv at orion.cf.uci.edu (Fred Velijanian) writes:
>
> I'd like to charge users less who run their processes at a lower priority
> (i.e. nice'd). Unfortunately I cannot find any applicable fields
> stored in the system accounting file. (structure defined in <sys/acct.h>)
> Is it possible to tag each process such that this information can be
> recorded in the accounting file? Running a special program which sets the
> "nice" priority and then execs the user's command is also acceptable, however
> all processes created by the user's command need to be considered as well.
>
if it is the cpu that you are charging for (since you are looking at
'nice') one thing that you might want to do is charge according to
'cpu intensiveness'. that is, irrespective of the nice value, if a
program uses the cpu at 'a reasonable rate', then charge them less.
how do you tell the rate of cpu use for a process? look at the actual
cpu time versus the elapsed time.
of course, you will have to normalize with respect to system load.
send me mail if you want to discuss this more.
danny chen
att!homxc!dwc
More information about the Comp.unix.questions
mailing list