Byte count for a specific connection
Vu Pham
vu
Mon Feb 14 13:00:27 PST 2005
> -----Original Message-----
> From: linux-users-bounces at linux-sxs.org
> [mailto:linux-users-bounces at linux-sxs.org] On Behalf Of David Bandel
> Sent: Friday, February 11, 2005 4:57 PM
> To: Linux tips and tricks
> Subject: Re: Byte count for a specific connection
>
> On Fri, 11 Feb 2005 08:38:54 -0600, Vu Pham <vu at sivell.com> wrote:
> > Hi all,
> >
> > I am charged for the data transfer by amount of transferred
> bytes. Is
> > there any way/tool for me to measure the number of bytes (
> including
> > or not including the IP and TCP header ) of a given
> connection between two hosts.
> >
>
> There are several tools that will measure this, depending on
> exactly what you want to measure: between two hosts, per
> protocol, per port, or just raw transfers on your external interface.
>
> For raw xfers, snmp would be a good choice, and there are
> several tools that will provide graphs by polling snmp.
>
> There are several others as well. I suggest a search of
> freshmeat.net and peruse some of their networking tools.
>
Thanks, David. I found ntop is helpful. It shows the details on host/host
and host/port.
Last night I wrote a tiny inetd-ed tool that works as a bridge between the
client and the server, something like man-in-the-middle that just counts the
incoming and outgong bytes for a given connection and writes the result to
syslog. In this case, it can count only the data, not the tcp and/or ip
header.
Anyway, it helped me to sleep more easily.
Vu
More information about the Linux-users
mailing list