[mrtg] Re: Monitoring FTP...

Justin Shore listuser at vinnie.ksu.ksu.edu
Sat Oct 28 01:00:45 MEST 2000


At 5:20 PM -0500 10/27/00, Starling Dave (Indy wrote:
>How would I monitor FTP usage (number users, bytes transfered, # files
>transfered)?  I am using wu-ftp.  I know that I can use ftpcount to get the
>number of people connected at that point in time.  But it is possible to
>miss somebody if they are not connected at the time I look.  So, I would
>rather use some other method for count of users anyway...
>Thanks.
>--Dave


Dave,
	I monitor current FTP users via ftpcount.  I don't know of 
any other way of doing it unless you want to run a script every few 
seconds that takes the current # of users and writes that # to file. 
Then you could make a simple script for mrtg to run that could gather 
those values, average them (or whatever you want to do--take the max 
#, average, whatever), return that and null the temp file (so you 
don't those values next time too).  That would work but it's not 
worth it to me.  That would get you the current number of connected 
users.  Here's one of mine that use ftpcount:

http://vinnie.ksu.ksu.edu/stats/vinnie-ftpusers.html

	If you wanted the total number of FTP connections (possibly 
including failed attempts if you want to broaden the script a bit) 
per a five minute period, you could write a script to parse through 
/var/log/secure to count the number of ftp connections in the last 5 
minutes.  It won't be an exact science but it's not terrible.  You'd 
best do it in perl.  I can't think of any pretty ways of of shell 
scripting this.  There would also be the possibility of overlap. 
Whichever log you wrote the connection info to must also be readable 
by the user running mrtg, something you might not want.  I may write 
one if I get time.  It wouldn't really be that hard.

HTH
   Justin
-- 

--
Justin Shore       K-State Linux Distro Mirror, Sysadmin
macdaddy at vinnie.ksu.ksu.edu
<http://vinnie.ksu.ksu.edu/mirror/rpm2html>
<ftp://vinnie.ksu.ksu.edu/pub/mirror/linux>

*Internet2 Users*
<ftp://quest.ksu.ksu.edu/pub/mirror/linux>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list