xref: /freebsd/share/man/man9/VFS_STATFS.9 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1fab63cc4SDoug Rabson.\" -*- nroff -*-
2fab63cc4SDoug Rabson.\"
3fab63cc4SDoug Rabson.\" Copyright (c) 1996 Doug Rabson
4fab63cc4SDoug Rabson.\"
5fab63cc4SDoug Rabson.\" All rights reserved.
6fab63cc4SDoug Rabson.\"
7fab63cc4SDoug Rabson.\" This program is free software.
8fab63cc4SDoug Rabson.\"
9fab63cc4SDoug Rabson.\" Redistribution and use in source and binary forms, with or without
10fab63cc4SDoug Rabson.\" modification, are permitted provided that the following conditions
11fab63cc4SDoug Rabson.\" are met:
12fab63cc4SDoug Rabson.\" 1. Redistributions of source code must retain the above copyright
13fab63cc4SDoug Rabson.\"    notice, this list of conditions and the following disclaimer.
14fab63cc4SDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright
15fab63cc4SDoug Rabson.\"    notice, this list of conditions and the following disclaimer in the
16fab63cc4SDoug Rabson.\"    documentation and/or other materials provided with the distribution.
17fab63cc4SDoug Rabson.\"
18fab63cc4SDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
19fab63cc4SDoug Rabson.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20fab63cc4SDoug Rabson.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21fab63cc4SDoug Rabson.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22fab63cc4SDoug Rabson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23fab63cc4SDoug Rabson.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24fab63cc4SDoug Rabson.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25fab63cc4SDoug Rabson.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26fab63cc4SDoug Rabson.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27fab63cc4SDoug Rabson.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28fab63cc4SDoug Rabson.\"
29c327ec00STom McLaughlin.Dd May 23, 2009
30fab63cc4SDoug Rabson.Dt VFS_STATFS 9
31*aa12cea2SUlrich Spörlein.Os
32fab63cc4SDoug Rabson.Sh NAME
33fab63cc4SDoug Rabson.Nm VFS_STATFS
34fab63cc4SDoug Rabson.Nd return file system status
35fab63cc4SDoug Rabson.Sh SYNOPSIS
3632eef9aeSRuslan Ermilov.In sys/param.h
3732eef9aeSRuslan Ermilov.In sys/mount.h
3832eef9aeSRuslan Ermilov.In sys/vnode.h
39fab63cc4SDoug Rabson.Ft int
40c327ec00STom McLaughlin.Fn VFS_STATFS "struct mount *mp" "struct statfs *sbp"
41fab63cc4SDoug Rabson.Sh DESCRIPTION
423d5ea0fbSGiorgos KeramidasThe
433d5ea0fbSGiorgos Keramidas.Fn VFS_STATFS
443d5ea0fbSGiorgos Keramidasmacro returns various pieces of information about the file system,
45fab63cc4SDoug Rabsonincluding recommended I/O sizes, free space, free inodes, etc.
46fab63cc4SDoug Rabson.Pp
473d5ea0fbSGiorgos KeramidasThe arguments it expects are:
48fab63cc4SDoug Rabson.Bl -tag -width sbp
490640e9e0SHiten Pandya.It Fa mp
50fab63cc4SDoug RabsonThe file system.
510640e9e0SHiten Pandya.It Fa sbp
523d5ea0fbSGiorgos KeramidasA
536b13dcc0SRuslan Ermilov.Vt statfs
543d5ea0fbSGiorgos Keramidasstructure, as defined by
553d5ea0fbSGiorgos Keramidas.In sys/mount.h ,
563d5ea0fbSGiorgos Keramidasinto which information is placed about the file system.
57fab63cc4SDoug Rabson.El
583d5ea0fbSGiorgos Keramidas.Pp
593d5ea0fbSGiorgos KeramidasThe fields of
606b13dcc0SRuslan Ermilov.Vt "struct statfs"
613d5ea0fbSGiorgos Keramidasrelated to the file system are as follows:
626b13dcc0SRuslan Ermilov.Bl -tag -width ".Va f_mntfromname"
633d5ea0fbSGiorgos Keramidas.It Va f_type
643d5ea0fbSGiorgos KeramidasType of file system.
653d5ea0fbSGiorgos Keramidas.It Va f_flags
663d5ea0fbSGiorgos KeramidasA copy of mount exported flags.
673d5ea0fbSGiorgos Keramidas.It Va f_bsize
683d5ea0fbSGiorgos KeramidasFragment size.
693d5ea0fbSGiorgos Keramidas.It Va f_iosize
703d5ea0fbSGiorgos KeramidasOptimal transfer block size.
713d5ea0fbSGiorgos Keramidas.It Va f_blocks
723d5ea0fbSGiorgos KeramidasThe total number of data blocks in the file system.
733d5ea0fbSGiorgos Keramidas.It Va f_bfree
743d5ea0fbSGiorgos KeramidasThe number of free blocks in the file system.
753d5ea0fbSGiorgos Keramidas.It Va f_bavail
763d5ea0fbSGiorgos KeramidasThe number of free blocks available to non-superuser processes.
773d5ea0fbSGiorgos Keramidas.It Va f_files
783d5ea0fbSGiorgos KeramidasThe total number of file nodes in the file system.
793d5ea0fbSGiorgos Keramidas.It Va f_ffree
803d5ea0fbSGiorgos KeramidasThe number of free nodes available to non-superuser processes.
813d5ea0fbSGiorgos Keramidas.It Va f_syncwrites
823d5ea0fbSGiorgos KeramidasThe number of synchronous writes since the file system was mounted.
833d5ea0fbSGiorgos Keramidas.It Va f_asyncwrites
843d5ea0fbSGiorgos KeramidasThe number of asynchronous writes since the file system was mounted.
853d5ea0fbSGiorgos Keramidas.It Va f_syncreads
863d5ea0fbSGiorgos KeramidasThe number of synchronous reads since the file system was mounted.
873d5ea0fbSGiorgos Keramidas.It Va f_asyncreads
883d5ea0fbSGiorgos KeramidasThe number of asynchronous reads since the file system was mounted.
893d5ea0fbSGiorgos Keramidas.It Va f_namemax
903d5ea0fbSGiorgos KeramidasThe maximum file name length for this file system.
913d5ea0fbSGiorgos Keramidas.It Va f_owner
923d5ea0fbSGiorgos KeramidasThe user ID of the user that mounted the file system.
933d5ea0fbSGiorgos Keramidas.It Va f_fsid
943d5ea0fbSGiorgos KeramidasUnique file system ID.
953d5ea0fbSGiorgos Keramidas.It Va f_fstypename
963d5ea0fbSGiorgos KeramidasThe file system type name; a string of at most
973d5ea0fbSGiorgos Keramidas.Dv MFSNAMELEN
983d5ea0fbSGiorgos Keramidasbytes.
993d5ea0fbSGiorgos Keramidas.It Va f_mntfromname
1003d5ea0fbSGiorgos KeramidasThe device name the file system was mounted from; a string of at most
1013d5ea0fbSGiorgos Keramidas.Dv MNAMELEN
1023d5ea0fbSGiorgos Keramidasbytes.
1033d5ea0fbSGiorgos Keramidas.It Va f_mntonname
1043d5ea0fbSGiorgos KeramidasThe name of the directory on which the file system is mounted;
1053d5ea0fbSGiorgos Keramidasa string of at most
1063d5ea0fbSGiorgos Keramidas.Dv MNAMELEN
1073d5ea0fbSGiorgos Keramidasbytes.
1083d5ea0fbSGiorgos Keramidas.El
109fab63cc4SDoug Rabson.Sh SEE ALSO
110bceb8aedSWolfram Schneider.Xr VFS 9 ,
111bceb8aedSWolfram Schneider.Xr vnode 9
112fab63cc4SDoug Rabson.Sh AUTHORS
11309356c84SHiten PandyaThis manual page was written by
114aaf1f16eSPhilippe Charnier.An Doug Rabson .
115