System Administration

Necessary maintenance /tmp 98%.

 
SOLVED
Go to solution
martin_1593
Occasional Contributor

Necessary maintenance /tmp 98%.

Good Day

The / tmp directory on the server is at 98% is necessary maintenance. Please help with best practices for the cleaning of this directory.

Greetings
3 REPLIES 3
Tim Nelson
Honored Contributor
Solution

Re: Necessary maintenance /tmp 98%.

typically /tmp is cleared during reboot by setting the CLEAR_TMP=1 in /etc/rc.config.d/clean_tmps

if you do not reboot your servers on a regular basis then it is at your discretion and you will have to analyze what is in /tmp.

/tmp is temporary by name and nature. anything put there should only be needed temporarily so deleting it should not cause an issue.. users that put non-temporaray files in /tmp are only asking for problems, but nobody would be silly enough to do that, right ?

James R. Ferguson
Acclaimed Contributor

Re: Necessary maintenance /tmp 98%.

Hi:

Strictly speaking, '/tmp' is intended for use by the operating system. Applications should use '/var/tmp' as their temporary workspace.

Regards!

...JRF...
VK2COT
Honored Contributor

Re: Necessary maintenance /tmp 98%.

Hello,

I actually design HP-UX servers with even
more stringency:

a) I always encourage application admins to use their own areas for temporary files.

Some applications look at TMPDIR environment
variable. Others look at two other variables.

Try setting TEMP and TMP as well as TMPDIR.

One of these three environment variables will
work.

b) By default, I always enable in
/etc/rc.config.d/clean_tmps

CLEAR_TMP=1

These two items help a lot.

Cheers,

VK2COT
VK2COT - Dusan Baljevic