From owner-freebsd-hackers Sat Feb 20 22: 3:24 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from fledge.watson.org (FLEDGE.RES.CMU.EDU [128.2.93.229]) by hub.freebsd.org (Postfix) with ESMTP id 218AE11C49 for ; Sat, 20 Feb 1999 22:03:21 -0800 (PST) (envelope-from robert@cyrus.watson.org) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.8.8/8.8.8) with SMTP id XAA04183 for ; Sat, 20 Feb 1999 23:36:44 -0500 (EST) Date: Sat, 20 Feb 1999 23:36:43 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org Reply-To: Robert Watson To: hackers@freebsd.org Subject: Unique timestamp mechanism in kernel? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG For auditing support, I require a timestamp mechanism that guarantees a unique monotonically increasing time value expressed as a (second, nanosecond) tuple. Whether or not this serialization of events is a reasonable assumption is, of course, open to debate, but the POSIX spec seems to want it so I'm going along. Is there an existing mechanism to return such a value in the FreeBSD 4.0 kernel already? Monotime increases, but is not unique. nanotime reflects the current time but is not unique. If there isn't a mechanism, I'll just stick one in that fudges the time forwards to prevent a duplicate timestamp, but I'd rather rely on an existing mechanism if there is one. Also, on my cvsup from a few weeks ago, time(9) refers me to gettime(9) which appears not to exist. In the end I pulled what I needed out of kern/kern_clock.c. I can stick together a man page based on that if there isn't already one elsewhere that I am just missing for some reason :-). Thanks, Robert N Watson robert@fledge.watson.org http://www.watson.org/~robert/ PGP key fingerprint: 03 01 DD 8E 15 67 48 73 25 6D 10 FC EC 68 C1 1C Carnegie Mellon University http://www.cmu.edu/ TIS Labs at Network Associates, Inc. http://www.tis.com/ SafePort Network Services http://www.safeport.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message