This may help (or may not). I presume this will work on OmniOS as it works on other Illumos variants.
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 $ zfs get sharenfs pool0/media NAME PROPERTY VALUE SOURCE pool0/example sharenfs sec=sys,log,[email protected]/24:... local 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. -- Scott LeFevre 317-696-1010 On Mon, 2014-08-11 at 23:49 -0400, Chris Siebenmann wrote: > 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 > http://utcc.utoronto.ca/~cks/space/blog/solaris/ListingFileLocks > > 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 > [email protected] > http://lists.omniti.com/mailman/listinfo/omnios-discuss
_______________________________________________ OmniOS-discuss mailing list [email protected] http://lists.omniti.com/mailman/listinfo/omnios-discuss
