From owner-freebsd-questions@FreeBSD.ORG Tue Oct 4 14:46:00 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 830D1106566C for ; Tue, 4 Oct 2011 14:46:00 +0000 (UTC) (envelope-from web@3dresearch.com) Received: from smtp.3dresearch.com (dorabella.3dresearch.com [66.167.251.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3726C8FC17 for ; Tue, 4 Oct 2011 14:45:59 +0000 (UTC) Received: from fracasso.3dresearch.com (pool-72-95-206-99.pitbpa.east.verizon.net [72.95.206.99]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vmail.3dresearch.com (Postfix) with ESMTP id 34E8D11698F; Tue, 4 Oct 2011 10:45:59 -0400 (EDT) Received: from fracasso.3dresearch.com (localhost [127.0.0.1]) by fracasso.3dresearch.com (Postfix) with SMTP id A43725C19; Tue, 4 Oct 2011 10:45:58 -0400 (EDT) Date: Tue, 4 Oct 2011 10:45:48 -0400 From: Janos Dohanics To: Robert Bonomi Message-Id: <20111004104548.7225482b.web@3dresearch.com> In-Reply-To: <201110040905.p9495mLF001446@mail.r-bonomi.com> References: <20111004002910.4c134251.web@3dresearch.com> <201110040905.p9495mLF001446@mail.r-bonomi.com> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.6; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: Timestamps shifted by 8 hours 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: Tue, 04 Oct 2011 14:46:00 -0000 On Tue, 4 Oct 2011 04:05:48 -0500 (CDT) Robert Bonomi wrote: > > > Date: Tue, 4 Oct 2011 00:29:10 -0400 > > From: Janos Dohanics > > To: FreeBSD Questions > > Subject: Timestamps shifted by 8 hours > > > > I have pfSense-2.0 for gateway/firewall (10.10.10.2). > > > > 10.10.10.2 logs to 10.10.10.252, which runs FreeBSD 7.4-STABLE. > > > > 10.10.10.252 is the ntpd server for this LAN. > > > > On 10.10.10.2: > > > > date > > Tue Oct 4 00:00:42 EDT 2011 > > > > On 10.10.10.252: > > > > $date > > Tue Oct 4 00:00:50 EDT 2011 > > (just after logging out of 10.10.10.2, so they seem to be in sync) > > > > However, timestamps in pfsense.log, residing on 10.10.10.252, are > > shifted by 8 hours, for example: > > > > $ tail -f /var/log/pfsense.log > > Oct 4 09:00:01 10.10.10.2 pf: 00:00:00.748775 rule 1/0(match): > > [...] ^^^^^^^^ > > > > I guess I should read some man page... > > I'll take your word that the 'error' is 8 hours. > > Presuming that pfsense is logginvg via 'syslog', then, -on- the .252 > machine, try using the 'logger' commnd to send messages to the > pfsense log file. you'll need the '-p' switch to get the right > facility and seveity level. > > *IF this logs with the 'wrong' time, then you have a 'local' problem > onf the .252 machine. It is booting up with the *wrong* timezone (GMT > +4) specified for 'local' time -- and _that_ timezone is in effect > when syslog starts. But, by the time you complete an interactive > login, the 'environment' for your session says the timezone is > US/Eastern (GMT-4), so a 'date' command, from the shell prompt, shows > a grossly different offset from GMT than what the syslog deamon > thinks the offset is. > > *IF* 'logger' items from the .252 machine post correctly, then you > need to try running 'logger' on the pfsense box, -first-, explicitly > telling logger the -remote- (i.e., the .252 machine) host/port to log > to, then -second-, _not_ specifying any host. and see how those log. Thank you; I asked the wrong question in my first post: http://lists.freebsd.org/pipermail/freebsd-questions/2011-October/234214.html -- Janos Dohanics