On Sat, Oct 20, 2018 at 12:12:01AM -0500, Steve French via samba-technical wrote: > Was experimenting with a patch to display the open files on a Linux > network mount for debugging > > Would something like this new pseudo-file for the client to allow > debugging problems where it is important to see the currently open > files from the client's perspective be useful as is? additional info > from dentry or inode needed? or ok with the terse output here? You need to print enough info such that the server operator can identify associated open files using the protocol fields you print out. What (IMHO) would be massively useful is the sequence number when the file was originally opened (i.e. the SMB2 sequence number you sent when you originally did the SMB2CreateFile call). That would really help match wireshark network traces to client activity. Just my 2cents. Jeremy. > sfrench@smf-Thinkpad-P51:~/$ ls /proc/fs/cifs/ -la > total 0 > dr-xr-xr-x 2 root root 0 Oct 20 00:07 . > dr-xr-xr-x 9 root root 0 Oct 19 09:56 .. > -rw-r--r-- 1 root root 0 Oct 20 00:07 cifsFYI > -r--r--r-- 1 root root 0 Oct 20 00:07 DebugData > -rw-r--r-- 1 root root 0 Oct 20 00:07 LinuxExtensionsEnabled > -rw-r--r-- 1 root root 0 Oct 20 00:07 LookupCacheEnabled > -r--r--r-- 1 root root 0 Oct 20 00:07 open_files > -rw-r--r-- 1 root root 0 Oct 20 00:07 SecurityFlags > -rw-r--r-- 1 root root 0 Oct 20 00:07 Stats > -rw-r--r-- 1 root root 0 Oct 20 00:07 traceSMB > > > sfrench@smf-Thinkpad-P51:~/$ cat /proc/fs/cifs/open_files > Display debugging information for open files > -------------------------------------------- > tcon: 0x15329b49 \\localhost\test > persistent fid: 0x7688e758 flags 0x8000 count 1 pid: 23477 uid: 1000 > persistent fid: 0xd5b54934 flags 0x8000 count 1 pid: 23476 uid: 0 > > -- > Thanks, > > Steve >