[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Time spent in user mode and system mode.



On Tue, Oct 09, 2012 at 03:21:36AM +0200, Cyril Roelandt wrote:
> I thought that one way of doing this would be to apply the following
> algorithm:
> 
> total_system_time := 0
> total_user_time := 0
> processes := list_all_processes()
> 
> for p in processes:
>     total_system_time += p.system_time
>     total_user_time += p.user_time

I didn't take the time to look at the details of your code, but one
quick note: what if the "idle task" isn't part of the process list ?

This problem isn't specific to Debian, I'm copying to bug-hurd as well.

-- 
Richard Braun


Reply to: