Files
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

102 lines
2.6 KiB
Plaintext

.\" @(#)vtimes.3c 1.1 94/10/31 SMI; from UCB 4.2
.TH VTIMES 3C "6 October 1987"
.SH NAME
vtimes \- get information about resource utilization
.SH SYNOPSIS
.nf
.B "vtimes(par_vm, ch_vm)"
.B "struct vtimes *par_vm, *ch_vm;"
.fi
.IX get "info on resource usage \(em \fLvtimes()\fP"
.IX "resource usage, get information about \(em \fLvtimes()\fP"
.IX "vtimes()" "" "\fLvtimes()\fP \(em resource use information"
.SH DESCRIPTION
.LP
Note: this facility is superseded by
.BR getrusage (2).
.LP
.B vtimes(\|)
returns accounting information for the current
process and for the terminated child processes
of the current process. Either
.I par_vm
or
.I ch_vm
or both may be 0, in which case only the
information for the pointers
which are non-zero is returned.
.LP
After the call, each buffer contains information
as defined by the contents of the include file
.BR <sys/vtimes.h> :
.RS
.nf
.ft B
struct vtimes {
int vm_utime; /* user time (*HZ) */
int vm_stime; /* system time (*HZ) */
/* divide next two by utime+stime to get averages */
unsigned vm_idsrss; /* integral of d+s rss */
unsigned vm_ixrss; /* integral of text rss */
int vm_maxrss; /* maximum rss */
int vm_majflt; /* major page faults */
int vm_minflt; /* minor page faults */
int vm_nswap; /* number of swaps */
int vm_inblk; /* block reads */
int vm_oublk; /* block writes */
};
.ft R
.fi
.RE
.LP
The
.B vm_utime
and
.B vm_stime
fields give the user and system time respectively
in 60ths of a second (or 50ths if that
is the frequency of wall current in your locality.) The
.B vm_idrss
and
.B vm_ixrss
measure memory usage. They are computed by
integrating the number of memory pages in use each
over cpu time. They are reported as though computed
discretely, adding the current memory usage (in 512 byte
pages) each time the clock ticks.
If a process used 5 core
pages over 1 cpu-second for its data and stack, then
.B vm_idsrss
would have the value 5*60, where
.B vm_utime+vm_stime
would be the 60.
.B vm_idsrss
integrates data and stack segment usage, while
.B vm_ixrss
integrates text segment usage.
.B vm_maxrss
reports the maximum instantaneous sum of the
text+data+stack core-resident page count.
.LP
The
.B vm_majflt
field gives the number of page faults which
resulted in disk activity; the
.B vm_minflt
field gives the number of page faults incurred
in simulation of reference bits;
.B vm_nswap
is the number of swaps which occurred. The
number of file system input/output events
are reported in
.B vm_inblk
and
.B vm_oublk
These numbers account only for real
I/O; data supplied by the caching mechanism
is charged only to the first process to
read or write the data.
.SH SEE ALSO
.BR getrusage (2),
.BR wait (2V)