OpenVZ Virtual Machine (VPS) Management

September 8, 2019

Rate this post

Now, my VPS is up and running. How do I manage my hardware node and VPS? How do I see a list of all running VPSes? How do I see memory usage and other stuff?

This FAQ covers various containers utilities which may be used to solve many problems and tune overall hardware as per your setup.

How Do I List All Running VPSs?

The command vzlist is used for listing containers and their parameters. The -a option list all containers:
# vzlist -a

     CTID      NPROC STATUS  IP_ADDR         HOSTNAME                        
        10         12 running 123.xx.yyy.zz

The -o option can display only parameters specified by names, for e.g. just display hostname, disk and memory info:
# vzlist -o ctid,hostname,kmemsize,kmemsize.l,diskspace
See vzlist man page for more information.

How Do I Calculate The Container’s Resources Usage?

The vzcalc utility displays the share of the host system resources a particular container is using. If the container is running, the current usage is displayed. High utilization values (>100%) mean the system is overloaded (or the container has an invalid configuration).
# vzcalc -v 10
Sample Outputs:

Resource     Current(%)  Promised(%)  Max(%)
Low Mem          0.30       5.23       5.23
Total RAM        0.43        n/a        n/a 
Mem + Swap       0.21       2.95        n/a
Alloc. Mem       0.34       3.69       7.13
Num. Proc        0.04        n/a       0.73
Memory           0.43       5.23       7.13

How Do I Shows Information About The CPU Power and Utilization?

Use vzcpucheck command:
# vzcpucheck -v

0		1000
10		1000
Current CPU utilization: 2000
Power of the node: 299281

Further readings:

  1. Read man pages – vzctl, vzcpucheck, vzcalc, and vzlist
  2. The official OpenVZ wiki.
  3. The official CentOS Linux project.


In this series, you learned how to work with OpenVZ virtualization under CentOS / RHEL Linux environment. OpenVZ has a completely different approach to virtualization, it almost works like FreeBSD jails or Solaris zones. I highly recommend the official OpenVZ wiki for further details.

This entry is 5 of 5 in the RHEL / CentOS Linux OpenVZ Virtualization Tutorial series. Keep reading the rest of the series:

  1. How To Setup OpenVZ under RHEL / CentOS Linux
  2. CentOS Linux Install OpenVZ Virtualization Software
  3. How To Create OpenVZ Virtual Machines (VPS)
  4. OpenVZ Iptables: Allow Traffic To Pass Via venet0 To All VPS
  5. OpenVZ Virtual Machine (VPS) Management

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.