smbwebstatus

Andy Bakun - abakun@thwartedefforts.org

smbwebstatus is a Samba Status program based off smbstatus that displays information to a web browser.

smbwebstatus is fully functional, but it's still rough around the edges in some places.

It is its own little web server similar to swat. It generates HTML Tables and uses frames, so a browser with those capabilities is necessary.

I've successfully used it without problems with samba-2.0.4. Please let me know if you have problems. Bug reports are welcome and encouraged.

Description

There are two frames. In the top frame, three different reports can be generated:
Sessions (screenshot)
Shows the currently active sessions (the first listing output by smbstatus)
Clicking on one of the cell contents will show sessions that match that item. For example, clicking on an entry in the Machine column will show all services that are open from that machine.
Resources (screenshot)
If this is enabled, it shows all the shares and printers you have defined (no smbstatus equlivent)
By default, will list all resources, but selecting "exclude idle services" will remove from the list all the services which currently have no connections.
Clicking on a service name will display the sessions that match that service name.
Clicking on lock count will display a (best guess) of the locked files which are in that share.
Locked Files (screenshot)
Shows the locked files list, who has it open. (the last listing output by smbstatus).
Clicking on the filename will show specific information about that locked file.
All columns in all tables are sortable, in both ascending and descending order (the little arrow indicates which direction they are currently sorted in, of course).

History

Goals

Todo

Open Issues

See the comments at the top of the source file.

Screenshots

-rw-rw-r--   1 abakun   abakun      12982 Jan 26 18:16 sessions_scn.gif
-rw-rw-r--   1 abakun   abakun      20465 Jan 26 18:16 resources_scn.gif
-rw-rw-r--   1 abakun   abakun      27672 Jan 26 18:16 lockedfiles_scn.gif

Instructions

  1. patch Makefile.in with Makefile.in.patch
  2. copy smbwebstatus.c into source/web
  3. make
  4. for fresh install, make install,
    for already running smbd, copy bin/smbwebstatus to the same location as your samba binaries
  5. install the inetd.conf.addition to your inetd.conf file, restart inetd. You may need to change the path to smbwebstatus, depending on where it lives on your system.
  6. Check out the comments at the top of make_share_list_file, modify as necessary (modification might not be necessary) run
    make_share_list_file > SAMBA_LOCK_DIR/share_list
    This is not necessary, and if you don't do this step, the resources screen will be disabled.
    You'll have to rerun this if you change any of your share definitions.

The files

-rw-rw-r--   1 abakun   abakun       1647 Jan 26 18:13 Makefile.in.patch
-rw-rw-r--   1 abakun   abakun        255 Jan 26 18:16 inetd.conf.addition
-rwxrwxr-x   1 abakun   abakun       3369 Jan 27 16:56 make_share_list_file
-rw-rw-r--   1 abakun   abakun      55453 Feb 12 16:47 smbwebstatus.c