cPanel – Webmail (cpanelro) Highload
July 30th, 2009From cPanel Forum:
CPU Process has a high load, with many cpanelro user taking the cpu time. Below is script to kill cpanelro’s process
#!/bin/sh
for ROUND in `ps aux | grep roundcube | awk -F " " '{print $10}' | awk -F ":" '{print $1}'`;
do
if [ $ROUND -ge 20 ]; then
pkill -u cpanelroundcube
echo "kill roundcube process roundcube";
fi
done
Put in crontab and run it every 15 or 30minutes. Or you can edit RoundCube file to fix a never ending loop caused when trying to log in with an invalid account
PHP with SuPHP on cPanel
June 27th, 2009When you activated SuPHP on cPanel servers, this is the normal output should be.
The MIME types associated with PHP may have changed.
If you experience problems with PHP related settings in .htaccess files, ensure
those files use the MIME types specified above (the first value listed after AddType.)
Replacing A Failed Hard Drive In A Software RAID1 Array
June 23rd, 2009I was checking Development MySQL server (what did you know, I am not that lazy) and I found errors at /var/log/messages, I assume the secondary HDD (/dev/hdb) failed. Fiuh, I am lucky configured this server using Software-Raid1 otherwise all data has gone.
Jun 19 15:51:56 dbdemo smartd[2117]: Device: /dev/hdb, 37997 Currently unreadable (pending) sectors
Jun 19 15:51:56 dbdemo smartd[2117]: Device: /dev/hdb, 37997 Offline uncorrectable sectors
Jun 19 16:21:57 dbdemo smartd[2117]: Device: /dev/hdb, 38010 Currently unreadable (pending) sectors
Jun 19 16:21:57 dbdemo smartd[2117]: Device: /dev/hdb, 38010 Offline uncorrectable sectors
Jun 19 16:23:47 dbdemo kernel: hdb: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
Luckily, uncle Google very nice to me and show me article on Howtoforge.com, following the article I am confident to replace failed harddisk. Below is my Raid configuration:
Array: /dev/md0; Member: /dev/hda1 /dev/hdb1; Raid: 1; Filesystem: ext3fs; mountpoint: /boot
Array: /dev/md1; Member: /dev/hda2 /dev/hdb2; Raid: 0; Filesystem: swap; mountpoint: swap
Array: /dev/md2; Member: /dev/hda3 /dev/hdb3; Raid: 1; Filesystem: ext3fs; mountpoint: /
Summary of Howtoforge’s article is below:
Add Swap on Linux
June 23rd, 2009From: FelipeCruz
To add swap partition use command
# mkswap /dev/hdb2 # swapon /dev/hdb2 # vi /etc/fstab # /dev/hdb2 swap swap defaults 0 0
With assuming you already create /dev/hdb2 partition before using fdisk and chose swap filesystem.