Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ quota(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getrlimit, setrlimit, vlimit

getrusage, vtimes

setquota

ulimit



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



-------------------------------------------------------------------------------
quota



PURPOSE

Manipulate disk quotas.

SYNTAX

#include <sys/quota.h>

int quota (cmd, uid, arg, addr)
int cmd, uid, arg;
char *addr;

DESCRIPTION

The quota system call manipulates disk quotas for file systems that have had
quotas enabled with setquota.  The cmd parameter indicates a command to be
applied to the user ID, specified by the uid parameter.  The arg parameter is a
command-specific argument, and the addr parameter specifies the address of an
optional, command-specific, data structure that is copied in or out of the
system.  interpretation of the arg and address parameters is given with each
command as follows:

Q_SETDLIM Set disk quota limits and current usage for the user specified by the
          uid parameter.  The arg parameter specifies a major/minor device
          indicating a particular file system.  The addr parameter is a pointer
          to a struct dqblk, as defined in sys/quota.h.

          Only superusers may set quota limits.

Q_GETDLIM Get disk quota limits and current usage.  Parameters are the same as
          for Q_SETDLIM.

          This command is unprivileged.

Q_SETDUSE Set disk usage limits for a user.  Parameters are the same as for
          QSETDLIM, except that addr points to a struct dqusage structure.

          Only superusers may set usage limits.

Q_SYNC    Update the on-disk copy of quota usages. The arg indicates the
          major/minor device number of the file system to be updated.  If the
          arg parameter is specified as NODEV, all file systems that have disk
          quotas will be updated.  The uid and addr parameters are ignored.

          This command is unprivileged.





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





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



Q_SETUID  Change the calling process's quota limits to those of the user with
          ID uid.  The arg and addr parameters are ignored.

          Only superusers may set the quota user ID.

Q_SETWARN Alter the disk usage warning limits for the user with ID uid.  The
          arg parameter specifies the major/minor device number of a particular
          file system to which this command is to be applied.  The addr
          parameter is a pointer to a struct dqwarn structure.

          Only superusers may set the usage warning limits.

Q_DOWARN  Warn the user specified by the uid parameter about excessive disk
          usage.  This call causes the system to check its current disk usage
          information and print a message on the terminal of the user, if the
          user is over quota.  If the user is under quota, his warning count is
          reset to MAX*WARN (defined in sys/quota.h).  If the arg parameter
          specifies NODEV, all file systems that have disk quotas will be
          checked.  Otherwise, arg specifies a specific file system's
          major/minor device number.

          Only superusers may send warnings.

RETURN VALUE

A 0 return value indicates that the call succeeded.  A return value of -1
indicates that an error occurred, and an error code is stored in the global
variable errno.

ERROR CONDITIONS

If quota system call fails if one or more of the following are true:

EINVAL    The system is not configured to support quota option.

EINVAL    The cmd parameter is invalid.

ESRCH     No disk quota is found for the user ID uid.

EPERM     The cmd parameter requires privilege, and the calling process's
          effective user ID does not have superuser privileges.

ENODEV    The arg parameter indicates an invalid or unmounted file system.

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

EUSERS    The quota table is full.

RELATED INFORMATION





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





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



In this book:  "getrlimit, setrlimit, vlimit," "getrusage, vtimes," "setquota,"
and "ulimit."

The discussion of quotacheck and quotaon in AIX Operating Systems Commands
Reference.


















































Processed November 7, 1990        QUOTA(2,L)                                  3



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