getrusage(2) DG/UX 4.30 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;
PARAMETERS
who Identifies whether to return information
about the calling process or about the
calling process's acknowledged terminated
children. Can have the values RUSAGE_SELF
and RUSAGE_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 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
DG/UX returns:
0 Successful completion.
-1 An error occurred. Errno is set to indicate
the error.
EXCEPTIONS
Errno may be set to one of the following error codes:
Licensed material--property of copyright holder(s) Page 1
getrusage(2) DG/UX 4.30 getrusage(2)
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
The related system calls: gettimeofday, wait.
Licensed material--property of copyright holder(s) Page 2