Re: suggestion: remove /proc/uptime once and for all.

Tigran Aivazian (tigran@sco.COM)
Fri, 6 Nov 1998 14:05:47 +0000 (GMT)


Hmmm, for me it reports wrong numbers under *any* circumstances.
Namely, I run 2.1.126 on a Compaq Proliant 1600, Intel MP v1.4. Dual PII/400.
And the /proc/uptime always shows 0.00 as the idle time, so it looks as if my
machine was very busy all the time; grep cpu /proc/stat however shows
correct values (non-zero).

Here is some output:
$ cat /proc/uptime ; cat /proc/stat
7450.59 0.00
cpu 360 0 863 1488897
cpu0 171 0 430 744459
cpu1 189 0 433 744438
disk 5072 0 0 0
disk_rio 3578 0 0 0
disk_wio 1494 0 0 0
disk_rblk 7162 0 0 0
disk_wblk 2988 0 0 0
page 16958 1874
swap 1 0
intr 762487 745060 2311 0 0 0 0 3 0 1 0 0 0 0 1 6 0 0 0 0 0 0 0 0 6701 0 0
0 0 0 0 8404 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0
ctxt 31897
btime 910350103
processes 592

I noticed that if I edit arch/i386/kernel/smp.c/smp_local_timer_interrupt()
and get rid of if(p->pid) then the number in /proc/uptime looks better.
Yes, I intentionally used the vague word "better" because I did not have time to
analyze the situation with more precision, i.e. to compare /proc/uptime and
/proc/stat with one or both engines busy.

regards,
------ -------- --------- -------- -- - -- ---- --
Tigran A. Aivazian | http://www.sco.com
Escalations Research Group | tel: +44-(0)1923-813796
Santa Cruz Operation Ltd | Email: tigran@sco.com

On Fri, 6 Nov 1998, Alan Cox wrote:

> > a) on SMP systems /proc/uptime reports wrong numbers anyway so by removing
> > it we have one less bug to fix.
>
> Under what circumstances on 2.1.x does it report wrong values ?
>
> Alan
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/