web analytics

Monthly Archives October 2009

/backup taking up space

Sometimes you may get a disk critical error, and if it is the cpanel backup that is taking space, the following may help. Sometimes the backup of a lot of terminated/cancelled accounts may be present in the backup which may be adding to the disk usage. The following scripts checks the monthly backup and if there are backups of inactive accounts in the server, deletes them to regain space.

1) Get the accounts in /etc/userdomains

cat /etc/userdomains | awk -F: ‘{print $2}’ > /root/list_domains

2) Get the ac...

Read More

Kernel Compilation


Mainly 2 purposes:

1. Reduce the size of the kernel
2. Activation and deactivation of support for devices.

Packages to be checked when upgrading from 2.4 to 2.6

o Gnu C 2.91.66 # gcc –version
o Gnu make 3.77 # make –version
o binutils # ld -v
o util-linux 2.10o # fdformat –version
o modutils 2.4.2 # insmod -V
o e2fsprogs 1.19 # tune2fs
o reiserfsprogs 3.x.0b # reiserfsck 2>&1|grep reiserfsprogs
o pcmcia-cs 3.1.21 # cardmgr -V
o PPP 2.4.0 # pppd –version
o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version

2.6.x series
o Gnu C 2.95.3 # gcc –version
o Gnu make 3.78 # make –version
o binutils 2.12 # ld -v
o util-linux 2.10o # fdformat –version
o module-init-tools 0.9.10 # depmod -V
o e2fsprogs 1.29 # tune2fs
o jfsutils 1.1.3 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
o xfsprogs 2.1.0 # xfs_db -V
o pcmcia-cs 3.1.21 # cardmgr -V
o quota-tools 3.09 # quota -V
o PPP 2.4.0 # pppd –version
o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version
o nfs-utils 1.0.5 # showmount –version
o procps 3.1.13 # ps –version
o oprofile 0.5.3 # oprofiled –version

Determine Current Hardware

1. /sbin/lspci
2. cat /proc/cpuinfo
3. cat /proc/meminfo
4. df -h
5. ethtool eth0 (to find the speed)
Download Source

from http://kernel.org/pub/linux/kernel/v2.6/

1. cd /usr/src
2. tar xfvj /path/to/linux-2.6.latest.bz2

Upgrading module-init-tools

Read More

Find spamming in qmail

Spamming ???

Qmail is said to be secure and as such there are very less chances for spamming. In case of spamming, you can find out the culprit as said in the following example.

Try running /var/qmail/bin/qmail-qread. The utility on a server gave the following output.

20 Sep 2007 05:29:32 GMT #96945 24355 <spam@domain.com> bouncing
done remote giaygoiqua@test.com
done remote giayvietplaza@test1.com
done remote gig@domain123.com
done remote gilbert.marc@abc.com
done remote gillvector@fptnet.com.net
done remote gimmy.vo@azf.com
remote gin@dom.com

This ...

Read More

Horde hangs while trying to login

There are instances where horde will not let you log in. Clicking on the login button will simply returns you to the login page.

In such cases, most probably the horde table horde_sessionhandler will be corrupted. You can try repairing it as follows.

Read More

Fantastico hitting 404

Sometimes, even if fantastico is installed it may return a “Not Found ” error page when you click the fantastico icon in cpanel. Reinstalling fantastico also may not help at times.

In such a case please check the wget version that you have on your server. If it is wget-1.10.2-3.3.fc5, then replace it with an older and/or stabler version. This version does not honor the “-P” switch.

An alternate version that you can use is wget-1.10.2-3.2.1

You can use the following commands for this purpose:

For 32 bit:

rpm -qa wge...

Read More

Frozen mails in exim

Normally an MTA retries the delivery of mails if it is not delivered in first attempt. There are a few mails which fails and exim writes them as frozen. Exim will not bounce emails if the original message looks like a bounce. Instead the message is frozen, awaiting the SysAdmin’s attention. If the message is frozen (attempts to deliver it are suspended) then the text “*** frozen ***” is displayed at the end of the line. You can safely delete those messages.

exim -bP will list all control values

To check the no: ...

Read More

Internal Server Error monitoring in Nagios

Here, our requirement is to monitor a site and if it returns internal server error, alert us through the nagios interface. Here the monitoring tool checks if the domain returns a 500 error and if it does restart the web service. This is applicable for cases where internal server error is caused due to fast cgi issues.

Checking is done using NRPE, installed in the server being monitored. Install NRPE and nagios plugins.

yum install nagios-nrpe

Read More