About /proc/uptime

James Drabb JDrabb at tampabay.rr.com
Wed Sep 25 19:32:55 PDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 26 Sep 2002 00:32:54 +0200
"T.B. van der Molen" <tbm at home.nl> wrote:

> Hi,
> 
> /proc/uptime contains two numbers. The first is the current uptime of 
> the machine, but what's the second?
> 
> TYI
> 
> Tim
> 
> -- 
> "Period Three Implies Chaos"
> - T.Y. Li & J.A. Yorke (1975)
> 
> -- 
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe lfs-chat' in the subject header of the message
> 

You can take a look at /usr/src/linux-2.4.19/fs/proc/proc_misc.c to
see how it is generated : )

>From the code it appears to be the total accumulated idle time.

len = sprintf(page,"%lu.%02lu %lu.%02lu\n",
        uptime / HZ,
        uptime % HZ,
        idle / HZ,
        idle % HZ);

Jim Drabb
- -- 
- ----------------------
James Drabb, JR
Programmer Analyst
Davenport, FL
JDrabb at tampabay.rr.com
- ----------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9knHXMSVDgbMHT7ERAiiuAJ42DePUP/7g+UwJZBuDpniUNheBugCgif8O
W6OhNAZz6JRwOYO/+IAswiY=
=PVU7
-----END PGP SIGNATURE-----
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-chat' in the subject header of the message



More information about the lfs-chat mailing list