[so] /proc/pid/stat

Bogdan Luca so@cursuri.cs.pub.ro
Sat, 20 Nov 2004 14:40:01 +0200


Citez de la KERNEL_SOURCE_PATH/fs/proc/array.c:369 (2.6.9 vanilla):
----
         res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu 
%lu \
%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
                 task->pid,
                 tcomm,
                 state,
                 ppid,
                 pgid,
                 sid,
                 tty_nr,
                 tty_pgrp,
                 task->flags,
                 task->min_flt,
                 cmin_flt,
                 task->maj_flt,
                 cmaj_flt,
                 jiffies_to_clock_t(task->utime),
                 jiffies_to_clock_t(task->stime),
                 jiffies_to_clock_t(cutime),
                 jiffies_to_clock_t(cstime),
...
----
Deci, ce trebuie afisat la CPUTime, task->utime sau task->stime?

Bogdan Luca
345CA

mitel wrote:
> salut
> 
> pentru siguranta: cand citesc fisierul
> campul 0 : pidul (pid_t)
>                1 : numele procesului (char[])
>               ....
>              15 : CPU time user (int) --> asta mi s-a parut mie ca ar fi
> CPU time
> 
> ramane 14 ca in precizarile de pe site sau 15?
> 
> 
> ----------------------------------------------
> webhosting starting at 1.99 / month.
> http://www.etp.ro/
> _______________________________________________
> so mailing list
> so@cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so