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

  man pages->HP-UX 11i man pages -> ustat (2)              


 ustat(2)                                                           ustat(2)

 NAME    [Toc]    [Back]
      ustat() - get mounted file system statistics

 SYNOPSIS    [Toc]    [Back]
      #include <ustat.h>

      int ustat(dev_t dev, struct ustat *buf);

 DESCRIPTION    [Toc]    [Back]
      The ustat() system call returns information about a mounted file
      system.  dev is a device number identifying a device containing a
      mounted file system.  buf is a pointer to a ustat structure (defined
      in <ustat.h>) that includes the following elements:

           int32_t  f_tfree;        /* Total free blocks */
           ino_t    f_tinode;       /* Number of free inodes */
           char     f_fname[6];     /* Filsys name or null */
           char     f_fpack[6];     /* Filsys pack name or null */
           int      f_blksize;      /* Block size */

      The value of f_tfree is the number of free blocks of size f_blksize.

 RETURN VALUE    [Toc]    [Back]
      ustat() returns the following values:

            0   Successful completion.
           -1   Failure.  errno is set to indicate the error.

 ERRORS    [Toc]    [Back]
      If ustat() fails, errno is set to one of the following values.

           [EFAULT]           buf points outside the process's allocated
                              address space.  The reliable detection of this
                              error is implementation dependent.

           [EINVAL]           dev is not the device number of a device
                              containing a mounted file system.

           [EOVERFLOW]        Result would overflow f_tfree or another field
                              of the ustat struct.

 WARNINGS    [Toc]    [Back]
      ustat() is deprecated and should be used only by legacy 32-bit
      applications.  statvfs() or statvfs64() are the recommended

      For some file systems, the number of free inodes does not change.
      Such file systems will return -1 in the field f_tinode.

      For some file systems, the inodes can be dynamically allocated.  For
      such file systems, the field f_tinode contains the number of free

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 ustat(2)                                                           ustat(2)

      inodes at the current time.

 AUTHOR    [Toc]    [Back]
      ustat() was developed by AT&T and HP.

 SEE ALSO    [Toc]    [Back]
      touch(1), stat(2), statvfs(2), fs_vxfs(4).

      ustat(): SVID2, SVID3, XPG2

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
mnttab HP-UX mounted file system table
fsctl IRIX operations on a mounted file system
rmtab IRIX remotely mounted file system table
vfs_mountedon FreeBSD check if the vnode belongs to a mounted file system
mklost+found Linux create a lost+found directory on a mounted Linux second extended file system
pfs_fstab HP-UX static file system mounting table, mounted file systems table
ff_vxfs HP-UX fast find: list file names and statistics for a VxFS file system
fstatfs HP-UX get file system statistics
ustat Tru64 Get file system statistics
fstatfs OpenBSD get file system statistics
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service