Skip to main content
Home Forums Can I monitor I/O of my ethernet? Can I monitor I/O of my ethernet?
Thread

Can I monitor I/O of my ethernet?

Can I monitor I/O of my ethernet? Networking 9 posts Sep 23, 2002 — Sep 26, 2002
Can I in any way monitor how much I�ve downloaded on my computer? Is there a program for it or is it in the system preferences?

I am using a cable modem through my ethernet port and the bastard IPS charges me by the MB.
netstat -s

will give you statistics on your network (total packets/bytes transferred, as well as a lot of other info). Might be more than you need, but it might let you extract what you need.

You might also check the cable modem. Many of them include network management features, including packet counts. That would be a more accurate figure anyway since that's what your ISP would measure and wouldn't include any local traffic you have on your internal network (e.g. Mac to Mac traffic, printer data (if you print over a network), etc.)
Hey, thanx! I guess this gives some clue about amount of traffic.

Is there a way to see from what time this count is, I mean netstat -s told me I had received 477437467 bytes, but it doesn't tell me from what time.

So I have no way of knowing through that command ??? Or am I missing something?

A readout from the Terminal:

tcp:
628962 packets sent
427248 data packets (477603357 bytes)
6010 data packets (6436415 bytes) retransmitted
0 resends initiated by MTU discovery
117964 ack-only packets (82240 delayed)
0 URG only packets
58 window probe packets
62130 window update packets
15713 control packets
572780 packets received
297863 acks (for 477437467 bytes)
16472 duplicate acks
0 acks for unsent data
276275 packets (234267691 bytes) received in-sequence
2771 completely duplicate packets (1408023 bytes)
23 old duplicate packets
576 packets with some dup. data (129890 bytes duped)
20689 out-of-order packets (20705689 bytes)
12 packets (2725 bytes) of data after window
9 window probes
4096 window update packets
570 packets received after close
47 discarded for bad checksums
0 discarded for bad header offset fields
0 discarded because packet too short
8286 connection requests
561 connection accepts
67 bad connection attempts
0 listen queue overflows
7895 connections established (including accepts)
9533 connections closed (including 739 drops)
383 connections updated cached RTT on close
383 connections updated cached RTT variance on close
199 connections updated cached ssthresh on close
935 embryonic connections dropped
150643 segments updated rtt (of 145592 attempts)
6662 retransmit timeouts
13 connections dropped by rexmit timeout
80 persist timeouts
0 connections dropped by persist timeout
321 keepalive timeouts
0 keepalive probes sent
285 connections dropped by keepalive
150481 correct ACK header predictions
227530 correct data packet header predictions







So... do you see any timeline?
Quote:
Originally posted by voodoo:
Hey, thanx! I guess this gives some clue about amount of traffic.

Is there a way to see from what time this count is, I mean netstat -s told me I had received 477437467 bytes, but it doesn't tell me from what time.

So I have no way of knowing through that command ??? Or am I missing something?


AFAIK the numbers are based on when the system was last booted. At least, I don't know any other way of resetting the stats.

There are various products around that will graph usage over time, with MRTG being one of the best known. I've never run it under Mac OS X but it's all perl-based, so there shouldn't be much problem.

The trouble with these graphs, though is that you want total volume transferred in MB, which can be difficult to extract from a time graph.

Your best bet may be a cron task that filters the current bytes transferred from netstat. Running it daily at midnight, for example, and subtracting the previous day's figure would give you the total volume transferred the previous day.
you might check out xmonitor if your on OSX
Quote:
Originally posted by mohog:
you might check out xmonitor if your on OSX


cool. thanks for the link, too.
Quote:
Originally posted by voodoo:
Can I in any way monitor how much I�ve downloaded on my computer? Is there a program for it or is it in the system preferences?

If you're in OSX you can use Mac Monitor or MRTG.
MRTG is very good, but the setup time is longer.
Quote:
Originally posted by mohog:
you might check out xmonitor if your on OSX


I found XMonitor and am using it now. It is a very primitive app, but it seems to show some sort of a network activity counter.

It counts MB in and out. The interface is seriously flawed, though.

I'm no hardliner on interface, but the XMonitor interface is below par.

It's shocking to see how much data I download each day!

Anyway, it'll do untill I find something more specific.

There should be a program that counts each bit in and out of every port of the machine and stores the data numerically for inspection. Also to be able to measure amount of data from date X to date Y. Like how much from 9/1 to 10/1 2002.

It's a simple thing but I don't see XMonitor do it.

It only keeps record of the data I/O since the machine was started. Ah, well....
I am not certain, but I think XMonitor must be counting wrong! It is counting WAY to much traffic... I mean how can I recieve 80 MB over night? I was sleeping at the time with a GNUtella client running, but I wasn't townloading. WTF!!?
mp.ls