fix english
[unix-history] / usr / src / lib / libcompat / 4.1 / vtimes.3
CommitLineData
af0bc818
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
3311b706 5.\" @(#)vtimes.3 6.3 (Berkeley) %G%
af0bc818 6.\"
c86e0a67 7.TH VTIMES 3C ""
af0bc818
KM
8.UC 4
9.SH NAME
10vtimes \- get information about resource utilization
11.SH SYNOPSIS
12.nf
258190a5
DS
13.PP
14.B "#include <sys/vtimes.h>"
15.PP
af0bc818
KM
16.B "vtimes(par_vm, ch_vm)"
17.B "struct vtimes *par_vm, *ch_vm;"
18.fi
19.SH DESCRIPTION
efad4734
KM
20.ft B
21This facility is superseded by getrusage(2).
22.ft R
23.PP
af0bc818
KM
24.I Vtimes
25returns accounting information for the current process and for
26the terminated child processes of the current
27process. Either
28.I par_vm
29or
30.I ch_vm
31or both may be 0, in which case only the information for the pointers
32which are non-zero is returned.
33.PP
34After the call, each buffer contains information as defined by the
35contents of the include file
36.I /usr/include/sys/vtimes.h:
37.LP
38.nf
39struct vtimes {
40 int vm_utime; /* user time (*HZ) */
41 int vm_stime; /* system time (*HZ) */
42 /* divide next two by utime+stime to get averages */
43 unsigned vm_idsrss; /* integral of d+s rss */
44 unsigned vm_ixrss; /* integral of text rss */
45 int vm_maxrss; /* maximum rss */
46 int vm_majflt; /* major page faults */
47 int vm_minflt; /* minor page faults */
48 int vm_nswap; /* number of swaps */
49 int vm_inblk; /* block reads */
50 int vm_oublk; /* block writes */
51};
52.fi
53.PP
54The
55.I vm_utime
56and
57.I vm_stime
58fields give the user and system
59time respectively in 60ths of a second (or 50ths if that
60is the frequency of wall current in your locality.) The
61.I vm_idrss
62and
63.I vm_ixrss
64measure memory usage. They are computed by integrating the number of
65memory pages in use each
66over cpu time. They are reported as though computed
67discretely, adding the current memory usage (in 512 byte
68pages) each time the clock ticks. If a process used 5 core
69pages over 1 cpu-second for its data and stack, then
70.I vm_idsrss
71would have the value 5*60, where
72.I vm_utime+vm_stime
73would be the 60.
74.I Vm_idsrss
75integrates data and stack segment
76usage, while
77.I vm_ixrss
78integrates text segment usage.
79.I Vm_maxrss
80reports the maximum instantaneous sum of the
81text+data+stack core-resident page count.
82.PP
83The
84.I vm_majflt
85field gives the number of page faults which
86resulted in disk activity; the
87.I vm_minflt
88field gives the
89number of page faults incurred in simulation of reference
90bits;
91.I vm_nswap
92is the number of swaps which occurred. The
93number of file system input/output events are reported in
94.I vm_inblk
95and
96.I vm_oublk
97These numbers account only for real
98i/o; data supplied by the caching mechanism is charged only
99to the first process to read or write the data.
100.SH SEE ALSO
3311b706 101time(2), wait3(2), getrusage(2)