[Samba] share status information from api (python3)

Isaac Stone isaac.stone at som.com
Tue Oct 13 20:23:49 UTC 2020

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

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

 - isaac

More information about the samba mailing list