Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Aug 2001 14:16:15 -0400
From:      Technical Information <tech_info@threespace.com>
To:        Mark Ovens <marko@freebsd.org>
Cc:        FreeBSD Chat <chat@freebsd.org>
Subject:   Re: calculating uptime
Message-ID:  <4.3.2.7.2.20010811140656.0181bc88@threespace.com>
In-Reply-To: <20010811165908.B275@parish>
References:  <4.3.2.7.2.20010809225151.017e6580@threespace.com> <4.3.2.7.2.20010809225151.017e6580@threespace.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 11:59 AM 8/11/2001, Mark Ovens wrote:
>On Thu, Aug 09, 2001 at 11:55:45PM -0400, Technical Information wrote:
> > I currently run Windows and Linux about evenly now,
>
>What about FreeBSD?

The XFree86 3.3.6 included with the latest shipping version of FreeBSD 4.3 
didn't have drivers for my fancy Voodoo 5 video card.  So until I figure 
out how to install XFree86 4.1 on FreeBSD without using sysintall, I'm 
running Red Hat 7.1.  Interestingly, I do occasionally run FreeBSD in 
emulation on the Red Hat system.



> > going several days at a
> > time between voluntary reboots to switch to another OS.  I got curious
> > about how many of my reboots aren't voluntary (i.e., due to
> > crashes/instability) so I started paying attention to the uptime.
> >
> > Since Windows has no uptime command,
>
>W2K does, although it cheats. If you "suspend to disk" and then resume it 2
>weeks later it includes those 2 weeks in the uptime.

So what about FreeBSD and other forms of UNIX?  Do they increment their 
uptime while they sleep?  I mean, in some respects it seems fair.  The 
system is sleeping, not completely off.  Much in the same way that you 
still age while you sleep, so the age of a 36-year-old still include the 12 
or so years during which that person has slept.

What brought about my question is that the Windows utilities that I 
downloaded exhibit different behaviour in this regard, and I'm wondering 
which is really "correct."  I've never put a UNIX system to sleep, but how 
does UNIX do it?



> > I downloaded a few available utilities
> > designed to give the time since the OS was booted.  The utilities I got
> > seem to work differently.  Some of them seem to calculate the difference
> > between the current time and the boot time, and others seem to count the
> > number of system ticks(*).  Since I tend to put my computer to sleep while
> > I'm not using it, this creates a pretty large discrepancy between the
> > reported uptimes during the course of a week.
> >
> > My question is, what *is* the correct way to calculate uptime?  Does the
> > time that a computer is sleeping count?  One the one hand it would seem
> > that since the computer is idle that it shouldn't; on the other, since it
> > can still respond to system events (and hence can still crash) it seems
> > like it should count for something.  What are your opinions?  And what is
> > the UNIX way?
> >
>
>By "sleeping" I presume that you mean Power Management/Energy Saving
>features? As you quite rightly point out the OS is still running it's just
>that the CPU is "slowed down" and disks are spun down etc. so this should
>count as uptime, the OS can still respond to system events as you point out
>and, I would imagine, Windows could die in it's sleep ;-)

Yes, Windows can die in it's sleep.  I've had this happen a number of times 
on various computers.  And many of them will go to sleep and not wake 
up.  Wonder if they're still increasing they're uptime when they're 
terminally comatose like this. ;-)

--Chip Morton


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.3.2.7.2.20010811140656.0181bc88>