LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-09-2005, 06:46 PM   #1
cz1179
Newbie
 
Registered: Dec 2004
Posts: 25

Rep: Reputation: 15
/tmp fills up and doesn't clear itself


I ran /scripts/securetmp last week and ever since the /tmp directory gets loaded almost daily. I have to go in and manually clear out the /tmp/logwatch*/ files shown below to get it back to normal 2% or so (it shoots up to 100% sometimes).

How can I correct this?

root@server [/tmp]# cd logwatch.OJp30518
root@server [/tmp/logwatch.OJp30518]# dir
(null) ./
(null) ../
(null) autorpm
(null) clam-update
(null) cron
(null) exim
(null) http
(null) maillog
(null) messages
(null) pureftp
(null) rt314
(null) samba
(null) secure
(null) tac_acc
(null) up2date
(null) vsftpd
(null) xferlog
(null) yum

WHM shows it was 243MB total in size.

I did chmod -v 777 /tmp

My /etc/fstab is

LABEL=/ / ext3 defaults,usrquota 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/hdb1 /extra ext3 defaults 1 1

How do I correct this issue? Am I supposed to increase the partition for /tmp? If so please explain how as I've never touched it before. I know for a fact that it is specifically the /tmp/logwatch.OJp30518 filling up the /tmp partition.

Specs:
cpanel 9.9.9 R-70
Fedora Core 2
2x250GB IDE Disks (62GB used on primary only / less than 20% backup)
About 100 domains
 
Old 01-10-2005, 03:50 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
First off, you don't have a /tmp partition. The files stored in /tmp are in fact stored in the / partition.

I don't know off-hand why the files aren't being cleared out; I'd assume that it would be a problem with the program writing them.

If the directory is always called /tmp/logwatch.OJp30518 then you have the option of creating a symbolic link to another directory, like this:
Code:
cd /tmp/
rm -rf logwatch.OJp30518
mkdir /var/logwatch_temp
ln -s /var/logwatch_temp logwatch.OJp30518
This will cause any files written to /tmp/logwatch.OJp30518 to be written to /var/logwatch_temp instead.

You could use gnuparted to resize your / partition (you can find it on freshmeat.net). You also have the option of creating a partition of type tmpfs, which will be stored entirely in memory and hence cleared on each reboot (this will take up RAM, but not disk space). You'll find instructions on that if you search LQ for tmpfs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
konqueror fills /tmp becho4 Linux - Software 1 06-28-2005 11:46 AM
how do you clear tmp? AVD_ZM Linux - Software 4 02-14-2005 05:54 AM
What happens when root dir fills up? leiavoia Debian 5 11-14-2004 07:14 PM
Numerous scb_*.tmp files in /tmp dburk Programming 3 08-18-2003 04:28 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration