Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: patchkov@acs1.acs.ucalgary.ca (Serguei Patchkovskii)
Subject: Re: nfs file locking?
Date: 1998/10/06	[thread overview]
Message-ID: <6vdlfo$6m6@ds2.acs.ucalgary.ca> (raw)
In-Reply-To: 6vdhm1$lbh$1@nntpd.lkg.dec.com

Eric Werme - replace nospam with werme (nospam@zk3.dec.com) wrote:
: Mario Zimmermann <mzi2sn@sn0967.sn.bosch.de> writes:

: >we use nfs-file-locking.
: >Is there a way figure out, who has a lock on a file?
: >OS: Digital Unix 4.0d

: No.

Wrong. There are several ways of figuring out who has an NFS lock
on a file. You can either walk kernel lock tables, or you can use
the F_GETLK/F_RGETLK fcntl() interface. The latter case is trivial,
and Vic Abell's lslk will do the first one for you.

In either case, you'll get the PID of the process holding the lock,
and may get the IP number of the machine the said process is
running on. Given this, figuring out whatever else you may need
is trivial.

lslk is available at:

vic.cc.purdue.edu:pub/tools/unix/lslk

Cheers,

/Serge.P



      reply	other threads:[~1998-10-06  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-28  4:00 nfs file locking? Mario Zimmermann
1998-10-06  4:00 ` Eric Werme - replace nospam with werme
1998-10-06  4:00   ` Serguei Patchkovskii [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox