These commands are used for querying quota statistics. The syntax is as below:
options] show <
CT_ID> [-t] [-f] [-c
options] stat <
CT_ID> [-t] [-c
The difference between the
vzquota stat and
vzquota show commands is that the first one reports usage from the kernel while the second one reports usage as written in the quota file. However, by default
vzquota stat updates the file with the last kernel statistics. If you do not want to update the quota file, add the
f switch to the command.
You can specify an alternative location to the quota file with the
quota_file switch. Otherwise, the default
> file will be used.
To add information on user/group quota to the above commands output, use the
t command line switch.
A typical output of the
vzquota stat command is shown below:
# vzquota stat 101 -t
resource usage softlimit hardlimit grace
1k-blocks 113856 2097152 2097152
inodes 42539 200000 220000
User/group quota: on,active
Ugids: loaded 33, total 33, limit 100
Ugid limit was exceeded: no
User/group grace times and flags:
type block_exp_time inode_exp_time hex_flags
type ID resource usage softlimit hardlimit grace status
user 0 1k-blocks 113672 0 0 loaded
user 0 inodes 42422 0 0 loaded
This output is suppressed for the sake of simplicity. As can be seen, Container 101 has the same soft and hard limits for disk space and Container can occupy up to 2 Gb of disk space. The current usage is 113 Mb. There are 42,539 inodes used by the Container, it has soft limit of 200,000 inodes and hard limit is set to 220,000. The empty grace column shows that grace period is started neither for inodes nor for disk space.
Per user/group quota is turned on and up to 100 users and groups are counted by the quota. Currently, there are 33 users and groups found in the Container and statistics for root is shown. There are no limits set from within the Container, and the current usage for root is 42,422 inodes and 113 Mb of disk space.
Please send us your feedback on this help page