Operating System - HP-UX
1836401 Members
2575 Online
110100 Solutions
New Discussion

Re: sockets in the /var/tmp dir - can you delete the whole dir?

 
SOLVED
Go to solution
Cathy Squires
Frequent Advisor

sockets in the /var/tmp dir - can you delete the whole dir?

Hello,

We have a program that when it malfucitons it keeps opening sockets (inodes) in /var/tmp and not closing the old ones. If I don't notice this in time the system comes to a halt because other programs that require sockets can't get one.

At the moment the only way I have is to delete them in small sections (ie: rm aaaa01*; rm aaaa02*; etc) because anything larger comes up with a "parameter list is too long"

Can I just remove /var/tmp, recreate the tmp dir and then reboot the system or will this cause bigger problems. The other way takes many hours (days).

tks
Cathy Squires
5 REPLIES 5
Mel Burslan
Honored Contributor
Solution

Re: sockets in the /var/tmp dir - can you delete the whole dir?

Removal of /var/tmp is not a wise idea as many well-behaving programs are using this space as a temporary storage.

May I ask if you considered scripting the deletion of these leftover socket files as an immediate remedy and to get to the root of this problem, did you ever talk to the developer of this program to fix this mishap ?
________________________________
UNIX because I majored in cryptology...
curt larson_1
Honored Contributor

Re: sockets in the /var/tmp dir - can you delete the whole dir?

you could just remove only the sockets:

find /var/tmp -type s | xargs rm

just be sure that other programs aren't putting their sockets there too. as this will remove them too
Sanjay_6
Honored Contributor

Re: sockets in the /var/tmp dir - can you delete the whole dir?

Hi Cathy,

Not a good idea to delete /var/tmp. There are application / processes which might be using, not including users vi jobs and such which are using /var/tmp.

Relax and delete the files the difficult way.

Hope this helps.

Regds
Cathy Squires
Frequent Advisor

Re: sockets in the /var/tmp dir - can you delete the whole dir?

Dear Mel, Curt & Sanjay

Thanks for answering, I thought that's what you'd say, but can't blame me for asking.

Yes I've talked to the programmers about it and I get the "Huh, I've never seen that happen before" Oh well, that (and end users) are why I have a very safe job ;)

Have a good weekend.
ecs
A. Clay Stephenson
Acclaimed Contributor

Re: sockets in the /var/tmp dir - can you delete the whole dir?

I suspect that the leftover files are simply the tip of the iceberg. It's time to adjust the programmers with a baseball bat. They need signal handlers to do cleanup when their programs terminate abnormally.
If it ain't broke, I can fix that.