Regd. per-share stats/profile support

Sudip Panda psudip at
Wed Sep 23 19:17:08 UTC 2020

Thanks Jeremy for quick response and letting me know no such request was seen/considered in the past. This certainly helps me as I don't want to miss any past considerations before making the changes. My plan is to make changes similar to what you have mentioned. Will keep you folks(SAMBA community) updated once I do the required changes and test the same.


On 24/09/20, 12:35 AM, "Jeremy Allison" <jra at> wrote:

    On Wed, Sep 23, 2020 at 08:52:25AM +0000, Sudip Panda via samba-technical wrote:
    > Hello Everyone,
    > I am new to SAMBA codebase and going through the building blocks
    > (tevent, tallocs, TDBs etc.) to address a feature request to provide
    > per-share statistics/profile. As of now, I see with smbstatus command
    > (with -P and profile option set), SAMBA provide global statistics.
    > Also, while I am learning SAMBA, I came across SAMBA TA. Would like
    > to understand whether similar request (supporting per-share statistics)
    > came in the past and any analysis was done for supporting it using TDBs.
    > If any analysis was done in the past, would like to understand the
    > outcome of that from you folks. I understand that multiple connection
    > can access and modify the per-share stats which actually is a case for global stats as well.

    I haven't seen a request for per-share profile stats.

    You'd have to add a 'per-share' field inside
    the smbprofile_stats_bytes_async struct in
    source3/include/smbprofile.h and ensure that
    the profile setting macros also add in the
    required info to identify a particular share.

More information about the samba-technical mailing list