Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ustat(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dustat

statx, fstatx, stat, fstat, fullstat, ffullstat, lstat

fs



USTAT(2,L)                  AIX Technical Reference                  USTAT(2,L)



-------------------------------------------------------------------------------
ustat



PURPOSE

Gets file system statistics.

SYNTAX

#include <sys/types.h>
#include <ustat.h>

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

DESCRIPTION

The ustat system call gets information about the mounted file system identified
by device number dev.  The dev parameter is the ID of the file system, and it
corresponds to the st_dev member of the structure returned by the statx, stat,
and fullstat system calls.

If the Transparent Computing Facility is installed, the following warning is
applicable.

Warning:  When ustat is used on a replicated file system, the space on the
local copy is returned, if there is a local copy; otherwise, space information
from the current synchronization site is returned.

See "dustat" for more information on obtaining data for replicated file
systems.  See "statx, fstatx, stat, fstat, fullstat, ffullstat, lstat" for more
information about the device ID.  The information is stored into a structure
pointed to by the buf parameter.

The ustat structure pointed to by the buf parameter is defined in the ustat.h
file, and it contains the following members:

      daddr_t   f_tfree;        /* Total free blocks */
                                /* in units of 512 byte blocks */
      ino_t     f_tinode;       /* Number of free inodes */
      char      f_fname[6];     /* File system name */
      char      f_fpack[6];     /* File system pack name */

RETURN VALUE

Upon successful completion, a value of 0 is returned.  If the ustat system call
fails, a value of -1 is returned and errno is set to indicate the error.





Processed November 7, 1990        USTAT(2,L)                                  1





USTAT(2,L)                  AIX Technical Reference                  USTAT(2,L)



ERROR CONDITIONS

The ustat system call fails if one or more of the following are true:

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

EFAULT    The buf parameter points to a location outside of the process's
          allocated address space.

If the Transparent Computing Facility is installed on your system, ustat can
also fail if one or more of the following are true:

ESITEDN1  The request cannot be serviced because the site with the file system
          is no longer available.

ESITEDN2  The operation was terminated because a site failed.

EINTR     A signal was caught during the system call.

RELATED INFORMATION

In this book:  "dustat," "statx, fstatx, stat, fstat, fullstat, ffullstat,
lstat," and "fs."































Processed November 7, 1990        USTAT(2,L)                                  2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026