From owner-freebsd-questions@FreeBSD.ORG Thu Nov 8 08:22:27 2007 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A071616A417 for ; Thu, 8 Nov 2007 08:22:27 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from darklight.org.ru (ipv6.darklight.org.ru [IPv6:2001:470:1f07:84::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7101E13C4B0 for ; Thu, 8 Nov 2007 08:22:26 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from darklight.org.ru (yuri@darklight.org.ru [IPv6:::1]) by darklight.org.ru (8.14.2/8.14.2) with ESMTP id lA88MLWs018604; Thu, 8 Nov 2007 11:22:21 +0300 (MSK) (envelope-from yuri.pankov@gmail.com) Received: (from yuri@localhost) by darklight.org.ru (8.14.2/8.14.2/Submit) id lA88MKbF018603; Thu, 8 Nov 2007 11:22:20 +0300 (MSK) (envelope-from yuri.pankov@gmail.com) X-Authentication-Warning: darklight.org.ru: yuri set sender to yuri.pankov@gmail.com using -f Date: Thu, 8 Nov 2007 11:22:20 +0300 From: Yuri Pankov To: Per olof Ljungmark Message-ID: <20071108082220.GB18314@darklight.org.ru> References: <47322023.6060707@intersonic.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47322023.6060707@intersonic.se> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: questions@freebsd.org Subject: Re: syslog time resolution X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2007 08:22:27 -0000 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. Yuri