Checking Quotas

After you have set up and turned on disk quotas and inode quotas, you can check for users who exceed their quotas. In addition, you can check quota information for entire file systems.

The following table describes the commands that you use to check quotas.

Table 14.2. Commands for Checking Quotas

Command

Task

quota ( 1M )

Displays user quotas and current disk use, and information about users who are exceeding their quotas

repquota ( 1M )

Displays quotas, files, and the amount of space that is owned for specified file systems

How to Check for Exceeded Quotas

You can display the quotas and disk use for individual users on file systems on which quotas have been activated by using the quota command.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services .

  2. Display user quotas for mounted file systems where quotas are enabled.

    # quota [-v] username
    
    v

    Displays one or more users' quotas on all mounted file systems that have quotas.

    username

    Is the login name or UID of a user's account.

Example 14.6. Checking for Exceeded Quotas

The following example shows that the user account identified by UID 301 has one 1–Kbyte quota but has not used any disk space.

# quota -v 301
Disk quotas for bob (uid 301):
Filesystem  usage  quota limit timeleft files quota  limit timeleft
/export/home   0      1     2             0      2      3
Filesystem

Is the mount point for the file system.

usage

Is the current block usage.

quota

Is the soft-block limit.

limit

Is the hard-block limit.

timeleft

Is the amount of time, in days, left on the quota timer.

files

Is the current inode usage.

quota

Is the soft-inode limit.

limit

Is the hard-inode limit.

timeleft

Is the amount of time, in days, left on the quota timer.

How to Check Quotas on a File System

Display the quotas and disk use for all users on one or more file systems by using the repquota command.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services .

  2. Display all quotas for one or more file systems, even if there is no usage.

    # repquota [-v]  -a filesystem
    
    v

    Reports on quotas for all users, even those users who do not consume resources.

    a

    Reports on all file systems.

    filesystem

    Reports on the specified file system.

Example 14.7. Checking Quotas on a File System

The following example shows output from the repquota command on a system that has quotas enabled on only one file system (/export/home).

# repquota -va
/dev/dsk/c0t3d0s7 (/export/home):
                  Block limits              File limits
User      used   soft   hard  timeleft  used  soft   hard  timeleft
#301  --            0      1   2.0 days         0      2      3  
#341  --    57     50     60   7.0 days  2      90    100  
Block limits

Definition

used

Is the current block usage.

soft

Is the soft-block limit.

hard

Is the hard-block limit.

timeleft

Is the amount of time, in days, left on the quota timer.

File limits

Definition

used

Is the current inode usage.

soft

Is the soft-inode limit.

hard

Is the hard-inode limit.

timeleft

Is the amount of time, in days, left on the quota timer.