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