From owner-freebsd-hackers Sat Jan 27 08:25:09 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA16621 for hackers-outgoing; Sat, 27 Jan 1996 08:25:09 -0800 (PST) Received: from alex.iet.unipi.it (alex.iet.unipi.it [131.114.9.235]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id IAA16616 for ; Sat, 27 Jan 1996 08:25:03 -0800 (PST) Received: (from vicisano@localhost) by alex.iet.unipi.it (8.6.12/8.6.12) id RAA21654; Sat, 27 Jan 1996 17:10:20 +0100 Date: Sat, 27 Jan 1996 17:10:19 +0100 (MET) From: Lorenzo Vicisano To: hackers@freefall.freebsd.org Subject: ac_btime field of acct (process accounting) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG Precedence: bulk As I am interested in evaluating statistics on process arrival time at a given machine, I thought of using the BSD kernel process accounting facility. Unfortunately the `ac_btime' field of `acct' struct only contains seconds since the Epoch (I would like to have bigger resolution). One possible solution to the problem is to modify `ac_btime' contents (not its size) fitting there some bits for fraction of second without loosing any information on Epoch. To do that you can exploit the fact that most significant bits of `ac_btime' change very slowly. I noticed that `lastcomm' is the only tool that uses that field (is it true?), so the unique that has to be modified, except `acct_process()' routine in the kernel. Any advice/comments? Thanks, Lorenzo. <|--------------------------------------------------------------------------|> | Lorenzo Vicisano | http://www.iet.unipi.it/~vicisano | | Dip. di Ingegneria dell'Informazione | e-mail vicisano@iet.unipi.it | | Universita' di Pisa | Phone +39-50-568654 | | Via Diotisalvi, 2 56100 PISA, ITALY | Fax +39-50-568522 | <|--------------------------------------------------------------------------|>