OpenVZ Commands

To start a VPS

vzctl start <VPSID>
To Stop a VPS

vzctl stop <VPSID>
To Restart a VPS

vzctl restart <VPSID>
To Delete a VPS (all data will be deleted, no confirmation, so be careful)

vzctl destroy <VPSID>
To show resources used by a VPS

vzcalc -v <VPSID>
[root@server12 ~]# vzcalc -v 244
Resource Current(%) Promised(%) Max(%)
Low Mem 0.12 3.96 3.96
Total RAM 1.88 n/a n/a
Mem + Swap 1.67 2.54 n/a
Alloc. Mem 2.53 2.87 40.47
Num. Proc 0.02 n/a 0.72
——————————————–
Memory 2.53 3.96 40.47
[root@server12 ~]#
To list all running VPS

vzlist
To list all VPS

vzlist -a
To check CPU usage by OpenVZ, Run vzcpucheck

[root@server12 ~]# vzcpucheck
Current CPU utilization: 3000
Power of the node: 478753
[root@server12 ~]#
To get CPU usage per VPS, run vzcpucheck -v

[root@server12 ~]# vzcpucheck -v
VEID CPUUNITS
————————-
0 1000
103 1000
233 1000
Current CPU utilization: 3000
Power of the node: 478753
[root@server12 ~]#
To execute a command inside VPS

[root@server12 ~]# vzctl exec 103 df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/simfs 104857600 66230024 38627576 64% /
[root@server12 ~]# vzctl exec 103 uptime
13:01:49 up 25 min, 0 users, load average: 0.00, 0.00, 0.00
[root@server12 ~]#

 

Command to check the load of all VPS from main server node.

vzlist -o veid,laverage

It will show the below output:

CTID LAVERAGE

101 3.02/3.32/3.31
102 5.35/3.30/3.38
103 03.34/3.03/3.50
104 0.93/0.61/0.66
105 1.67/1.67/1.85
106 0.02/0.01/0.00

 

https://techsha.wordpress.com/2012/06/22/virtuzzo-commands/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s