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