Sys V accounting
Paul De Bra
debra at alice.UUCP
Sat Mar 4 14:22:21 AEST 1989
In article <18528 at adm.BRL.MIL> mchinni at ARDEC.ARPA (Michael J. Chinni, SMCAR-CCS-E) writes:
>Help!
>
>I am trying to set up the Sys V accouinting system on our Gould NP1 (bsd 4.3).
>
>I understand everything (I think) except the /usr/adm/fee file used by
>"chargefee". My manual says "chargefee loginname feeunit" will give me a line
>in /usr/adm/fee:
> uid loginname 0 0 0 0 0 0 0 0 0 0 feeunit
>but does not explain what the zeros and the feeunit mean. It does say that uid
>is the UID of user loginname.
>
>We intend to charge users fees for various services used on our system, but we
>can't set fees until we know what we can charge for (other than connect time).
>
>Also, is there a way to charge users by an account-charge-code ? For instance,
>user1 and user2 are doing work on project x and project y. Can we charge for
>project x work separate from project y work rather than charging user1 and
>user2?
>
Unix accounting is in general unreliable and primitive. There are a number of
questions to ask yourself before using much of the accounting software:
1) you can charge for disk-blocks used per user. but if user A has 2 files
of 512 bytes and user B has 1 1k file, should user A be charged twice as
much just because the system block size is 1k ? (actually 1k is the fragment
size, not the block size)
2) you can charge for connect time, but should I be charged extra if my
compile takes longer because of other activity on the system?
3) you can charge for cpu time, but should I be charged for cpu time spent
on page-faults because of other processes occupying memory while my
program runs? i.e. is it fair that exactly the same job doesn't cost
the same every time you run it?
4) you may want to encourage running jobs at lower priority but the accounting
does NOT record this. Do you want to charge as much for low priority jobs
as for high priority jobs? (you have no other alternative)
5) after some relatively short time the recorded times become negative because
of errors in the processing of the times that supposedly are some weird
but nonetheless unsigned type. how are you going to solve that?
As for your other question, Unix only knows about users and groups, and the
accounting only about users. If a user works on 2 projects that need to be
charged separately, you will need 2 logins. By putting both logins in a
separate group the user can still write all his files by giving the group
write permission.
My conclusion is that the accounting isn't accurate enough for precise
record keeping, but for rough estimates it can be used. It does take some
effort to read the reports and figure out what went wrong, because the
records are often wrong.
Paul.
--
------------------------------------------------------
|debra at research.att.com | uunet!research!debra |
------------------------------------------------------
More information about the Comp.unix.questions
mailing list