Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Better Settings for /tmp Filesystem on HP-UX by Dusan Baljevic
1. Dusan Baljevic
dusan.baljevic@ieee.org
Better settings for /tmp on HP-UX
Historically, settings for /tmp on HP-UX servers has always been wrong:
All applications use it;
Cleanup is not automated;
/tmp, as part of root disk, unnecessarily loaded with data that does not belong in it.
What are the more appropriate settings for /tmp? Here is my recommendation that I have been using in
all my designs:
A) Set TMPDIR variable to point to some other non-boot-volume.
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.
B) Is the /tmp file system mounted with "tmplog" option in /etc/fstab?
/tmp is DESIGNED for temporary files, so it should not be abused for other choices.
In "tmplog" mode, the intent log is almost always delayed.
This improves performance, but recent changes may disappear if the system crashes.
C) Is /tmp cleaned up at boot time (not really a performance issue but useful for maintenance, especially
if number of temporary files keep growing)?
Enable it in /etc/rc.config.d/clean_tmps
CLEAR_TMP=1