syslog time resolution

Yuri Pankov yuri.pankov at
Thu Nov 8 00:22:27 PST 2007

On Wed, Nov 07, 2007 at 09:29:23PM +0100, Per olof Ljungmark wrote:
> Hi,
> I would like to increase the number of decimals reported in logfiles by 
> syslogd(8), anyone knows if it is possible and perhaps a hint on how to do 
> it?
> tcpdump for instance, has six decimals: 21:25:20.160833 whereas the 
> standard syslog has zero decimal secs.
> I am only referring to events within a single system so it's not related to 
> clock accuracy.
> Thanks and sorry if I missed the obvious!
> --per

Guessing on syslogd source (src/usr.sbin/syslogd/syslogd.c, line ~900)
time() and ctime() functions are used to get timestamps, which return
only full seconds. So, if I'm not mistaken, there's no easy way to get
desired behaviour from base's syslogd.


More information about the freebsd-questions mailing list