You can switch on and off the CTID field with the 'e' key on your keyboard.
Real-time monitoring in the command line interface can be performed with
# vzstat [-p CTID] [-b|-v]
-p can be used if statistics on one or several containers are required.
-b switches to the brief mode
-v switches to the verbose mode (default)
Set a limit on the number of processes and
# vzctl set 101 --numproc 100:100 --save
check the validity of the container configuration.
# vzcfgvalidate /etc/sysconfig/vz-scripts/101.conf
Adjusting Container Disk Quota Parameters
1 In the host system type
# vzctl exec 101 df
Filesystem 1k-blocks Used Available Use% Mounted on vzfs 1048576 109752 938824 11% /
# vzctl exec 101 df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
vzfs 200000 23577 176423 12% /
2 Now, increase disk space and the number of inodes for the container.
# vzctl set 101 --diskspace 2097152:2097152 –-save
Saved parameters for Container 101
# vzctl set 101 --diskinodes 220000:250000 --sav
3 Check the disk space and the inodes again.
# vzctl exec 101 df
Filesystem 1k-blocks Used Available Use% Mounted on vzfs 2097152 109752 1987400 6% /
# vzctl exec 101 df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
vzfs 220000 23577 196423 11% /
After you increased disk space, more inodes immediately became available.
User-Group Disk Quota
Per-user/group statistics can be obtained by entering
# vzquota stat -t
Using User-Group Disk Quota
Let us enable the user-group disk quota for a container.
Create a container.
# vzctl create 131
Set its quotaugidlimit to 150 and start this container.
# vzctl set 131 --quotaugidlimit 150 --save
# vzctl start 131
We can use UID/GID quotas inside container 131 now.
# vzctl exec 131 repquota -a
# vzquota stat 131 -t
After a container exceeds its UID/GID limits, any new attempt to create a user or a group (or, more precisely, to create on-disk files or directories owned by this user/group) will fail. Already existing users will not be affected in this case.
for CT in $(vzlist -H -o ctid); do echo "== CT $CT =="; vzctl exec $CT uptime; done
for x in `ls /var/vz/veip/`; do echo VID=$x; sudo /usr/sbin/vzctl exec $x "w | grep load";done
Real-time monitoring in the command line interface can be performed with
# vzstat [-p CTID] [-b|-v]
-p can be used if statistics on one or several containers are required.
-b switches to the brief mode
-v switches to the verbose mode (default)
Set a limit on the number of processes and
# vzctl set 101 --numproc 100:100 --save
check the validity of the container configuration.
# vzcfgvalidate /etc/sysconfig/vz-scripts/101.conf
Adjusting Container Disk Quota Parameters
1 In the host system type
# vzctl exec 101 df
Filesystem 1k-blocks Used Available Use% Mounted on vzfs 1048576 109752 938824 11% /
# vzctl exec 101 df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
vzfs 200000 23577 176423 12% /
2 Now, increase disk space and the number of inodes for the container.
# vzctl set 101 --diskspace 2097152:2097152 –-save
Saved parameters for Container 101
# vzctl set 101 --diskinodes 220000:250000 --sav
3 Check the disk space and the inodes again.
# vzctl exec 101 df
Filesystem 1k-blocks Used Available Use% Mounted on vzfs 2097152 109752 1987400 6% /
# vzctl exec 101 df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
vzfs 220000 23577 196423 11% /
After you increased disk space, more inodes immediately became available.
User-Group Disk Quota
Per-user/group statistics can be obtained by entering
# vzquota stat -t
Using User-Group Disk Quota
Let us enable the user-group disk quota for a container.
Create a container.
# vzctl create 131
Set its quotaugidlimit to 150 and start this container.
# vzctl set 131 --quotaugidlimit 150 --save
# vzctl start 131
We can use UID/GID quotas inside container 131 now.
# vzctl exec 131 repquota -a
# vzquota stat 131 -t
After a container exceeds its UID/GID limits, any new attempt to create a user or a group (or, more precisely, to create on-disk files or directories owned by this user/group) will fail. Already existing users will not be affected in this case.
for CT in $(vzlist -H -o ctid); do echo "== CT $CT =="; vzctl exec $CT uptime; done
for x in `ls /var/vz/veip/`; do echo VID=$x; sudo /usr/sbin/vzctl exec $x "w | grep load";done