File: getrusage.2

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (151 lines) | stat: -rw-r--r-- 4,923 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (c) 1992 Drew Eckhardt, March 28, 1992
.\" and Copyright (c) 2002 Michael Kerrisk
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" 2004-11-16 -- mtk: the getrlimit.2 page, which formerly included
.\" coverage of getrusage(2), has been split, so that the latter is
.\" now covered in its own getrusage.2.  For older details of change
.\" history, etc., see getrlimit.2
.\"
.\" Modified 2004-11-16, mtk, Noted that the non-conformance
.\"	when SIGCHLD is being ignored is fixed in 2.6.9.
.\"
.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
.\"         all rights reserved.
.\" Translated 1997-02-22, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Updated and Modified 2001-06-02, Yuichi SATO <ysato444@yahoo.co.jp>
.\" Updated and Modified 2001-08-18, Yuichi SATO
.\" Updated and Modified 2002-08-25, Yuichi SATO
.\" Updated and Modified 2004-01-17, Yuichi SATO
.\" Updated and Modified 2004-12-30, Yuichi SATO
.\" Updated and Modified 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.TH GETRUSAGE 2 2004-11-16 "Linux" "Linux Programmer's Manual"
.SH ̾
getrusage \- 񸻤λ̤
.SH 
.B #include <sys/time.h>
.br
.B #include <sys/resource.h>
.sp
.BI "int getrusage(int " who ", struct rusage *" usage );
.SH 
.PP
.BR getrusage ()
ϸߤλ (resource) λ (usage) ֤
\fIwho\fP ˤ
.B RUSAGE_SELF

.B RUSAGE_CHILDREN
Τɤ餫ꤹ롣
ԤϸƤӽФץΥ꥽̤׵ᤷ
ԤϸƤӽФץλҶΤ
λԤ֤ˤץλ̤׵᤹롣
.PP
.in +4n
.nf
struct rusage {
    struct timeval ru_utime; /* Ѥ줿桼 */
    struct timeval ru_stime; /* Ѥ줿ƥ */
    long   ru_maxrss;        /* RAM ¸ߤ벾ۥڡΥ
                               (resident set size) κ */
    long   ru_ixrss;         /* ͭιץ */
    long   ru_idrss;         /* ͭǡιץ */
    long   ru_isrss;         /* ͭåιץ */
    long   ru_minflt;        /* Ѥ줿ڡ */
    long   ru_majflt;        /* ڡե */
    long   ru_nswap;         /* å */
    long   ru_inblock;       /* ֥å */
    long   ru_oublock;       /* ֥å */
    long   ru_msgsnd;        /* 줿å */
    long   ru_msgrcv;        /* 줿å */
    long   ru_nsignals;      /* 줿ʥ */
    long   ru_nvcsw;         /* տޤƥڤؤ */
    long   ru_nivcsw;        /* տޤʤƥڤؤ */
};
.fi
.in
.SH ֤
 0 ֤롣顼ξ \-1 ֤졢
.I errno
Ŭڤͤꤵ롣
.SH 顼
.TP
.B EFAULT
.I usage
ǽʥɥ쥹֤γؤƤ롣
.TP
.B EINVAL
.I who
̵Ǥ롣
.SH 
SVr4, 4.3BSD.
POSIX.1-2001 
.BR getrusage ()
ꤷƤ뤬ꤷƤեɤ
.I ru_utime

.I ru_stime
Ǥ롣
.SH 
Ǥ
.I <sys/time.h>
򥤥󥯥롼ɤɬפϤʤ
󥯥롼ɤƤаܿ
.I struct timeval

.I <sys/time.h>
Ƥ롣)
.PP
2.6.9 ΥС Linux ͥǤϡ
.B SIGCHLD
ν
.B SIG_IGN
ꤵƤȡ
ҥץΥ꥽̤
.B RUSAGE_CHILDREN
֤ͤ˼ưŪ˴ޤ롣
 POSIX.1-2001 ǤϡΤ˶ػߤƤ롣
ν򤷤ƤʤäϡLinux 2.6.9 ʹߤDz줿
.\" XSH  getrusage() 򻲾Ȥ뤳ȡ
.\" ƱͤεҤ SUSv2 ˤ⤢롣
.LP
ΥڡκǽǼ¤Τ 4.3BSD Reno ΤΤѤ
Linux ǤƤΥեɤ̣ĤȤ櫓ǤϤʤ
Linux 2.4 Ǥϡե
.IR ru_utime ,
.IR ru_stime ,
.IR ru_minflt ,
.I ru_majflt
Τߤƥʥ󥹤Ƥ롣
Linux 2.6 ʹߤǤ
.IR ru_nvcsw ,
.I ru_nivcsw
ƥʥ󥹤Ƥ롣
.SH Ϣ
.BR getrlimit (2),
.BR times (2),
.BR wait (2),
.BR wait4 (2)