Re: debugging pseudo-file - viewing open file list from client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 21, 2018 at 7:48 AM Jeremy Allison <jra@xxxxxxxxx> wrote:
>
> 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.

Do you like this output better? added the last component of the path
and also the mid

# cat /proc/fs/cifs/open_files
Display debugging information for open files

treeid: 0x8dce084 \\localhost\test
Persistent fid: 0xaddde0a9 name: rofile flags 0x8000 count 1 pid: 7860
uid: 1000 mid 0x30
Persistent fid: 0xd634fe34 name: smallfile flags 0x8000 count 1 pid:
7858 uid: 1000 mid 0x24
Persistent fid: 0xc90bfdc9 name: smallfile flags 0x8000 count 1 pid:
7857 uid: 1000 mid 0x1a

treeid: 0x34b9815b \\localhost\scratch
Persistent fid: 0x86a6e394 name: f71 flags 0x8000 count 1 pid: 7861
uid: 1000 mid 0x20




> > 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



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux