Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 1998 14:25:17 -0400
From:      FreeBSD.lists@symmetron.com (FreeBSD Mailing Lists)
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   tracking bandwidth usage on a pppd connection
Message-ID:  <006f01bdfd20$2778c950$02baefce@mail.symmetron.com>

next in thread | raw e-mail | index | archive | help
I'm interested in tracking the bandwidth usage on my pppd (kernel-mode ppp) connection.

I currently have a setup that has been working for me for more than a year under
2.1.6.1-RELEASE running on a 486-33 machine.  I am about to replace that machine with a
Pentium machine running 2.2.7-STABLE.

When I got to the step of porting over the code I'm currently using to track bandwidth to
the new machine, I started to wonder what software might be out there already that does
this task and maybe does it better than my current setup.

Does anyone know if such software exists?  And if so, can you give me pointers to their
location?

Basically what I'm looking for is something that at the very least can do what I'm doing
already.

What I have already is a program (a hack of pppstats) that monitors the pppd connection
and prints an entry to a log file every minute.  The log file simply contains the time (in
time_t format), the number of bytes sent, and number of bytes received on the ppp0
interface.  This program is started up by rc.local and there is an entry in /etc/crontab
to run another program that processes the log file from the previous day to produce a .gif
file and emails it to me.  The .gif file is a simple graph showing bandwidth in Kbps
versus time of day.  The log files can also be used for further processing to get
interesting statistics (something I haven't had the time to do yet).

A few related questions would be:

1) Is there a better way of doing this?

2) Is there a better source of information (one that can be accessed through code) to get
the number of bytes that go in and out on an interface (not only the ppp0 interface)?

3) If there isn't a great package out there already, is there any interest in what I have
done so far?  Maybe I'll port it over to my 2.2.7-STABLE machine and clean up my code in
the process.

-john

---------------
John A. Shue
4000 Legato Road, Suite 600
Fairfax, VA 22033
(703) 591-5559
(703) 591-6337 FAX


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006f01bdfd20$2778c950$02baefce>