vzfree utility to check memory usage in OpenVZ VPS

From the official blog post

Gee. It has been a while since I’ve last written here, and it will be a while again for my next post as I will be on holidays from next Monday (visiting families in Hong Kong and Taiwan). Let me share one small utility program that I wrote quite a while ago.

We all know that the Linux command free(1) is pretty useless inside an OpenVZ VE, even those with meminfo virtualised. So I basically wrote this little util to grab the data from the dreadful user_beancounters and format them into something useful. It’s written in C and only depends on libc so it’s pretty light weight. It also does a little bit of analysis instead of just dumping the data, which I will explain later on.

Continue reading

Find memory consumed by currently running processes on Linux?

I always had the question (when I am running plenty of scripts on a linux box as to what is eating up all the memory? Finding memory consumed by current running processes in your favorite linux distro. Luckily, I found a great Python utility (scriplet to be exact).

Continue reading

NAGIOS 3 with notifications on twitter

I have been experimenting with NAGIOS3 on Ubuntu (I will write a how-to-install on NAGIOS later) and it has served me very good in monitoring my 7 VPS from different providers in different part of the world. I have already recorded 3 hours of downtime from ThrustVPS which is a great deal for me. I now know which VPS has the best time and which ones have hiccups (e.g. my 2Host VPS gave me two unreachable notifications but the VPS was running and still reports the uptime as 4 days).

Since I use twitter more, even when Im on the road, notifications via email is a bit slow for me. Luckily I found a great tutorial online to do that.

Continue reading

Not getting a package on Ubuntu?

If you are not getting a package on Ubunu using apt-get then chances are that it has not been updated in the /etc/apt/sources.list file

For example, the following should be there in the sources.list file if you are running Ubuntu 10.04 LTS (codename lucid)

## main & restricted repositories
deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted

deb http://security.ubuntu.com/ubuntu lucid-updates main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-updates main restricted

deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted

## universe repositories - uncomment to enable
deb http://us.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe

deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe

deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe

How to install byte-unixBench on Ubuntu

From UnixBench project homepage:

UnixBench is the original BYTE UNIX benchmark suite, updated and revised by many people over the years.

The purpose of UnixBench is to provide a basic indicator of the performance of a Unix-like system; hence, multiple tests are used to test various aspects of the system’s performance. These test results are then compared to the scores from a baseline system to produce an index value, which is generally easier to handle than the raw scores. The entire set of index values is then combined to make an overall index for the system.

Some very simple graphics tests are included to measure the 2D and 3D graphics performance of the system.

Multi-CPU systems are handled. If your system has multiple CPUs, the default behaviour is to run the selected tests twice — once with one copy of each test program running at a time, and once with N copies, where N is the number of CPUs. This is designed to allow you to assess:

* the performance of your system when running a single task
* the performance of your system when running multiple tasks
* the gain from your system’s implementation of parallel processing

Do be aware that this is a system benchmark, not a CPU, RAM or disk benchmark. The results will depend not only on your hardware, but on your operating system, libraries, and even compiler.

First install required libraries for compilation :

apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl  perl-modules make

Then get the unixbench and run it :

wget http://byte-unixbench.googlecode.com/files/unixbench-5.1.2.tar.gz
tar xvf unixbench-5.1.2.tar.gz
cd unixbench-5.1.2
./Run

Installing PHP 5.2.6 on CentOS box

If you want to install PHP 5.2.x instead of the PHP 5.1.6 offered with default CentOSPlus repo. Please consider installing the utterramblings repo. Setting up this repo is a breeze … just follow these steps

Continue reading

$7.99 Domain Names from GoDaddy

I blogged earlier about $1.99 Domain Names from GoDaddy.com, now here are two more coupons to register a domain name for $7.49 ONLY (I have registered many domain names over the past many months using this coupon so it ALWAYS works).

The coupons are hash7 and chill7.

Enjoy!

Updates: Working as of 05th July, 2009

$1.99 Domain Names from GoDaddy

199BUYCOM - $1.99 Domain Name Offer from Godaddy.com

Yes, its true. GoDaddy is now selling domain names for just $1.99 ($2.19 after adding 20 cent ICANN fee). All you need to do is use the coupon 199BUYCOM before checkout. You dont need to buy additional services to avail this offer.

This offer has the following limitations

  1. Only valid for one new domain name or domain name transfer per account
  2. Valid for 7,500 orders or 07-July-2009, whichever comes first.

Enjoy!

Updates: Working as of 05th July 2009. I just registered a domain name using this coupon.