1 Copper

Finding the client for an open file

We have an application that is periodically getting a locked file type of message.  It's my belief that between 'isi smb sessions' output and 'isi smb openfiles' output I should be able to tell them which client (hostname or IP address) has that file open.  However I cannot for the life of me figure out how to get that info.  

It would seem that I should be able to use the session ID returned by 'isi smb openfiles' command to get the hostname, etc. which would give the application team somewhere to look.  It probably goes without saying our app is highly distributed and looking through dozens if not hundreds of machines isn't practical.  If I can provide this info at the time of a locked file incident it would be extremely helpful.  




0 Kudos
1 Reply
1 Copper

Re: Finding the client for an open file

What version of OneFS are you on? 

If 8.0 and above first find what zone you are wanting to view open files for

isi zone list -v

Then you should be able to run where <zone ID> is the zone you determined from the command above. 

isi_for_array "isi_run -z <zone ID> isi_classic smb file list"

That should return the open files for all nodes in the cluster and include the user account which has it open. In the following format 

ID :
Pathname :
Username :
Number of locks :
Permissions :