[plug] Keeping a running server clean

Tim White weirdo at tigris.org
Sun Oct 24 10:24:27 WST 2004


James Devenish wrote:

>In message <417B0EE1.2010908 at tigris.org>
>on Sun, Oct 24, 2004 at 10:09:37AM +0800, Tim White wrote:
>  
>
>>A stale lock is when a process has a file locked and then dies without 
>>unlocking it. I haven't seen it happen under Linux yet buy it commonly 
>>happens under windows and I have now also seen it under netware (5, 6 
>>will run on a BSD Kernel)
>>    
>>
>
>My apologies...I don't know what a "netware server" is, so I am not sure
>that I understand your situation. I assumed you had a "Linux" system
>running "Netware services". There are about 35 different types of locks
>in UNIX systems, so "detecting them and cleaning them up" is a vague
>proposition.
>  
>
Netware server. Novel ring a bell? That's netware. Nothing to do with 
Linux until the next release.

>>Do people know of a script to clean up /tmp? Obviously it should only
>>clean files not in use.
>>    
>>
>
>Well, it will depend on what criteria are appropriate for your machine.
>At the simplest level (quick-and-dirty and untested):
>
>for i in /tmp /var/tmp; do
>    find -x $i -type f -atime +3 -exec rm -f -- {} \;
>    find -x $i \! -name . -type d -mtime +3 -exec rmdir \ 
>        --ignore-fail-on-non-empty -- {} \;
>done
>
>You could also check to see that a file is not in use, perhaps using
>fstat or `fuser -s` or whatever.
>  
>
Thanks. If I hack up a working script I will post it.

-- 
Tim White
PGP/GPG id: 602E944D, Pub Key Serv: subkeys.pgp.net
Fingerprint: 04C2 9682 B7B2 3006 009D  A9F3 067E EDCD 602E 944D
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!
--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20041024/089dcff0/attachment.pgp>


More information about the plug mailing list