System Administration Guide

Checking Quotas

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

Table 58-3 describes the commands you use to check quotas.

Table 58-3 Commands for Checking Quotas

Command 

Task 

quota(1M)

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

repquota(1M)

Display quotas, files, and amount of space 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.

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


    # quota [-v] username
    

    -v

    (Optional) Displays users' quotas on all mounted file systems that have quotas. 

    username

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

Example--Checking for Exceeded Quotas

The following example shows that the user account identified by UID 301 has a quota of one Kbyte 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 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.

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


    # repquota [-v] -a | filesystem
    

    -v

    (Optional) Reports on quotas for all users-even those who do not consume resources. (Verbose mode). 

    -a

    Reports on all file systems. 

    filesystem

    (Reports on the specified file system. 

      

Example--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

 

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

 

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