[clug] How do i get a list for only connected clients

steve jenkin sjenkin at canb.auug.org.au
Mon Apr 28 13:46:27 GMT 2008


Sukhee wrote on 28/4/08 7:56 PM:
> Hello,
> I'm using fedora core 8 and using samba server to share my folders to
> windows clients.
> I need to know my clients IP's at runtime.  How do i get a list for only
> connected clients?
> Can anyone help me ? Please.

'lsof' tells you who's connected to what program
strace can tell you what's connected on what IP ports.
The linux 'netstat' command does produce a per connection (with
protocol) listing, not unlike 'lsof'.

There is also loads of information in the SMBD log files - and you can
turn up the debugging levels for more info.

This is without looking at /proc - I seem to remember there is a struct
in there for IPv4 and TCP connections...

How good are your scripting skills?
I think the info is all readily available, but you have to collate it.

HTH

-- 
Steve Jenkin, Info Tech, Systems and Design Specialist.
0412 786 915 (+61 412 786 915)
PO Box 48, Kippax ACT 2615, AUSTRALIA

sjenkin at canb.auug.org.au http://members.tip.net.au/~sjenkin


More information about the linux mailing list