[Samba] share status information from api (python3)

Jeremy Allison jra at samba.org
Tue Oct 13 20:54:07 UTC 2020


On Tue, Oct 13, 2020 at 01:23:49PM -0700, Isaac Stone via samba wrote:
> Looking for advice for best practices on fetching status of the samba
> server and share information.
> 
> One option is to parse the output of `smbstatus` into a machine-readable
> format. But I noticed there are some apis documented. We are using samba
> 4.11 which is supposed to have full python3 api support.
> 
> So the question is, can the share and lock information displayed in the
> `smbstatus` command also be read from an API, such as the python3 samba
> package? Glancing through the API documentation I did not see anything
> obvious. Perhaps better to use the tdb package and read from the databases
> directly.
> 
> The purpose is to collect metrics and create a dashboard so we can track
> mounts, locks, etc across all servers and shares. Any advice is welcome

This would be a useful addition to the python Samba APIs.

Can you define what you'd like such Python API calls
to look like ?



More information about the samba mailing list