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