[mrtg] Re: OID for ftp sessions

Justin Shore listuser at vinnie.ksu.ksu.edu
Sat Jul 29 18:47:55 MEST 2000


At 2:43 PM -0500 7/28/00, Dan Spray wrote:
>Hello all,
>
>I found this site that had current ftp sessions:
>
>http://csociety.ecn.purdue.edu/stats/csociety-ftp.users/csociety-ftp.users.h
>tml
>
>I noticed that they were running WU-FTP on linux.  I was curious if anyone
>knew the OID for this?
>
>Thanks in advance.
>
>Dan Spray

Kinda like this?

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

Here's what I used:

#!/usr/bin/perl

@res = `/usr/local/bin/ftpcount`;
$time = time();

foreach $res (@res) {
         if ($res =~ /(\d+)\susers$/) {
            $users = $1
         }
         else {
            next
         }
}

$uptime = `uptime`;

$uptime =~ /up (.*?),/;
$up = $1;

#print "$users\n";
#print "$users\n";
print "0$users\n";
print "0$users\n";
print "$up\n";
print "vinnie.ksu.ksu.edu\n";




The leading "0" in the print statements makes sure that at least a 0 
is reported and not null so MRTG doesn't spew errors--it doesn't care 
if it reports a "013" or a "13", just so long as it's not null.  This 
originated from something but I forget what so I can't give credit to 
whomever, but they know who they are.

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