<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
</HEAD>
<BODY>
This may help (or may not).  I presume this will work on OmniOS as it works on other Illumos variants.<BR>
<BR>
You can enable logging on an nfs share by adding 'log' to the sharenfs property of a zfs file system.  For example, on one of my systems I have
<PRE>
$ zfs get sharenfs pool0/media
NAME           PROPERTY  VALUE                           SOURCE
pool0/example  sharenfs  sec=sys,log,rw=@10.1.1.0/24:... local
</PRE>
<BR>
After this change, svc:/network/nfs/log:default is enabled automatically and a log file 'nfslog' (and other related files) can be found int /var/nfs.  I don't know if this records the locks but it will at least show who/what is accessing files under an nfs share.  BTW, the nfs/log service collects information for a bit before it drops it into the nfslog file.<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Scott LeFevre<BR>
317-696-1010 <BR>
<BR>
</TD>
</TR>
</TABLE>
On Mon, 2014-08-11 at 23:49 -0400, Chris Siebenmann wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Here's a question: does anyone know of a good way to get detailed NFS
lock information on an OmniOS NFS server, especially information like
which client has a lock on a particular file?

 'mdb -k' can be used to extract basic lock information, like the full
paths of all files that have active locks against them[*], but my old
Solaris mdb commands for getting more detailed NFS information don't
work in the OmniOS mdb any more.

 Thanks in advance.

(I'll happily take pointers to where to look in the kernel implementation
to follow struct pointers by hand with mdb's ::print and so on. From what
I've found so far, I'm looking at usr/src/uts/common/klm to start with; is
this right?)

        - cks
[*: via mdb's ::lminfo and '::walk lock_graph', see eg
    <A HREF="http://utcc.utoronto.ca/~cks/space/blog/solaris/ListingFileLocks">http://utcc.utoronto.ca/~cks/space/blog/solaris/ListingFileLocks</A>

    Solaris 10 also had ::nlm_lockson, which is still present in mdb
    but doesn't seem to work any more, presumably because the actual
    NFS locking implementation changed.
]
_______________________________________________
OmniOS-discuss mailing list
<A HREF="mailto:OmniOS-discuss@lists.omniti.com">OmniOS-discuss@lists.omniti.com</A>
<A HREF="http://lists.omniti.com/mailman/listinfo/omnios-discuss">http://lists.omniti.com/mailman/listinfo/omnios-discuss</A>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>