Operating System - HP-UX
1836934 Members
3274 Online
110111 Solutions
New Discussion

Re: /tmp filling up and then clearing

 
SOLVED
Go to solution
P-Dicky
Frequent Advisor

/tmp filling up and then clearing

Hello

I have the following script monitor my mount points to ensure they don't max out.

# This script will check and email any space problems over 90%
# if found on any mount point

path=$SCRIPTS/log/space_chk.txt

`bdf > $path`

cat $path | grep '9[0-9]%' > $SCRIPTS/log/space_chk.chk
cat $path | grep '100%' >> $SCRIPTS/log/space_chk.chk

if [ -s $SCRIPTS/log/space_chk.chk ];
then
$FUNCTIONS/s_email space_chk mail "SPACE PROBLEM ON DCS NOTIFICATION" "P
lease run the DCS Archive job in Omniback if the problem is related to the '/dcs
/archive/' mount point." $SCRIPTS/log/space_chk.chk isd
rm $SCRIPTS/log/space_chk.chk
fi

$SCRIPTS/sh/space_chk_95.sh

exit 0;


It is reporting at times that my /tmp is at 100%. I have checked this mount point seconds after the alert and whatever is filling it is always gone. My question, any easy way to monitor the files being created on that mount point? I looked at a few things but do not want to set my system up as a "Trusted" system.

THANKS
2 REPLIES 2
Pete Randall
Outstanding Contributor
Solution

Re: /tmp filling up and then clearing

Paul,

I have to wonder if the process that fills /tmp dies because it can't write any more - then when the process dies, the file that had filled up /tmp goes away.

Maybe if you add a "du -sk /tmp/* |sort -n |tail" to your monitor script you can catch the file in the act.


Pete

Pete
john korterman
Honored Contributor

Re: /tmp filling up and then clearing

Hi,
you could try an alternative approach: I have observed the exact same behaviour when an oracle dba vi'ed huge files: the oracle user had a TMPDIR variable pointing at /tmp, and vi-ing files produced huge temporary files in /tmp. The files disappeared seconds after he exited the vi editor.
Perhaps you should check who is on the system when /tmp fills up....

regards,
John K.
it would be nice if you always got a second chance