Date: Thu, 09 Aug 2001 23:55:45 -0400 From: Technical Information <tech_info@threespace.com> To: FreeBSD Chat <chat@freebsd.org> Subject: calculating uptime Message-ID: <4.3.2.7.2.20010809225151.017e6580@threespace.com>
next in thread | raw e-mail | index | archive | help
I currently run Windows and Linux about evenly now, 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, 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? --Chip Morton (*) - And what the hell is a "tick" anyway? How many of these are there per second? 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.20010809225151.017e6580>