This is the mail archive of the
mailing list for the Cygwin project.
Re: 'uptime' command producing incorrect uptime
- From: Steve Thompson <smt at vgersoft dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 10 Dec 2005 17:50:43 -0500 (EST)
- Subject: Re: 'uptime' command producing incorrect uptime
- References: <439B555A.email@example.com>
- Reply-to: smt at vgersoft dot com
On Sat, 10 Dec 2005, Jack wrote:
> It appears to me that the uptime command is not producing the correct
> uptime and, in fact, is running twice as fast as it should be.
I've noticed a similar effect recently, and looked in the sources. If you
take a look at the algorithm used by cygwin (line 467 et seq of
fhandler_proc.cc in the 20051123 snapshot), you'll see that it can be
wrong for multiprocessor hosts (the sum of KernelTime and UserTime is too
large by a factor equal to the number of processors). It also appears to
be wrong for uniprocessor hosts that have been up for more than 49.7 days
because of the 32-bit value returned by GetTickCount(); my own system
reported an uptime of 16 days after being up for 66 days.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html