Commit | Line | Data |
---|---|---|
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 | |
10 | vtimes \- 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 | |
18 | returns accounting information for the current process and for | |
19 | the terminated child processes of the current | |
20 | process. Either | |
21 | .I par_vm | |
22 | or | |
23 | .I ch_vm | |
24 | or both may be 0, in which case only the information for the pointers | |
25 | which are non-zero is returned. | |
26 | .PP | |
27 | After the call, each buffer contains information as defined by the | |
28 | contents of the include file | |
29 | .I /usr/include/sys/vtimes.h: | |
30 | .LP | |
31 | .nf | |
32 | struct 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 | |
47 | The | |
48 | .I vm_utime | |
49 | and | |
50 | .I vm_stime | |
51 | fields give the user and system | |
52 | time respectively in 60ths of a second (or 50ths if that | |
53 | is the frequency of wall current in your locality.) The | |
54 | .I vm_idrss | |
55 | and | |
56 | .I vm_ixrss | |
57 | measure memory usage. They are computed by integrating the number of | |
58 | memory pages in use each | |
59 | over cpu time. They are reported as though computed | |
60 | discretely, adding the current memory usage (in 512 byte | |
61 | pages) each time the clock ticks. If a process used 5 core | |
62 | pages over 1 cpu-second for its data and stack, then | |
63 | .I vm_idsrss | |
64 | would have the value 5*60, where | |
65 | .I vm_utime+vm_stime | |
66 | would be the 60. | |
67 | .I Vm_idsrss | |
68 | integrates data and stack segment | |
69 | usage, while | |
70 | .I vm_ixrss | |
71 | integrates text segment usage. | |
72 | .I Vm_maxrss | |
73 | reports the maximum instantaneous sum of the | |
74 | text+data+stack core-resident page count. | |
75 | .PP | |
76 | The | |
77 | .I vm_majflt | |
78 | field gives the number of page faults which | |
79 | resulted in disk activity; the | |
80 | .I vm_minflt | |
81 | field gives the | |
82 | number of page faults incurred in simulation of reference | |
83 | bits; | |
84 | .I vm_nswap | |
85 | is the number of swaps which occurred. The | |
86 | number of file system input/output events are reported in | |
87 | .I vm_inblk | |
88 | and | |
89 | .I vm_oublk | |
90 | These numbers account only for real | |
91 | i/o; data supplied by the caching mechanism is charged only | |
92 | to the first process to read or write the data. | |
93 | .SH SEE ALSO | |
94 | time(2), wait3(2) | |
95 | .SH BUGS | |
96 | This call is peculiar to this version of UNIX. | |
97 | The options and specifications of this system call are subject to change. | |
98 | It may be extended to include additional information | |
99 | in future versions of the system. |