Parallels Virtuozzo Containers is an operating system-level virtualization product designed for large-scale homegenous server environments and data centers. Parallels Virtuozzo Containers is compatible with x86, x86-64 and IA-64 platforms. Parallels Virtuozzo Containers was first released under Parallels’ former parent company SWsoft. The Linux version was released in 2001 while the Windows version was released in 2005.
It’s very similar to OpenVZ, and most of these commands will work similarly. As always, use your head and do your homework before copying and pasting any of these commands into a root shell.
Increase a VPS server’s inode limits:
vzctl set X –diskinodes 900000:900000 –save
To generate a ‘vzstatrep’ report since the previous day:
vzstatrep –nologrotate –plot –sendmailto your@email.com
To print out the percentage of cpu cycles burned per VPS:
vzstatcpu -a /var/log/vzstat/vzstatmon.full.log | awk ‘$1 ~ /[0-9]+/{a[$1]=$2} \
/Total/{total=$2;}END{ for (key in a)print key ” ” ((a[key]/total)*100) “%”}’ \
| sort -nk2
Top VEID resource users for last few days history:
for file in $(ls /var/log/vzstat/vzstatmon.full.log /var/log/vzstat/vzstatmon.full.log.[0-9].gz | sort -n);
do
zcat $file 2>/dev/null | vzstatcpu -5 -;
done | less
view last few days history for one VEID:
for file in $(ls /var/log/vzstat/vzstatmon.full.log /var/log/vzstat/vzstatmon.full.log.[0-9].gz | sort -n); do zcat $file 2>/dev/null | vzstatcpu -v 1 -; done | less
view all vserver’s stats plus the mysql queries/second.
ovzstatus.pl –full
list all processes and sort by cpu usage
vzps -E auwx X | sort -nk4
search for long running queries across all VEIDs:
for ve in $(vzlist -Ho veid); do echo ===$ve===;vzctl exec $ve mysqladmin processlist|awk -F”|” ‘/[0-9]+/{if ($7>1){print $6,$7}}’;done
watch for excessive use of cpu time or lots of processes hung in iowait.
vztop, hit ‘e’ to show veids, then hit ‘i’ for show only idle processes
# fun with netstat
netstat -plan|grep :80|awk {‘print $5′}|cut -d: -f 1|sort|uniq -c|sort -nk 1
vzstat
vzctl exec | exec2
[arg ...]
# when a vps doesn’t restart, and its not because of the inodes but you get warnings:
vzctl umount XXX and try vpsrestart XXX
# vps backfilling
vp8 -rhonly
4cpu – no more than 60
8cpu – no more than 80 (unless 64bit/32G – then 100)
no transcostal migrations
vzpkg list veid #find what OS they’re running
vp21 and up has large drives (1.5TB)
# vps ftp issue
30000_50000 IG_TCP_CPORTS on /etc/apf/conf.apf
# how to add a new IP address to a VPS and get cPanel to recognize it:
On the VP node:
vzctl set[--save] [--ipadd ] [--ipdel |all] –SAVE
Then update cPanel license on the VPS:
/usr/local/cpanel/cpkeyclt ; /scripts/rebuildippool
This will restart chkservd for all containers:
for veid in $(vzlist -Hao veid);
do
if ! vzctl exec2 $veid “service chkservd restart”;
then echo $veid;
fi;
done