1 Here's something that Paul Blackman sent me that may be useful:
4 I created this script to do a few things that smbstatus doesn't at the
5 moment. Perhaps you might want to include these. Sorry I haven't
6 added things at source level, script was quick&easy.
12 else if ($1 == "-c") then
13 echo There are `smbstatus -p |sort -u |grep -n -v z |grep -c :` unique
14 smbd processes running.
15 else if ($1 == "-l") then
16 echo `date '+ %d/%m/%y %H:%M:%S'` `smbstatus -p |sort -u |grep -n -v z
19 smbstatus |sort +3 -4 -u
23 The '-p' option was just to show unique PIDs.
25 The more important ones are the '-c' and '-l' options '-c' just counts
26 the number of unique smbd's, While '-l' logs this count with date and
27 time to a log file specified on the command line. I'm using '-l' at
28 the moment with cron to give me an idea of usage/max connections etc.
29 I was also thinking of doing a log for individual/specified services.
31 The default (last) option was to show unique PIDs with user names.
32 Unfortunately this still lists all file locks etc. This would be
33 better with a 'no locked files' option from smbstatus (or is there one
37 ~^ MIME OK ^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
38 o | Paul Blackman ictinus@lake.canberra.edu.au
39 o | Co-operative Research ------------------------
40 o _ | Centre For Freshwater Ecology. Ph. (Aus) 06 2012518
41 -- (") o | University of Canberra, Australia. Fax. " 06 2015038
42 \_|_-- |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43 | | "Spend a little love and get high"
44 _/ \_ | - Lenny Kravitz
45 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 ~~~~ SAMBA Web Pages: http://samba.canberra.edu.au/pub/samba/samba.html ~~~~~