SUMMARY:Re: who's locking that file ?

From: jyoung@educate.com
Date: Wed Dec 03 1997 - 05:29:17 CST


Thanks for quick responses. I intend to get a copy of lsof for the lock file issue.
 Thanks to
"david@bae.uga.edu"
"Thomas.M.Erickson.1@gsfc.nasa.gov"
"rsk@itw.com"
"sweh@mpn.com"
"robertr@nwmarkets.co.jp"
"kcolagio@wc.eso.mc.xerox.com"

and anyone else whom I may have inadvertently missed.

see the solutions below.

Hey SUN Managers...

Question:
 I know I can user fuser to see whom as a file open. But is there a way in 2.5.1 to
see which specific user as a lock on a file ?

Answer:
1. There's a third-party utility out there called lsof (ls/list open files)
2. See the article "Five Tools Every Sun Manager Should Have" in the archives
    of this list; in particular, you want "lsof".
3. Check out vic.cc.purdue.edu:pub/tools/unix/lslk
4. I can't answer this one, but you should be able to get this kind of
    information with fcntl a la "int fcntl(int FD, int F_GETLK)" as
    described in the fcntl(2) man page which will overwrite the flock
    structure (also described in the fcntl(2) man page) with the system
    and process id of the current lock owner, if any.

Question:
How can a process which ignores a kill -9 process from root be killed ?

Most complete answers:
1. There are some processes which just can't be killed off; they're
usually waiting for i/o and aren't getting the interrupt. They will
often go away everntually.
2. It can't; it's blocked while waiting for a physical resource.

Question:
Why would a defunct prcess have a ppid of 1 ?
Answer:
Once a process becomes a zombie, its parent ID reverts to that of
init, which is 1.

Thanks in advance



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:10 CDT