Show connection in ps

Andrew Bartlett abartlet at samba.org
Wed Apr 30 14:30:04 GMT 2003


On Wed, 2003-04-30 at 23:33, David Collier-Brown -- Customer Engineering
wrote:
> That's lovely!!!

Except that you can't assume one user per connection, nor one share per
connection...

I'll accept one that triggers on setting the remote machine name, but
that's mostly stuck in library code, so not as easy to get...

> Ken Cross wrote:
> > Samba-folk:
> > 
> > In the "just for fun" department...
> > 
> > Something I've found very handy is the ability to quickly see all the
> > connections using "ps -ax":
> > 
> >  2442 S  0:00.04 smbd: kjcwinxp (10.0.0.189) WIN2DOM\cross 
> >  2693 S  0:00.07 smbd: win2 (10.0.0.205) WIN2DOM\Administrator 
> >  3016 S  0:00.05 smbd: nt4srv (10.0.0.197) WIN2DOM\User2
> >  5239 Ss 0:00.08 /usr/pkg/sbin/smbd -D 
> > 
> > It's not as comprehensive as smbstatus, but it's less boring than
> > hundreds of lines of "smbd -D".  I added this line:
> > 
> >  setproctitle( "%s (%s) %s", get_remote_machine_name(),
> > conn->client_address, user );
> > 
> > at the end of make_connection_snum in smbd/service.c.
> > 
> > Ken
> > ________________________________
> > 
> > Ken Cross
> > 
> > Network Storage Solutions
> > Phone 865.675.4070 ext 31
> > kcross at nssolutions.com 
> > 
> > 
> 
> 
> -- 
> David Collier-Brown,           | Always do right. This will gratify
> Sun Microsystems DCMO          | some people and astonish the rest.
> Toronto, Ontario               |
> (905) 415-2849 or x52849       | davecb at canada.sun.com
-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20030501/26f1b16e/attachment.bin


More information about the samba-technical mailing list