Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Feb 1999 23:36:43 -0500 (EST)
From:      Robert Watson <robert@cyrus.watson.org>
To:        hackers@freebsd.org
Subject:   Unique timestamp mechanism in kernel?
Message-ID:  <Pine.BSF.3.96.990220233216.3531C-100000@fledge.watson.org>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990220233216.3531C-100000>