Uptime and pf stats difference.
Hi all, I came across this curiosity, it looks like the firewall was running ~4 minutes before the computer booted. Wouldn't be a bad idea I guess. I have checked 3.8 and 3.9 and such difference is not there, although those machines have only weeks of uptime. [11:15:[EMAIL PROTECTED]:~$ uname -a OpenBSD ns4.com 3.7 ASROCK_15Jul05#0 i386 [11:16:[EMAIL PROTECTED]:~$ uptime 11:16AM up 440 days, 22:15, 1 user, load averages: 0.39, 0.26, 0.19 [11:16:[EMAIL PROTECTED]:~$ ls -al /var/run/dmesg.boot -rw-r--r-- 1 root wheel 16027 Aug 11 2005 /var/run/dmesg.boot [11:16:[EMAIL PROTECTED]:~$ sudo pfctl -s info Status: Enabled for 440 days 22:20:03 Debug: Urgent Hostid: 0xcda0de08 . Regards, Myself..
Re: Uptime and pf stats difference.
RCF wrote: [11:16:[EMAIL PROTECTED]:~$ uptime 11:16AM up 440 days, 22:15, 1 user, load averages: 0.39, 0.26, 0.19 [11:16:[EMAIL PROTECTED]:~$ sudo pfctl -s info Status: Enabled for 440 days 22:20:03 Debug: Urgent I guess your time was off by a few minutes when you started your computer. Uptime seems unaffected by changing the clock, while I guess pfctl just calculates the time difference between now and the time it was started. $ sudo date 02; sudo pfctl -d; sudo pfctl -e; sudo pfctl -si | head -n1 Thu Oct 26 13:02:00 CEST 2006 pf disabled pf enabled Status: Enabled for 0 days 00:00:00 Debug: Urgent ^^^ All is well $ sudo date 03; sudo pfctl -si | head -n1 Thu Oct 26 13:03:00 CEST 2006 Status: Enabled for 0 days 00:01:00 Debug: Urgent ^^^ Oops $ sudo date 01; sudo pfctl -si | head -n1 Thu Oct 26 13:01:00 CEST 2006 Status: Enabled for 49710 days 06:27:16 Debug: Urgent ^^^ D'oh! Don't know if there is much to do about it. Maybe a sanity check a la time = (start stop ? stop - start : 0) or so, if someone should care enough. /Alexander
Re: Uptime and pf stats difference.
The server had been in testing for almost a month with rdate configured to run every 6 hours before I rebooted. So I don't really think the clock was off. On 26/10/06, Alexander Hall [EMAIL PROTECTED] wrote: RCF wrote: [11:16:[EMAIL PROTECTED]:~$ uptime 11:16AM up 440 days, 22:15, 1 user, load averages: 0.39, 0.26, 0.19 [11:16:[EMAIL PROTECTED]:~$ sudo pfctl -s info Status: Enabled for 440 days 22:20:03 Debug: Urgent I guess your time was off by a few minutes when you started your computer. Uptime seems unaffected by changing the clock, while I guess pfctl just calculates the time difference between now and the time it was started. $ sudo date 02; sudo pfctl -d; sudo pfctl -e; sudo pfctl -si | head -n1 Thu Oct 26 13:02:00 CEST 2006 pf disabled pf enabled Status: Enabled for 0 days 00:00:00 Debug: Urgent ^^^ All is well $ sudo date 03; sudo pfctl -si | head -n1 Thu Oct 26 13:03:00 CEST 2006 Status: Enabled for 0 days 00:01:00 Debug: Urgent ^^^ Oops $ sudo date 01; sudo pfctl -si | head -n1 Thu Oct 26 13:01:00 CEST 2006 Status: Enabled for 49710 days 06:27:16 Debug: Urgent ^^^ D'oh! Don't know if there is much to do about it. Maybe a sanity check a la time = (start stop ? stop - start : 0) or so, if someone should care enough. /Alexander
Re: Uptime and pf stats difference.
On Thu, Oct 26, 2006 at 12:44:25PM +0100, RCF wrote: The server had been in testing for almost a month with rdate configured to run every 6 hours before I rebooted. So I don't really think the clock was off. Clocks naturally drift over time. Four minutes over about 1.5 years seems reasonable.
Re: Uptime and pf stats difference.
RCF wrote: The server had been in testing for almost a month with rdate configured to run every 6 hours before I rebooted. So I don't really think the clock was off. I don't have this issue, but if you're running rdate every six hours, you might want to 'man ntpd' instead.