Hiro (hiromasaki) wrote,
Hiro
hiromasaki

For Linux domain admins...

while [ 1 ]
do
    clear
    smbstatus -b |head -n 4 |tail -n 3
    smbstatus -b |tail -n +5 |sort -i --key=2,4
    sleep 60
done
exit 0

In the spirit of top and apachetop, I give thee smbtop.

Now you can see who is logged in and from where.

Tested on Debian 4.0 and Samba 3.0.26a. Based on smbstatus output from 3.4.x, should work fine with newer versions of Samba, hopefully head, tail, and sort haven't changed much...

EDIT: Found someone else that finished a true smbtop, but I can't find it anywhere:
http://sysmod.icb.uni-due.de/isis/overview/
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments