[PATCH][SMB3 client] show beginning time for per share stats

Steve French smfrench at gmail.com
Wed Jan 17 22:28:11 UTC 2024


In analyzing problems, one missing piece of debug data is when the
mount occurred.  A related problem is when collecting stats we don't
know the  period of time the stats covered, ie when this set of stats
for the tcon started to be collected.  To make debugging easier track
the stats begin time. Set it when the mount occurred at mount time,
and reset it to current time whenever stats are reset. For example,

...
1) \\localhost\test
SMBs: 14 since 2024-01-17 22:17:30 UTC
Bytes read: 0  Bytes written: 0
Open files: 0 total (local), 0 open on server
TreeConnects: 1 total 0 failed
TreeDisconnects: 0 total 0 failed
...
2) \\localhost\scratch
SMBs: 24 since 2024-01-17 22:16:04 UTC
Bytes read: 0  Bytes written: 0
Open files: 0 total (local), 0 open on server
TreeConnects: 1 total 0 failed
TreeDisconnects: 0 total 0 failed
...

Note the time "since ... UTC" is now displayed in /proc/fs/cifs/Stats
for each share that is mounted.

See attached

-- 
Thanks,

Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-smb3-show-beginning-time-for-per-share-stats.patch
Type: text/x-patch
Size: 3401 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20240117/1c69eb60/0001-smb3-show-beginning-time-for-per-share-stats.bin>


More information about the samba-technical mailing list