Unsolved
This post is more than 5 years old
1 Message
0
5319
March 7th, 2019 18:00
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.
Thanks,
Steve
0 events found


dizzy_isi
2 Posts
1
April 11th, 2019 07:00
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 is the zone you determined from the command above.
isi_for_array "isi_run -z 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 :
HectorB
1 Rookie
•
3 Posts
0
July 17th, 2023 14:00
Thank you so much. This helped me find the offender. LOL!