
Managing Resources
53
Checking Quota Status
As the Hardware Node system administrator, you can check the quota status for any Virtual
Private Server with the
vzquota stat
and
vzquota show
commands. The first command
reports the status from the kernel and shall be used for running Virtual Private Servers. The
second command reports the status from the quota file (located at
/var/vzquota/quota.
vpsid
) and shall be used for stopped Virtual Private Servers. Both
commands have the same output format.
The session below shows a partial output of VPS 101 quota statistics:
# vzquota stat 101 –t
resource usage softlimit hardlimit grace
1k-blocks 38281 1000000 1100000
inodes 45703 90000 91000
User/group quota: on,active
Ugids: loaded 34, total 34, limit 100
Ugid limit was exceeded: no
User/group grace times and quotafile flags:
type block_exp_time inode_exp_time dqi_flags
user 0h
group 0h
User/group objects:
ID type resource usage softlimit hardlimit grace status
0 user 1k-blocks 38220 50000 60000 loaded
0 user inodes 45453 70000 70000 loaded
[the rest is skipped]
The first three lines of the output show the status of first-level disk quotas for the Virtual Private
Server. The rest of the output displays statistics for user/group quotas and has separate lines for
each user and group ID existing in the system.
If you do not need the second-level quota statistics, you can omit the
–t
switch from the
vzquota
command line.
Managing CPU Share
The current section explains the CPU resource parameters (CPU share) that you can configure
and monitor for each Virtual Private Server.
The table below provides the name and the description for the CPU parameters. The
File
column
indicates whether the parameter is defined in the OpenVZ global configuration file (G) or in the
VPS configuration files (V).
Parameter
Description
File
ve0cpuunits
This is a positive integer number that determines the minimal guaranteed
share of the CPU time Virtual Private Server 0 (the Hardware Node
itself) will receive. It is recommended to set the value of this parameter
to be 5-10% of the power of the Hardware Node.
G