fredv@orion.cf.uci.edu (Fred Velijanian) (11/08/88)
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. Os used: Sequent DYNIX V3.0.12. Has anyone encountered this type of problem, any solutions? Thanks in advance, Fred Velijanian University of California, Irvine. fredv@orion.cf.uci.edu
dwc@homxc.UUCP (Malaclypse the Elder) (11/13/88)
In article <1156@orion.cf.uci.edu>, fredv@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
rml@hpfcdc.HP.COM (Bob Lenk) (11/19/88)
> 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>) It would be difficult to put in a single priority/nice value that was meaningful, without adding complexity to the clock interrupt code. Just recording the nice value at a single instant (probably process termination) isn't reasonable. A process doesn't deserve a discount because it ends with: nice(20); exit(0); Bob Lenk hplabs!hpfcla!rml rml%hpfcla@hplabs.hp.com