Jennifer2010

Registered
Jun 26, 2012
3
0
1
cPanel Access Level
Website Owner
Hi everyone!

My server has been experiencing extremely high CPU load. Sometimes the Load Averages go above 100.00.

While this happens, spamd fails, chkservd hangs and I now I got an email saying:
Drive Critical: /tmp (/var/tmp) is 100% full
Drive Critical: /usr/tmpDSK (/tmp) is 100% full

My questions are:

How can I see what's filling up these directories and how can I see the size of them?

Code:
* X3460 CPU
* 16Gb ram
* 2x1TB drives in software raid 1
* 100mbps port
* Centos 5.8 64 bit
* Standard partitioning (4gb swap, 100mb /boot, remainder /)
* Cpanel / WHM
Thank you
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
A spammer isn't going to fill up /tmp and the reason the load is going crazy is likely due to MySQL filling it up. /tmp is used for PHP sessions and for MySQL MyISAM temporary tables. I've never seen PHP sessions filling it up, but I have seen MySQL doing it a lot.

Check if it's MySQL by running this:

Code:
cd /var/lib/mysql
grep -i "incorrect key" hostname.err
Replace hostname.err with the fully qualified hostname of the machine + .err at the end.

If you do see entries for that for /tmp, then MySQL is the cause. You can follow these suggestions to correct that:

http://forums.cpanel.net/f5/drive-critical-dev-loop0-var-tmp-97-full-190772.html#post799162

Earlier in that thread, I also mention how to resize /tmp otherwise. I think changing the MySQL tmpdir is a better choice, but it's up to you.