-1

I have a CentOS web server with many clients on it. I see the /tmp reached DISKCRITICAL just after about two months since I made 8 GB (after expansion from 4 GB)! I want to know the reasons that make tmp getting full so quickly, and how to clean it up safely? I read a lot about expanding it and deleting some expired files before but it didn't success!

Aymen
  • 1

1 Answers1

5

I find Scientific Method the perfect tool for a job like this.

  1. Problem Statement

My /tmp directory is getting full

  1. Gather information

    • Using suitable tools find out what is filling the /tmp directory. I find ls(1) and perhaps du(1) great tools for this job. Maybe even lsof(8) will be useful.
  2. Analyse the information you have gathered.

    • What files are filling the disk?
    • What generates the files ?
    • Why are they generated ?
    • Why are they in /tmp ?
  3. Identify solutions an take remedial action. This is very dependent on (3) above.

  4. Monitor your changes in (4) above.

  5. Did the changes fix the problem ? Is it better? Is it worse ? Is there no difference ? Where you go from here depends on what you find. You may need to go back to 2. and gather more pertinent data or 3. to reanalyse what data you have or 4. because you identified a number of potential solutions.

  6. Document your findings and the changes you made.

  7. Done.

user9517
  • 117,122