Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gettimeofday(2)

wait(2)



getrusage(2)                   DG/UX R4.11MU05                  getrusage(2)


NAME
       getrusage - get information about resource utilization

SYNOPSIS
       #include <sys/time.h>
       #include <sys/resource.h>

       int  getrusage (who, rusage)
       int  who;
       struct rusage * rusage;

   where:
       who       RUSAGE_SELF and RUSAGE_CHILDREN, identifying whether to
                 return information about the calling process or about the
                 calling process's acknowledged terminated children

       rusage    A pointer to an area in the calling process's address space
                 where the resource usage information is to be written

DESCRIPTION
       Getrusage returns information describing the resources utilized by
       the current process, or the sum of the resources utilized by each of
       its acknowledged terminated children, depending on the value of who.
       The rusage structure pointed to by rusage is filled in with the
       information.  See the description of the rusage structure in
       sys/resource.h for the details of each field.

       If an error occurs, rusage is unmodified.

ACCESS CONTROL
       The argument rusage must point to an area in the calling process's
       address space that is valid and has write access.

RETURN VALUE
       0      Successful completion.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EINVAL    The who argument was not RUSAGE_SELF or RUSAGE_CHILDREN.

       EFAULT    The rusage argument specifies an invalid area of the
                 calling process's address space or an area which does not
                 have read/write access.

SEE ALSO
       gettimeofday(2), wait(2).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026