Getting Quota Reports

You can use the quota_report script to obtain a statistical report on the storage limits and usage of disk space allocated to "users" or "groups". When you run the script, it invokes a system call quotactl that returns the following quota storage and usage information, one line for each unit of information, for the specified user ID and group ID.

Each line in the output translates to the following information:

Output Line 1: User quota enabled/disabled : Group quota enabled/disabled.
Uses "1" or "0" to indicate whether the user or group quotas are enabled or disabled respectively.

Output Line 2: Current disk space occupied by quotas (in 1024-byte blocks)
Displays the current disk space occupied by quotas in blocks of 1024-bytes.

Output Line 3: Absolute limit on disk space (in Kilobytes)
The absolute or "hard" limit indicates the maximum permissible limit for disk space usage within the set time limit. On exceeding the limit or the time period, the user is prevented from using additional disk space until disk space consumption is moderated below the preferred limit.

Output Line 4: Time limit for excessive disk usage
The time, in number of minutes, available for using or allocating disk space in excess of the limit. On expiry of the time limit you will be unable to allocate or use additional disk space. The default time limit is set to one week or seven days.

Output Line 5: Number of inodes used currently
The number of inodes that are used currently.

Output Line 6: Preferred limit for inodes
The preferred or "soft" limit indicates the maximum number of inodes that can be stored on a user's allocated disk space. If you set the absolute limit and the time limit for additional inodes then the user can exceed the preferred limit for inodes until:

Once the absolute limit or the time limit expires, additional inodes cannot be created until the user reduces disk space usage below the preferred limit. This resets the time limit assigned for additional inodes.

Important: If the absolute limit or the time limit for additional inodes is not set, then inodes in excess of the preferred limit cannot be supported.

Output Line 7: Absolute limit on inodes
The absolute or "hard" limit indicates the maximum permissible limit for the number of inodes that can be stored on the disk space within the set time limit. If the absolute limit or the time period is exceeded, no additional inodes can be created until disk space consumption is moderated below the preferred limit.

Output Line 8: Time limit for excessive inode usage
The time, in number of minutes, available for supporting additional inodes in excess of the "preferred" limit. On expiry of the time limit you will be unable to support additional inodes. The default time limit is set to one week or seven days.

Note: Parallels Pro Control Panel sets and manages quotas with the following default parameters: the "preferred" and "absolute" quota limits are equal; inode limits are not set.

Syntax

/usr/bin/quota_report -d <directory> [-q|-u <uid>|-g <gid>]

Sample script and output

quota_report -d / -g 504

1:1
36376
512000
0
4445
0
0
0