OSDN Git Service

info/GNU_which: Add some explanations.
[linuxjm/jm.git] / manual / LDP_man-pages / release / man2 / sysinfo.2
1 .\" Copyright (C) 2016, Michael Kerrisk <mtk.manpages@gmail.com>
2 .\" Based on an earlier version of the page where a few pieces were
3 .\" copyright (C) 1993 by Dan Miner (dminer@nyx.cs.du.edu) and subsequently
4 .\" others (see old changelog below).
5 .\" The structure definitions are taken more or less straight from the kernel
6 .\" source files.
7 .\"
8 .\" %%%LICENSE_START(VERBATIM)
9 .\" Permission is granted to make and distribute verbatim copies of this
10 .\" manual provided the copyright notice and this permission notice are
11 .\" preserved on all copies.
12 .\"
13 .\" Permission is granted to copy and distribute modified versions of this
14 .\" manual under the conditions for verbatim copying, provided that the
15 .\" entire resulting derived work is distributed under the terms of a
16 .\" permission notice identical to this one.
17 .\"
18 .\" Since the Linux kernel and libraries are constantly changing, this
19 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
20 .\" responsibility for errors or omissions, or for damages resulting from
21 .\" the use of the information contained herein.  The author(s) may not
22 .\" have taken the same level of care in the production of this manual,
23 .\" which is licensed free of charge, as they might when working
24 .\" professionally.
25 .\"
26 .\" Formatted or processed versions of this manual, if unaccompanied by
27 .\" the source, must acknowledge the copyright and authors of this work.
28 .\" %%%LICENSE_END
29 .\"
30 .\"
31 .\" Modified Sat Jul 24 12:35:12 1993 by Rik Faith <faith@cs.unc.edu>
32 .\" Modified Tue Oct 22 22:29:51 1996 by Eric S. Raymond <esr@thyrsus.com>
33 .\" Modified Mon Aug 25 16:06:11 1997 by Nicolás Lichtmaier <nick@debian.org>
34 .\"
35 .\"*******************************************************************
36 .\"
37 .\" This file was generated with po4a. Translate the source file.
38 .\"
39 .\"*******************************************************************
40 .\"
41 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
42 .\"         all rights reserved.
43 .\" Translated Tue Mar  4 00:04:15 JST 1997
44 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
45 .\" Modified Mon Sep 23 21:56:40 JST 2000
46 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
47 .\"
48 .TH SYSINFO 2 2017\-09\-15 Linux "Linux Programmer's Manual"
49 .SH 名前
50 sysinfo \- システム情報を返す
51 .SH 書式
52 \fB#include <sys/sysinfo.h>\fP
53 .PP
54 \fBint sysinfo(struct sysinfo *\fP\fIinfo\fP\fB);\fP
55 .SH 説明
56 \fBsysinfo\fP()  returns certain statistics on memory and swap usage, as well
57 as the load average.
58 .PP
59 Linux 2.3.16 までは \fBsysinfo\fP()  は以下の構造体に情報を入れて返した。
60 .PP
61 .in +4n
62 .EX
63  struct sysinfo {
64     long uptime;             /* Seconds since boot */
65     unsigned long loads[3];  /* 1, 5, and 15 minute load averages */
66     unsigned long totalram;  /* Total usable main memory size */
67     unsigned long freeram;   /* Available memory size */
68     unsigned long sharedram; /* Amount of shared memory */
69     unsigned long bufferram; /* Memory used by buffers */
70     unsigned long totalswap; /* Total swap space size */
71     unsigned long freeswap;  /* Swap space still available */
72     unsigned short procs;    /* Number of current processes */
73     char _f[22];             /* Pads structure to 64 bytes */
74 };
75 .EE
76 .in
77 .PP
78 In the above structure, the sizes of the memory and swap fields are given in
79 bytes.
80 .PP
81 Linux 2.3.23 (i386)、Linux 2.3.48 (全てのアーキテクチャー) 以降では、構造体は
82 .PP
83 .in +4n
84 .EX
85  struct sysinfo {
86     long uptime;             /* Seconds since boot */
87     unsigned long loads[3];  /* 1, 5, and 15 minute load averages */
88     unsigned long totalram;  /* Total usable main memory size */
89     unsigned long freeram;   /* Available memory size */
90     unsigned long sharedram; /* Amount of shared memory */
91     unsigned long bufferram; /* Memory used by buffers */
92     unsigned long totalswap; /* Total swap space size */
93     unsigned long freeswap;  /* Swap space still available */
94     unsigned short procs;    /* Number of current processes */
95     unsigned long totalhigh; /* Total high memory size */
96     unsigned long freehigh;  /* Available high memory size */
97     unsigned int mem_unit;   /* Memory unit size in bytes */
98     char _f[20\-2*sizeof(long)\-sizeof(int)];
99                              /* Padding to 64 bytes */
100 };
101 .EE
102 .in
103 .PP
104 In the above structure, sizes of the memory and swap fields are given as
105 multiples of \fImem_unit\fP bytes.
106 .SH 返り値
107 成功すると、 \fBsysinfo\fP()  は 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。
108 .SH エラー
109 .TP 
110 \fBEFAULT\fP
111 \fIinfo\fP が有効なアドレスではない。
112 .SH バージョン
113 \fBsysinfo\fP() は Linux 0.98.pl6 で初めて登場した。
114 .SH 準拠
115 この関数は Linux 特有であり、移植を意図したプログラムでは 使用すべきでない。
116 .SH 注意
117 All of the information provided by this system call is also available via
118 \fI/proc/meminfo\fP and \fI/proc/loadavg\fP.
119 .SH 関連項目
120 \fBproc\fP(5)
121 .SH この文書について
122 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
123 \%https://www.kernel.org/doc/man\-pages/ に書かれている。