LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-01-2019, 08:57 PM   #1
Oli_Gendebien
LQ Newbie
 
Registered: May 2019
Posts: 17

Rep: Reputation: Disabled
/tmp full


What would happen if /tmp is full? Would the server stop working? Only the applications running on it? Can /tmp be filled by processes in memory?

Sorry for such basic question
 
Old 05-02-2019, 01:31 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
more or less yes. Probably will not be stopped, just slow down.
 
Old 05-02-2019, 02:52 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Oli_Gendebien View Post
What would happen if /tmp is full? Would the server stop working? Only the applications running on it?
Any process that needs space in /tmp will have to work around this failure. If the process was written with the assumption that /tmp always has space (which would be bad code), it might just abort or raise other error conditions with misleading messages.

Stricly speaking, “the server” would not stop working, but it depends on what you mean by “the server”. For example, you might be unable to log on, or run any programs. The kernel would not panic.
Quote:
Can /tmp be filled by processes in memory?
What do you mean by that? Processes are in memory when they run. A process that is not in memory, i.e. swapped out, can’t run and therefore not fill /tmp.
Quote:
Sorry for such basic question
Not that basic, actually. It’s not clear at all which parts of your system would stop working.
 
Old 05-02-2019, 03:05 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Out of interest, why are you asking this question? Are you trying to figure out how much disk space to allocate to /tmp, or are you experiencing issues where /tmp is fairly full?
 
Old 05-02-2019, 05:24 AM   #5
Oli_Gendebien
LQ Newbie
 
Registered: May 2019
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanks. I see the layers of complexity building up. I’m experiencing issues with /tmp getting filled up. When I check individuall files they don’t amount to the size of the file system. My server is a Hp with centos on it. Yesterday I got a close call and notice a core dump in the messages log file. I moved the largest file on /tmp to another file system and nothing happened after some time then the usage dropped to 40%.
 
Old 05-02-2019, 05:44 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Let's see how your system is setup. Run this in a terminal and post the output.
Code:
df -hT
 
Old 05-02-2019, 10:37 AM   #7
Oli_Gendebien
LQ Newbie
 
Registered: May 2019
Posts: 17

Original Poster
Rep: Reputation: Disabled
df -hT

Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/centos-root xfs 38G 3.7G 34G 10% /
devtmpfs devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs tmpfs 1.9G 9.4M 1.9G 1% /run
tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 178M 837M 18% /boot
/dev/mapper/centos-home xfs 19G 43M 19G 1% /home
tmpfs tmpfs 379M 12K 379M 1% /run/user/42
tmpfs tmpfs 379M 0 379M 0% /run/user/1001
 
Old 05-02-2019, 06:07 PM   #8
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I don’t see /tmp in the list of mounted filesystems. This means you should have 34G free space.

Often, temporary files are unlinked immediately after their creation. As a result, the ls command can’t see them, but they still exist and use up space as long as the corresponding file descriptor is not closed. This would explain why your file sizes and disk usage don’t correlate.

Last edited by berndbausch; 05-02-2019 at 06:09 PM.
 
Old 05-02-2019, 06:33 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
The OP opened a duplicate thread - now closed - that has more relevant information.
Quote:
Today I had a near miss when /tmp got to 100%. Right before that happened it was 42%. I'm under the impression it was caused by a sos report the Linux Admin was running. At that time we noticed Red Hat cluster had failed over to the other node. I suggested being /tmp at 100% could have caused the failover but the Linux Admin dismisses the idea. Any thoughts on this?
If indeed /tmp did fill, that is most likely merely an after-effect of whatever caused the fail-over.
Talk to your sysadmin.
 
Old 05-03-2019, 12:27 PM   #10
Oli_Gendebien
LQ Newbie
 
Registered: May 2019
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanks. He's looking into this.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/tmp full - but not full ? turbo_acura Linux - Newbie 2 10-20-2010 08:20 AM
Can't login, says tmp directory full but tmp file is empty! Could be linked to MySQL? bethanlowder Fedora 7 09-25-2009 07:17 AM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 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 - Newbie

All times are GMT -5. The time now is 12:04 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