What I do when I get occasional reports of locked files is use a combination
of "cifs sessions *" and "lock_dump -f". The cifs sessions command often
shows files held open, and for some occasions where it doesn't the lock_dump
command always has. Between those two commands I've always been able to
identify the computer and user that has the file open.
It's possible this information doesn't include nfs locks. I've never had a
case of an NFS user interfering with other access to the file so it's never
come up. (NFS locking is for the most part not enforced.)
The output isn't pretty, but it's readable, and probably very parseable by
something like perl if someone had a mind to do so.
--
Mike Sphar - Sr Systems Administrator - Remedy Corporation
-----Original Message-----
From: Maglinger, Paul [mailto:PMAGLINGER@scvl.com]
Sent: Thursday, September 26, 2002 3:24 PM
To: 'NetApps list server'
Subject: Finding who has files open (in use)
Greetings toasters!
Looking for a way to list files that are in use on the filer and who is
using them. I want an output similiar to what you would see if you went
into Windows Server Manager, selected the server and clicked on the "In Use"
button, but I want something more user friendly than scrolling down looking
for the file name. Specifically, we are having problems with users leaving
files open, which prevents us from writing over them. I'm looking for a way
to quickly track down who has this file open so they can be flogged,
keel-hauled, then drawn and quartered. Your thoughts, please?
Remember, you are unique... just like everyone else!
Paul Maglinger, A+, CA, CCA, CET, MCSE
Systems Administrator Shoe Carnival Inc. (812)867-4674 pmaglinger(a)scvl.com