Question about /proc/uptime

From: Rob Landley
Date: Wed Dec 25 2013 - 21:30:47 EST


There are two values here, the first is seconds since boot time (which is just elapsed time; at one point it was ajusted for suspend and that was revered as confusing).

The second value isn't documented but looking at fs/proc/uptime.c I think it's idle time? Except, if yo uadd up the idle time from all processors wouldn't you get 4x the uptime on a 4-way SMP system that's been idle since boot?

Also, is this actual "cpu was on but not doing anything" time, so doesn't count suspend as idle? So if you subtract idle from uptime (on a uniprocessor system) on a system that spent some of its time suspended, what do you get? Amount of time the system "wasn't idle" means... Is suspend time idle or not idle?

Confused,

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