Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!9531sons%UCSBUXA.BITNET@WISCVM.WISC.EDU From: 9531sons@WISCVM.WISC.EDU Newsgroups: comp.unix.wizards Subject: CPU Accounting Message-ID: <9737@brl-adm.ARPA> Date: Mon, 12-Oct-87 21:26:43 EDT Article-I.D.: brl-adm.9737 Posted: Mon Oct 12 21:26:43 1987 Date-Received: Wed, 14-Oct-87 02:10:46 EDT Sender: news@brl-adm.ARPA Lines: 20 I am moving from a PDP11/70 (running BSD 2.9) to a SUN 3/280 and am moving my "old" accounting code. Here, at UCSB, we charge UNIX users for CPU seconds and, in fact, have three different CPU rates depending on which time of the day the command was executed. Several years ago I modified the BSD 2.8 program "sa" to fit our local needs. I installed the program on a SUN I have found that lots of SUN commands seem to be executing is less than a second! I tried the same code on a neighboring VAX 11/780 (4.2 UNIX) and the same thing seems to occur. My results do match up with what /etc/sa is producing, so if I'm missing values then I'd guess /etc/sa (BSD 4.2) is also. The acct structure contains two fields I am concerned with, ac_utime and ac_stime, these values appear to (often) be 0. Occasionally a good nroff will generate a couple of seconds but for the most part we get 0. Is the number of seconds in ac_utime and ac_stime accurate? Jamie Sonsini UC Santa Barbara