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