*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> statfs (2)              
Title
Content
Arch
Section
 

statfs(2)

Contents


NAME    [Toc]    [Back]

       statfs, fstatfs, ustat - Get file system statistics

SYNOPSIS    [Toc]    [Back]

       #include <sys/mount.h>

       int statfs
               char *path,
               struct statfs **buffer ); int fstatfs
               int file_descriptor,
               struct  statfs  *buffer  ); #include <sys/types.h>
       #include <ustat.h>

       int ustat
               dev_t device,
               struct ustat *buffer );

PARAMETERS    [Toc]    [Back]

       Specifies any file within the mounted file system.  Specifies
  a file descriptor obtained by a successful open() or
       fcntl() function.  Points to a statfs buffer to  hold  the
       returned  information  for the statfs() or fstatfs() function;
 points to a ustat buffer to hold the returned information
  for the ustat() function.  Specifies the ID of the
       device. It corresponds to the st_rdev member of the structure
 returned by the stat() function.

DESCRIPTION    [Toc]    [Back]

       The  statfs()  and  fstatfs() functions return information
       about a mounted file system. The returned  information  is
       in  the format of the statfs structure that is declared in
       the </sys/mount.h> file.

       When run  against  an  AdvFS  clone  fileset,  the  number
       returned  in statfs.f_bfree is the number of blocks available
 in the original fileset at the time the clone fileset
       was  created. Similarly, statfs.f_ffree reports the number
       of potential new files in the original fileset at the time
       the clone fileset was created.

       The  ustat()  function  also  returns  information about a
       mounted file system. The returned information  is  in  the
       format  of  the  ustat  structure  that is declared in the
       <ustat.h>  file.  This  function  is  superseded  by   the
       statfs() and fstatfs() functions.

NOTES    [Toc]    [Back]

       Earlier  versions  of the statfs() and fstatfs() functions
       documented a third parameter, length.  This length parameter
 was never used by the kernel and has been deleted from
       the documentation.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, 0 (zero) is  returned.  Otherwise,
  -1  is  returned,  and errno is set to indicate the
       error.






ERRORS    [Toc]    [Back]

       If the statfs() function fails, errno may be set to one of
       the  following  values:  Search permission is denied for a
       component of the path prefix of the path  parameter.   The
       buffer  or  path parameter points to a location outside of
       the allocated address space of the process.  An I/O  error
       occurred while reading from or writing to the file system.
       Too many symbolic links were  encountered  in  translating
       the path parameter.  The length of a component of the path
       parameter exceeds NAME_MAX characters, or  the  length  of
       the  path parameter exceeds PATH_MAX characters.  The file
       referred to by the path parameter does not exist.  A  component
  of  the path prefix of the path parameter is not a
       directory.  Indicates a stale NFS file handle.  An  opened
       file was deleted by the server or another client; a client
       cannot open a file because the  server  has  unmounted  or
       unexported  the  remote  directory;  or the directory that
       contains an opened file was either unmounted or unexported
       by the server.

       If  the  fstatfs() or ustat() function fails, errno may be
       set to one of the following  values:  The  file_descriptor
       parameter  is  not  a  valid  file descriptor.  The buffer
       parameter points to an  invalid  address.   An  I/O  error
       occurred while reading from the file system.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: stat(2), statvfs(2)



                                                        statfs(2)
[ Back ]
 Similar pages
Name OS Title
ff_vxfs HP-UX fast find: list file names and statistics for a VxFS file system
ff_hfs HP-UX list file names and statistics for HFS file system
ff HP-UX list file names and statistics for a file system
nfsstat Tru64 Network File System statistics
bsde_get_rule_slots FreeBSD file system firewall statistics
cachefsstat HP-UX Cache File System statistics
bsde_get_rule_count FreeBSD file system firewall statistics
ustat HP-UX get mounted file system statistics
nfsstat HP-UX Network File System statistics
rmtab HP-UX local file system mount statistics
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service