1835228 Members
10424 Online
110078 Solutions
New Discussion

/tmp size.

 
David Blair_2
New Member

/tmp size.

Hello..

I am new to HP-UX and I hope someone will answer this query?

What is the default filesystem for the /tmp directory on HP-UX. Is it /var ?

Are there any recommendations for the filesystem sizing for /tmp ?

Can temp files be handled differnently (other tha setti g TMPDIR) ?

Regards..
16 REPLIES 16
Ian Dennison_1
Honored Contributor

Re: /tmp size.

The default system for /tmp is /tmp. /var/tmp (under the var mount point) is used for temporary working files, whereas /tmp is used for other types of files (/tmp is used when compressing files or reading large vi files, as a working area).

Share and Enjoy! Ian
Building a dumber user
David Blair_2
New Member

Re: /tmp size.

Sorry,,

Is /tmp a seperate filesystem or is it a on root/. ?

Peter Kloetgen
Esteemed Contributor

Re: /tmp size.

Hi David,

the default on HP-UX is /tmp. On my installations i allways change the size to 300 MB (chose: fixed size). The default installation normally gives a size of 64 MB.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Peter Kloetgen
Esteemed Contributor

Re: /tmp size.

Ups, hi again David,

/tmp is a seperate filesystem. You can confirm this in /etc/fstab file.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
PIYUSH D. PATEL
Honored Contributor

Re: /tmp size.

Hi,

/tmp is the default /tmp filesystem in HPUX. The size of the /tmp can be decided by you and I feel it should be around 500MB. /var/tmp is also used by some applications.

If you have installed the HPUX with the option of Volatile filesytems then /tmp will be a seperate filesystem, or else it will be under / (root).

Piyush
Thierry Poels_1
Honored Contributor

Re: /tmp size.

OK, about the size then ....
this really depends on your needs: we've got servers with a /tmp of just 20MB and others with a /tmp of 1GB!
Generally 100-200MB will be fine.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
James R. Ferguson
Acclaimed Contributor

Re: /tmp size.

Hi David:

'/tmp' would be the default based on the rules defined by 'mktemp' (see the man pages).

For some utilities, like 'sort', /var/tmp is used preferentially over '/tmp' (see the man pages, again).

SD utilities also use /var/tmp.

Regards!

...JRF...
David Blair_2
New Member

Re: /tmp size.

What can I say - what a response.

I am a used other Unix forums a lot and I am very inpressed with the reponse..

I'll be back..

Cheers.
Tim D Fulford
Honored Contributor

Re: /tmp size.

default LOGICAL VOLUME (LV) containing the /tmp filesystem is /dev/vg00/lvol5

/var is another LV /dev/vg00/lvol8

/var/tmp is generally a less well know temp dir, vi uses it for instance.

/tmp will need to be as big as you need. 20MB to as musch as is required (we have 512MB)

I know of no system variable that alters tempdir, it is usually set from within the APP (e.g. Informix use DBSPACETEMP)

Tim
-
Shahul
Esteemed Contributor

Re: /tmp size.

Hi

/tmp is the default temporary filesystem for HP. It's size will change from system to system. U can create as per requirement. It can be seperate file system or it can be a directory under root. In that case Ur root file system should have enough space. In a big setup it is suggested to create as another filesystem.

Best of luck
Shahul
Pete Randall
Outstanding Contributor

Re: /tmp size.

Geez no - don't put it under root - keep it a separate filesystem so some runaway process writing garbage to /tmp doesn't end up filling your root file system. We tend to use 64 Mb for /tmp but that's just us.

Pete

Pete
Sanjay_6
Honored Contributor

Re: /tmp size.

Hi David,

If you aeere talking about the default logical volume for /tmp. it should be /dev/vg00/lvol6. The size of this filesystem depends on the type of configuration you have and the size of the root disk on your system.

The temporary files are store either in /tmp or /var/tmp on your system. I don't think there is any variable other than TMPDIR that can help you manage your tmp files.

Hope this helps.

Regds
Martin Johnson
Honored Contributor

Re: /tmp size.

Given the choice of having /tmp part of root or its own file system, I would recommend it being in its own file system. / is static and difficult to expand. /tmp is dynamic, usage is dependent upon appplication use.

It is also my personal choice to make /var/tmp its own file system too.

HTH
Marty
Nick Wickens
Respected Contributor

Re: /tmp size.

Hi David

Dependant upon your site its a good idea to keep an eye on what is being written in /tmp as not all programmers will be good enough to remove tmp files upon program completion.

Ideally anything older than a few days in /tmp should be removed but check what is left in there first before you first start deleting. Once you are happy that your apps are not writing anything you wish to keep (get the programs amended if they are) add the following line into cron to clear anything older than 2 days in /tmp.

find /tmp -type f -mtime +2 -exec rm {} \; 2>/dev/null
Hats ? We don't need no stinkin' hats !!
Tim D Fulford
Honored Contributor

Re: /tmp size.

Hi david as you are new to ITRC take a look at this site

http://66.216.15.50/ITRCForumsEtiquette/

(0pts please)
Tim
-
Bill Hassell
Honored Contributor

Re: /tmp size.

Actually, /tmp is defined as system-use only and /var/tmp is defined as user temp space. This is part of the V.4 filesystem definitions which most modern Unices follow. This is why /tmp is so small in HP-UX. It is recommeded to set:

export TEMP=/var/tmp
export TMPDIR=/var/tmp

Look at the white paper: file_sys in /usr/share/doc for more details.

It should also be noted that /var represents several large scale subsystems (email, spooling, logging, patches/software, crash dumps), any of which can fill /var and bring the system to it's knees. It is recommended that separately mounted filesystems be created within /var to keep these filesystems separate (based on system usage).


Bill Hassell, sysadmin