[Samba] Looking for samba user statistics

2004-08-22 Thread Ralf Wiegand
This system is running for a while, using Redhat 7.2 and Samba 2.2.3.
Question:  Before I completely reinstall this system, I would like to 
get some samba statistics from this system.
Can anybody point me in the right direction on how to do this.

Thanks
Ralf Wiegand
--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Looking for samba user statistics

2004-08-22 Thread Stephen Kühn
On Sun, 2004-08-22 at 21:09, Ralf Wiegand wrote:
 This system is running for a while, using Redhat 7.2 and Samba 2.2.3.
 Question:  Before I completely reinstall this system, I would like to 
 get some samba statistics from this system.
 Can anybody point me in the right direction on how to do this.
 
 Thanks
 Ralf Wiegand

After blowing out 16mb of logfiles, yeah, that would be a nice thing to
have, wouldn't it? I just googled my brains out and didn't come up with
anything - then again, it could be because I'm rather tired...would like
to know what your findings are on this, though...

--
stephen kuhn - proprietor
__
illawarra computer services :: a kuhn media australia venture
http://kma.0catch.com  :: mobile 0410.728.389
Serving Sydney, The Illawarra, South Coast and Rural NSW
__
  * This message was composed on a 100% Microsoft free computer *
  We expressly refuse to utilise Microsoft DRM encoded documents
__
  Mandrake GNU/Linux 10.0 OE/Kernel 2.6.3-7/ No Viruses here. 

I have a switch in my apartment that doesn't do anything. Every once in
a while I turn it on and off. On and off. On and off. One day I got a
call from a woman in France who said Cut it out! -- Steven Wright

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Looking for samba user statistics

2004-08-22 Thread Thomas Bork
Stephen Kühn wrote:
This system is running for a while, using Redhat 7.2 and Samba
2.2.3. Question:  Before I completely reinstall this system, I
would like to get some samba statistics from this system. Can
anybody point me in the right direction on how to do this.
[...]
After blowing out 16mb of logfiles, yeah, that would be a nice thing
to have, wouldn't it? I just googled my brains out and didn't come up
with anything - then again, it could be because I'm rather
tired...would like to know what your findings are on this, though...
take a look in the samba tarball under
/examples/misc/extra_smbstatus
I modified the script a little bit:
#! /bin/sh
# set -x
int_samba_version=`smbd -V | cut -d  -f2`
share=$2
do_c_status ()
{
status=`smbstatus -p \
| grep -vi Samba version $int_samba_version \
| grep -vi Service  uid  gid  pid machine \
| grep -vi - \
| sort -u \
| grep -n -v : \
| grep -v 1: \
| grep -c :`
}
do_cs_status ()
{
status=`smbstatus -S \
| grep -vi Samba version $int_samba_version \
| grep -vi Service  uid  gid  pid machine \
| grep -vi - \
| grep -n $share \
| grep -c :`
}
if [ $1 = -c ]
then
do_c_status
echo There are $status unique smbd processes running.
elif [ $1 = -p ]
then
status=`smbstatus -b \
| grep -vi Samba version $int_samba_version`
echo $status
elif [ $1 = -l ]
then
do_c_status
timestamp=`date '+%d.%m.%Y %H:%M:%S'`
echo $timestamp $status $2
elif [ $1 = -cs ]
then
do_cs_status
echo There are $status concurrent connections to share $share.
elif [ $1 = -csl ]
then
do_cs_status
timestamp=`date '+%d.%m.%Y %H:%M:%S'`
echo $timestamp $status $2
else
echo 'smbstat -c' == Count unique smbd processes.
echo 'smbstat -p' == List unique smbd processes.
echo 'smbstat -l logfile' == Append a log entry for the
echo  number of concurrent and
echo  unique processes to logfile.
echo 'smbstat -cs sharename'  == Count processes connected to
echo  sharename (assumed unique).
echo 'smbstat -csl sharename logfile' == Append a log entry for the
echo  number of concurrent
echo  processes connected to
echo  sharename (assumed unique).
fi
Run this script from cron.
--
der tom
[fli4l-/eis-team]
--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba