[Samba] smbstatus parsing (XML output)

Samuel Briesemeister sam.briesemeister at gmail.com
Tue Dec 19 02:20:53 GMT 2006

Hey all,

I'm preparing to start development of a new version of 'smbstatus' that
produces XML output, instead of the tabular data it currently produces.

This follows an attempt to parse the output of the current 'smbstatus' (
3.0.22) using grep and a few other shell tools, from a system call in PHP,
and then further RegEx parsing to create a multidimensional array of the
'smbstatus'. After using the shell tools and PHP to handle this information
for a few months, I've become dissatisfied with the inefficiency and burden
this puts on the CPU.

The idea is that I can make a system call to this 'smbstatusxml' program
(written in a compiled language such as C++) to pull the information
directly from the samba libraries directly into XML. I believe this will be
far more efficient, and a whole lot faster, since then I can load the
information into an XML parser in PHP and then format it into tables, etc;
or I could just pull it directly through PHP as XML and display it via some
other means (RSS feed?).

I've started a SourceForge project at
http://sourceforge.net/projects/smbstatusxml ... though at this time I have
no significant experience with CVS or development in a SourceForge context,
so I've got some learning to do before I proceed in this manner. I wonder if
it would be better to start development of this tool in the existing Samba
CVS, but of course need authorization from existing project leaders before
that would happen, and that depends on what value they see in this type of

I'd like other people's thoughts and opinions on this.

Thanks and Regards,


"Infinite loops... yeah... those take somewhat longer than average."

More information about the samba mailing list