verbose debugs of socket messages

MCCALL,DON (HP-USA,ex1) don_mccall at
Thu May 10 16:36:32 GMT 2001

Hi Jerry, et all;
My 2 cents worth - I'm a support engineer, and for my money, every debug
statement in the code is worth its weight in gold.  And making the removal
of debug statements a compiletime option, I think is just tempting fate.

I agree that we need to make the debug subsystem more 'tuneable'.  Wading
thru a  level10 debug is a pretty formidible task, although appropriate use
of grep/awk/cut... makes it manageable.  In FACT, frequently I couldn't tell
you specifically WHICH modules/statements I would want logged for a
problem until I HAVE seen a level 10.  BUT THEN, it sure would be nice to be
able to pare things down for intermittent problems where you have to run
for a long time to catch the problem, and can't afford the performance/disk
hit for level 10.

One product I worked heavily in on the support side was AS/U, and it had
VERY neat debug options:
debugone=pid   would allow you to turn on debugging for a single lmx.srv
(read - smbd)
process on the fly.  We have that currently in Samba - good show!

debugpat= "list of sourcefile names"   would allow you to set a list of
sourcefiles that would have debugging statements printed;  these allowed
wildcards, so you could do something like 
debugpat= *pass*  to get all the debugstatements from all the source files
that had 'pass' in the name (useful if debugging authentication, for
instance...), and also 
debugpat= !*pass*  the ! sign would say give me everything BUT statements
from this mask.

One idea that might not be so hard to implement would be to keep the 'level'
mask, but 
add in an 'exclude levels = '  So you could have "log level = 10" and
"exclude levels = 0-3,4,6,8" - it should be pretty easy to implement in the
DEBUG define; we'd just have to add the code and calls to load a new
smb.conf option "exclude levels" to check against...

Just a thought...


-----Original Message-----
From: Gerald Carter [mailto:gcarter at]
Sent: Thursday, May 10, 2001 11:59 AM
To: Christopher R. Hertel
Cc: Jean Francois Micouleau; Green, Paul; Samba Technical (E-mail)
Subject: Re: verbose debugs of socket messages

On Thu, 10 May 2001, Christopher R. Hertel wrote:

> J.F. typed:
> :
> > yes it would allow it. I think we should split the DEBUG from the
> > We are using the DEBUG facility as a LOGGING facility.
> > 
> > IIRC, I talked of that with Tridge, and we agreed.
> It would also be nice to allow people to remove debug statements at
> compile time, though debug should be the default mode since we use the
> output so heavily.

Ehhh....I'm not sure I agree here.  That's kind of like saying, it ouwld
be nice if we could remove the steering wheel from a car for a nice long
strech of highway.  But what happens when you need to turn.  IMO there
will always be a need to enabling debugging at run-time in order to
trouble shoot problems.  

I do think that separating logging from debug would be good.

   /\  Gerald (Jerry) Carter                     Professional Services
 \/  VA Linux Systems   gcarter at       SAMBA Team          jerry at                     jerry at

       "...a hundred billion castaways looking for a home."
                                - Sting "Message in a Bottle" ( 1979 )

More information about the samba-technical mailing list