RE: Getting the network traffic amount since the interface went up
Try netstat -s > -Original Message- > From: [EMAIL PROTECTED] [mailto:owner-freebsd- > [EMAIL PROTECTED] On Behalf Of Parv > Sent: December 14, 2005 2:23 AM > To: Chuck Swiger > Cc: f-q > Subject: Re: Getting the network traffic amount since the interface went > up > > in message <[EMAIL PROTECTED]>, > wrote Chuck Swiger thusly... > > > > Parv wrote: > ... > > > Is there a way to find out the amount of traffic (in & out) > > > since a network interface has been up (not since the OS has been > > > up)? > > > > There are lots of solutions to this problem, it kinda depends on > > what you're trying to do. > > Well, actually i want to know the limit(s) (related to amount of > data and number of connections) at which SMC Barricade 7004ABR > router allows only the already established connections and refuses > to allow any new ones. This is all related to download a large > torrent via rtorrent. Rebooting the router solves the problem until > i decide to restart the download. > > > > You might set up an IPFW rule which matches just the traffic you > > care about, and look at "ipfw -a l". You can zero the counters at > > will if you like, too. From the ipfw manpage: > > > > Per-flow queueing can be useful for a variety of purposes. A > > very simple one is counting traffic: > > Thanks for bringing that to my attention as I mainly use ipf & have > not paid much of a look to ipfw. > > > - Parv > > -- > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions- > [EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Getting the network traffic amount since the interface went up
in message <[EMAIL PROTECTED]>, wrote Chuck Swiger thusly... > > Parv wrote: ... > > Is there a way to find out the amount of traffic (in & out) > > since a network interface has been up (not since the OS has been > > up)? > > There are lots of solutions to this problem, it kinda depends on > what you're trying to do. Well, actually i want to know the limit(s) (related to amount of data and number of connections) at which SMC Barricade 7004ABR router allows only the already established connections and refuses to allow any new ones. This is all related to download a large torrent via rtorrent. Rebooting the router solves the problem until i decide to restart the download. > You might set up an IPFW rule which matches just the traffic you > care about, and look at "ipfw -a l". You can zero the counters at > will if you like, too. From the ipfw manpage: > > Per-flow queueing can be useful for a variety of purposes. A > very simple one is counting traffic: Thanks for bringing that to my attention as I mainly use ipf & have not paid much of a look to ipfw. - Parv -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Getting the network traffic amount since the interface went up
Parv wrote: > I am interested to know the total amount of data passed through a > network interface (em0 in my case) since the interface went up. So > far, i have seen that pload, nload, & "netstat -b -I" report the > amount since the operating system has been up, not since the new > ethernet connection has been (re)established. > > Is there a way to find out the amount of traffic (in & out) since a > network interface has been up (not since the OS has been up)? There are lots of solutions to this problem, it kinda depends on what you're trying to do. You might set up an IPFW rule which matches just the traffic you care about, and look at "ipfw -a l". You can zero the counters at will if you like, too. From the ipfw manpage: Per-flow queueing can be useful for a variety of purposes. A very simple one is counting traffic: ipfw add pipe 1 tcp from any to any ipfw add pipe 1 udp from any to any ipfw add pipe 1 ip from any to any ipfw pipe 1 config mask all The above set of rules will create queues (and collect statistics) for all traffic. Because the pipes have no limitations, the only effect is collecting statistics. Note that we need 3 rules, not just the last one, because when ipfw tries to match IP packets it will not consider ports, so we would not see connections on separate ports as different ones. -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"