Find largest files on CentOS

Today I had a problem with a server where mysql would not start anymore. When starting mysql I got an error message saying:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

So I had a look in my mysql log file (located at /var/log/mysqld.log) and noticed there was no more space on the server.

I needed to know which files were causing this problem and there is a nice command to do this:

Converting wav to alaw (with help from Asterisk)

I was looking for a way to convert wav files to alaw files and had trouble finding the right software to do this so I tried using sox but got some strange errors when converting to alaw

After playing around a bit I found a workaround by converting to gsm format first using sox and using Asterisk to convert gsm format to alaw next.

Let me explain how:

1. Upload your wav file to your server and make sure you put it in a directory the Asterisk user and group have access to.

Ctrl + Alt + F1 in VMWare Virtual Machine

When installing a new distro on a VMWare Virtual Machine my guest OS asked me to press Ctrl + Alt + F1.
Offcourse when pressing Ctrl + Alt, VMWare released the keyboard and mouse control...

When searching for a workaround I found this solution:

Press Ctrl + Alt + Space, then release the spacebar while still holding down the Ctrl + Alt keys, then pres the F1 key.

The Difference Between Managers and Leaders

I came across this article by Ilya Pozin and I found it worthwhile to post:

The Difference Between Managers and Leaders

It's time to face the music as a manager: You don’t always have all of the right answers. Your “it’s my way or the highway” approach to management isn’t going to encourage anyone to help you in your problem solving endeavors.

Rebuilding AstDB

I had a strange issue today, one of my phones couldn't be dialed by other phone but it could dial out without any issues.
When someone dialed the extension they just got a busy tone.

After trying a lot of different things I went for help on IRC in the #freepbx channel.
Fortunately I got the advice to rebuild AstDB and that solved al issues I had.

Rebuilding AstDB is much easier than it sounds, just follow these steps:

1. Stop the asterisk service (in FreePBX you can just type: amportal stop)

FreePBX - firstboot error

When installing the latest FreePBX Distro ( I got an error message after installation:

Some firstboot error occured, and the system is not properly setup.
Check to see if you have internet access and re-run /etc/ Press ctrl-alt-f1 to continue

CentOS 6 - First Network Setup

As you may have noticed, a new CentOS 6 installation will not have network access by default. You can run the command setup (as you were used to from CentOS 5) but might end up with the response: command not found

What to do now?

You can try to locate setup by typing: which setup
If you are lucky you will find it (often in usr/sbin/setup) but you could also get the response: no setup in....

So the next option is to configure the network settings manually: