Re: user/CPU-time in /proc/<pid>/stat problems

Roman Breuer (breuer@rz.rwth-aachen.de)
Fri, 13 Aug 1999 16:02:03 +0200


Hi,
thanks for your reply, but as I understand rusage it is only for the
process
or its children. I need a function to get the values for any process
selected by
its PID.

The manpage says:
getrusage returns the current resource usages, for a who of either
RUSAGE_SELF or RUSAGE_CHILDREN.

Regards, Roman

Mark Hahn wrote:

> > Can you help me with that problem ? Can I somehow get the values in C
> > without looking in /proc/<pid>/stat ?
>
> getrusage or times are the standard/normal/unix/portable ways.

--
-------------------------------------------------------------------------
                \_\_\_\_  \_  \_\_\_\_\_  \_   Rheinisch-
                \_   \_\_ \__ \_  \_  \_  \_   Westfaelische
                \_\_\_  \_\_\_\_  \_  \_\_\_   Technische
                \_  \_   \__ \__  \_  \_  \_   Hochschule
                \_   \_   \_  \_  \_  \_  \_   Aachen
                ============================================
                Workstation-Verbund            RECHENZENTRUM
-------------------------------------------------------------------------
Roman Breuer, Rechenzentrum RWTH Aachen
e-mail: breuer@rz.rwth-aachen.de
-------------------------------------------------------------------------

:.˛mkabzwmb˛mbz_^nrzh&zvy杶ii