Listing file locks on Solaris 10
September 14, 2009
Suppose that you want to find out what files are locked on your Solaris
10 machine, perhaps because it is an NFS server and you really want a
global view of what locks you have. On a
Linux machine (or a sufficiently old Solaris one) you could use
The 'simple' command to get a list of files with file locks is:
We need the
Further digging (to, for example, find the name of the client that theoretically holds the lock) is hampered by the NFS lock manager code unfortunately not being part of the OpenSolaris code base because it's not open source. (Allegedly Sun can't share it because it contains third-party code.)
Possibly, even ideally, there's a better way to get this sort of information. If so, I've been unable to find it.
Sidebar: what the mdb command does
This is a sufficiently complicated mdb command sequence that I feel like breaking it down (if only so that I'll remember how it works later).
If you're doing this inside an interactive
Comments on this page:
* * *
Atom feeds are available; see the bottom of most pages.