unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 ustat(2)							    ustat(2)




 NAME
      ustat() - get mounted file system statistics

 SYNOPSIS
      #include <&lt&lt&lt;ustat.h>&gt&gt&gt;

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

 DESCRIPTION
      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 <&lt&lt&lt;ustat.h>&gt&gt&gt;) that includes the following elements:

	   daddr_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
      ustat() returns the following values:

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

 ERRORS
      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.

 WARNINGS
      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
      inodes at the current time.

 AUTHOR
      ustat() was developed by AT&T and HP.

 SEE ALSO
      touch(1), stat(2), statvfs(2), fs(4), fs_vxfs(4).



 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 ustat(2)							    ustat(2)




 STANDARDS CONFORMANCE
      ustat(): SVID2, SVID3, XPG2




















































 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000