Install vzdump on Centos for OpenVZ

1. Download vzdump rpm package from


2. Download cstream rpm package from

  • select i386 or x86_64 according to OS you installed
  • click to RPMS.dag folder

Example for 32bit OS



3. Download perl(LockFile::Simple) rpm package

wget 4.


4. Install rpms

rpm -Uvh –force perl-LockFile-Simple-0.206-1.el5.rf.noarch.rpm

rpm -Uvh –force cstream-2.7.4-3.el5.rf.i386.rpm

rpm -Uvh –force vzdump-1.2-4.noarch.rpm

Note: We use -Uvh –force to update any installed package


5. Type

ln -s /usr/share/perl5/PVE/ /usr/lib/perl5/5.8.8/PVE



Pretty print JSON


How to Free up RAM Memory in Centos RHEL Redhat Linux

Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.

To free pagecache:

echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

echo 3 > /proc/sys/vm/drop_caches

As this is a non-destructive operation and dirty objects are not freeable, the user should run `sync’ first.

Sync Database Table





Cleaning Up Stale Transients

WordPress transients are very similar to DB options but they also support expiration times. The Transients API documentation states:

Our transient will die naturally of old age once $expiration seconds have passed since we last ran set_transient()

What you might not know if you haven’t explored the source code of the transients API is that transients stored in the database* will not actually “die of old age”. Instead, a stale transient will stick around until someone tries to access it. Only then will WordPress notice that the transient has expired and delete it. If no-one ever attempts to read a stale transient – e.g. because the plugin that created it has been uninstalled – it will stay in your database forever.

* If you have a suitable caching plugin installed, transients can be stored in a fast in-memory cache like APC or Memcached instead of the database.

Fortunately, since the expiration time of each transient is also stored in the database, we can easily clean up stale transients with a little bit of SQL magic. Run the two queries below to delete all stale transients. You can use either phpMyAdmin or a plugin like WP-DBManager to execute SQL queries.