1 .\" Copyright (C) 2003 Andries Brouwer (aeb@cwi.nl)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" The pathconf note is from Walter Harms
24 .\" This is not a system call on Linux
26 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
28 .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
29 .\" all rights reserved.
30 .\" Translated Tue Jun 29 23:36:41 JST 2004
31 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
32 .\" Updated & Modified Sun Jan 9 22:50:29 JST 2005 by Yuichi SATO
34 .TH STATVFS 3 2003-08-22 "Linux" "Linux Programmer's Manual"
37 .\"O statvfs, fstatvfs \- get file system statistics
38 statvfs, fstatvfs \- ファイルシステムの統計を取得する
41 .B #include <sys/statvfs.h>
43 .BI "int statvfs(const char *" path ", struct statvfs *" buf );
45 .BI "int fstatvfs(int " fd ", struct statvfs *" buf );
50 .\"O returns information about a mounted file system.
53 はマウントされたファイルシステムについての情報を返す。
55 .\"O is the pathname of any file within the mounted file system.
57 はマウントされたファイルシステム中の任意のファイルのパス名である。
59 .\"O is a pointer to a
61 .\"O structure defined approximately as follows:
70 .\"O unsigned long f_bsize; /* file system block size */
71 .\"O unsigned long f_frsize; /* fragment size */
72 .\"O fsblkcnt_t f_blocks; /* size of fs in f_frsize units */
73 .\"O fsblkcnt_t f_bfree; /* # free blocks */
74 .\"O fsblkcnt_t f_bavail; /* # free blocks for unprivileged users */
75 .\"O fsfilcnt_t f_files; /* # inodes */
76 .\"O fsfilcnt_t f_ffree; /* # free inodes */
77 .\"O fsfilcnt_t f_favail; /* # free inodes for unprivileged users */
78 .\"O unsigned long f_fsid; /* file system ID */
79 .\"O unsigned long f_flag; /* mount flags */
80 .\"O unsigned long f_namemax; /* maximum filename length */
81 unsigned long f_bsize; /* ファイルシステムのブロックサイズ */
82 unsigned long f_frsize; /* フラグメントサイズ */
83 fsblkcnt_t f_blocks; /* ファイルシステムのサイズ (f_frsize 単位) */
84 fsblkcnt_t f_bfree; /* 解放されているブロック数 */
85 fsblkcnt_t f_bafvail; /* 非特権ユーザ用に解放されているブロック数 */
86 fsfilcnt_t f_files; /* inode 数 */
87 fsfilcnt_t f_ffree; /* 解放されている inode の数 */
88 fsfilcnt_t f_favail; /* 非特権ユーザ用に解放されている inode の数 */
89 unsigned long f_fsid; /* ファイルシステム ID */
90 unsigned long f_flag; /* マウントフラグ */
91 unsigned long f_namemax; /* ファイル名の長さの最大値 */
101 .\"O .IR <sys/types.h> .
110 .\"O .IR "unsigned long" .
117 .\"O is a bit mask (of mount flags, see
121 は (マウントフラグの) ビットマスクである
125 .\"O Bits defined by POSIX are
126 POSIX で定義されているビットは以下の通り:
129 .\"O Read-only file system.
133 .\"O Set-user-id/set-group-ID bits are ignored by
136 に無視される set-user-id/set-group-ID ビット。
138 .\"O It is unspecified whether all members of the returned struct
139 .\"O have meaningful values on all file systems.
140 返された構造体の全てのメンバが全てのファイルシステムで
141 意味のある値であるか否かは、指定されていない。
144 .\"O returns the same information about an open file referenced by descriptor
149 で参照されるオープンされたファイルについて、同じ情報を返す。
150 .\"O .SH "RETURN VALUE"
152 .\"O On success, zero is returned.
153 .\"O On error, \-1 is returned, and
155 .\"O is set appropriately.
164 .\"O .RB ( statvfs ())
165 .\"O Search permission is denied for a component of the path prefix of
168 .\"O .BR path_resolution (7).)
172 のディレクトリ部分に検索許可が与えられていない
173 .RB ( path_resolution (7)
177 .\"O .RB ( fstatvfs ())
179 .\"O is not a valid open file descriptor.
183 が有効なオープンファイルディスクリプタではない。
189 .\"O points to an invalid address.
196 .\"O This call was interrupted by a signal.
197 この呼び出しがシグナルによって中断された。
200 .\"O An I/O error occurred while reading from the file system.
201 ファイルシステムから読み出している間に I/O エラーが発生した。
204 .\"O .RB ( statvfs ())
205 .\"O Too many symbolic links were encountered in translating
213 .\"O .RB ( statvfs ())
222 .\"O .RB ( statvfs ())
223 .\"O The file referred to by
232 .\"O Insufficient kernel memory was available.
236 .\"O The file system does not support this call.
237 ファイルシステムがこの呼び出しをサポートしていない。
240 .\"O .RB ( statvfs ())
241 .\"O A component of the path prefix of
243 .\"O is not a directory.
250 .\"O Some values were too large to be represented in the returned struct.
251 いくつかの値は、返される構造体で表現するには大きすぎる。
252 .\"O .SH "CONFORMING TO"
257 .\"O The Linux kernel has system calls
261 .\"O to support this library call.
262 Linux カーネルには、このライブラリコールをサポートするために、
267 .\"O The current glibc implementations of
271 pathconf(path, _PC_REC_XFER_ALIGN);
272 pathconf(path, _PC_ALLOC_SIZE_MIN);
273 pathconf(path, _PC_REC_MIN_XFER_SIZE);
276 .\"O respectively use the
281 .\"O fields of the return value of
282 .\"O .IR "statvfs(path,buf)" .
284 .I "statvfs(path,buf)"