⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vtimes.3

📁 早期freebsd实现
💻 3
字号:
.\" Copyright (c) 1980, 1991, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"     @(#)vtimes.3	8.1 (Berkeley) 6/4/93.\".Dd June 4, 1993.Dt VTIMES 3.Os BSD 4.Sh NAME.Nm vtimes.Nd get information about resource utilization.Sh SYNOPSIS.Fd #include <sys/vtimes.h>.Fn vtimes "struct vtimes *par_vm" "struct vtimes *ch_vm".Sh DESCRIPTION.Bf -symbolicThis interface is obsoleted by getrusage(2).It is available from the compatibility library, libcompat..Ef.PpThe.Fn vtimesfunctionreturns accounting information for the current process and forthe terminated child processes of the currentprocess.  Either.Fa par_vmor .Fa ch_vmor both may be 0, in which case only the information for the pointerswhich are non-zero is returned..PpAfter the call, each buffer contains information as defined by thecontents of the include file.Pa /usr/include/sys/vtimes.h :.Bd -literal -offset indentstruct vtimes {	int	vm_utime;	/* user time (*HZ) */	int	vm_stime;	/* system time (*HZ) */	/* divide next two by utime+stime to get averages */	unsigned vm_idsrss;	/* integral of d+s rss */	unsigned vm_ixrss;	/* integral of text rss */	int	vm_maxrss;	/* maximum rss */	int	vm_majflt;	/* major page faults */	int	vm_minflt;	/* minor page faults */	int	vm_nswap;	/* number of swaps */	int	vm_inblk;	/* block reads */	int	vm_oublk;	/* block writes */};.Ed.PpThe.Fa vm_utimeand.Fa vm_stimefields give the user and systemtime respectively in 60ths of a second (or 50ths if thatis the frequency of wall current in your locality.) The.Fa vm_idrssand.Fa vm_ixrssmeasure memory usage.  They are computed by integrating the number ofmemory pages in use eachover.Tn CPUtime.  They are reported as though computeddiscretely, adding the current memory usage (in 512 bytepages) each time the clock ticks.  If a process used 5 corepages over 1 cpu-second for its data and stack, then.Fa vm_idsrsswould have the value 5*60, where.Fa vm_utime+vm_stimewould be the 60.  The.Fa Vm_idsrssargumentintegrates data and stack segmentusage, while.Fa vm_ixrssintegrates text segment usage.The.Fa Vm_maxrssfunctionreports the maximum instantaneous sum of thetext+data+stack core-resident page count..PpThe .Fa vm_majfltfield gives the number of page faults whichresulted in disk activity; the.Fa vm_minfltfield gives thenumber of page faults incurred in simulation of referencebits;.Fa vm_nswapis the number of swaps which occurred.  Thenumber of file system input/output events are reported in.Fa vm_inblkand.Fa vm_oublkThese numbers account only for real.Tn I/O ;data supplied by the caching mechanism is charged onlyto the first process to read or write the data..Sh SEE ALSO.Xr time 2 ,.Xr wait3 2 ,.Xr getrusage 2.Sh HISTORYThe.Fn vlimitfunction appeared in .Bx 4.2 .

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -