quotactl.2 (2010 09)

q
quotactl(2) quotactl(2)
NAME
quotactl - manipulate disk quotas
SYNOPSIS
#include <sys/quota.h>
int quotactl(int cmd, const char *special, id_t id, void *addr);
DESCRIPTION
quotactl() manipulates disk quotas. cmd indicates a command to be applied to the user or group ID
id. A command is composed of a primary command and a type that is used to interpret the id parameter.
Types supported are USRQUOTA for users and GRPQUOTA for groups. To set the type of quota use the
QCMD(cmd, type) macro. Parameter special is a pointer to a null-terminated string containing the
path name of the block special device for the file system being manipulated. The block special device
must be mounted. The parameter addr is the address of an optional, command-specific, data structure
which is copied in or out of the system. The interpretation of addr is explained with each command
below:
Q_QUOTAON Turn on quotas for a file system. The parameter addr points to the path name of
file containing the quotas for the file system. The quota file must exist; it is nor-
mally created using the
quotacheck command (see quotacheck (1M)). The id
parameter is ignored. This call is restricted to users having appropriate
privileges.
Q_QUOTAOFF Turn off quotas for a file system. The addr and id parameters are ignored. This
call is restricted to the user with appropriate privileges.
Q_GETQUOTA Get disk quota limits and current usage for user or group id. addr is a pointer
to a dqblk structure (defined in <sys/quota.h>
). Only users having
appropriate privileges can get the quotas of a user other than himself.
Q_GETQUOTA64 Get 64-bit disk quota limits and current usage for user or group id. addr is a
pointer to a dqblk64 structure (defined in <sys/quota.h>
). Only users
having appropriate privileges can get the quotas of a user other than himself.
VxFS 3.5 will only track usage for dqb64_curblocks up to to 2 TB.
Q_SETQUOTA Set disk quota limits and current usage of files and blocks for user or group id.
Note
vxfs does not allow the current usage fields to be changed. addr is a
pointer to a dqblk structure (defined in <sys/quota.h>
). This call is res-
tricted to users with appropriate privileges.
Q_SETQUOTA64 Set 64-bit disk quota limits and current usage of files and blocks for user or
group id. Note
vxfs does not allow the current usage fields to be changed.
addr is a pointer to a dqblk64 structure (defined in <sys/quota.h>
). This
call is restricted to users with the appropriate privileges.
Q_SETQLIM Set disk quota limits for user or group id. The parameter addr is a pointer to a
dqblk structure (defined in <sys/quota.h>). This call is restricted to users
with appropriate privileges.
Q_SETQLIM64 Set 64-bit disk quota limits for user or group id. The parameter addr is a
pointer to a dqblk64 structure (defined in <sys/quota.h>). This call is
restricted to users with the appropriate privileges.
Q_QUOTAINFO Retrieve information about quotas supported by file system id . The parameter
addr is a pointer to a uint64_t flags word. The meaning of the various bit
fields are defined in <sys/quota.h>.
Q_SYNC Update the on-disk copy of quota usages for a file system. If special is null, all
file systems with active quotas are synced. The parameters addr and id are
ignored.
RETURN VALUE
Upon successful completion,
quotactl() returns 0; otherwise, it returns 1 and sets errno to indi-
cate the error.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)