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 vps.nixcraft.in
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
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
VEID CPUUNITS ------------------------- 0 1000 10 1000 Current CPU utilization: 2000 Power of the node: 299281
- Read man pages – vzctl, vzcpucheck, vzcalc, and vzlist
- The official OpenVZ wiki.
- 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.