Re: measure traffic caused by pppd (UMTS)

2009-03-18 Thread Matthias Apitz
El día Friday, May 16, 2008 a las 10:08:26PM +0200, Toni Schmidbauer escribió:

 At Fri, 2 May 2008 11:46:46 +0200,
 Matthias Apitz wrote:
  Sometimes when I travel around and can't see any usable WLAN I'm using
  the UMTS and PPPD, which works well but of course one must pay for this;
 
 mb=`netstat -ib|awk '/tun0.*Link/ {mb=($6+$9)/1024^2; printf %.2f,mb}'`
 date=`date +%s`
 ^
I think there is a typo in your script;
and for me the fields of the netstat output are $7 and $10:

 echo MB Transfered: $mb
 echo $date $mb  ~/tmp/grps_kosten.txt
 
 works for me. i'm using the above code snipped after shutting down
 pppd.

will the 'netstat -ib' also count the LCP-echoreq/echo traffic in ppp0?

Thx

matthias

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e matthias.ap...@oclc.org - w http://www.oclc.org/ http://www.UnixArea.de/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: measure traffic caused by pppd (UMTS)

2009-03-18 Thread Matthias Apitz
El día Wednesday, March 18, 2009 a las 09:57:11AM +0100, Matthias Apitz 
escribió:

 El día Friday, May 16, 2008 a las 10:08:26PM +0200, Toni Schmidbauer escribió:
 
  At Fri, 2 May 2008 11:46:46 +0200,
  Matthias Apitz wrote:
   Sometimes when I travel around and can't see any usable WLAN I'm using
   the UMTS and PPPD, which works well but of course one must pay for this;
  
  mb=`netstat -ib|awk '/tun0.*Link/ {mb=($6+$9)/1024^2; printf %.2f,mb}'`
  date=`date +%s`
  ^
 I think there is a typo in your script;
 and for me the fields of the netstat output are $7 and $10:

No, I was wrong with 7 and 10; I was testing the script with a Wifi
interface iwi0; for ppp0 it is 6 and 9 because the MAC addr field is
empty; sorry;


matthias
-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e matthias.ap...@oclc.org - w http://www.oclc.org/ http://www.UnixArea.de/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: measure traffic caused by pppd (UMTS)

2008-05-18 Thread Toni Schmidbauer
At Sun, 18 May 2008 07:15:10 +0300,
Odhiambo Washington wrote:
 ..as in from ppp.linkdown?

i was using a custom script for umts startup/shutdown. but it should
work there as well. 

toni
-- 
If you understand what you're doing, you're | toni at stderror dot at
not learning anything.  | Toni Schmidbauer
-- Anonymous|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: measure traffic caused by pppd (UMTS)

2008-05-17 Thread Toni Schmidbauer
At Fri, 2 May 2008 11:46:46 +0200,
Matthias Apitz wrote:
 Sometimes when I travel around and can't see any usable WLAN I'm using
 the UMTS and PPPD, which works well but of course one must pay for this;

mb=`netstat -ib|awk '/tun0.*Link/ {mb=($6+$9)/1024^2; printf %.2f,mb}'`
date=`date +%s`
echo MB Transfered: $mb
echo $date $mb  ~/tmp/grps_kosten.txt

works for me. i'm using the above code snipped after shutting down
pppd.

hth
toni
-- 
If you understand what you're doing, you're | toni at stderror dot at
not learning anything.  | Toni Schmidbauer
-- Anonymous|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: measure traffic caused by pppd (UMTS)

2008-05-17 Thread Odhiambo Washington
On Fri, May 16, 2008 at 11:08 PM, Toni Schmidbauer [EMAIL PROTECTED] wrote:

 At Fri, 2 May 2008 11:46:46 +0200,
 Matthias Apitz wrote:
  Sometimes when I travel around and can't see any usable WLAN I'm using
  the UMTS and PPPD, which works well but of course one must pay for this;

 mb=`netstat -ib|awk '/tun0.*Link/ {mb=($6+$9)/1024^2; printf %.2f,mb}'`
 date=`date +%s`
 echo MB Transfered: $mb
 echo $date $mb  ~/tmp/grps_kosten.txt

 works for me. i'm using the above code snipped after shutting down
 pppd.


..as in from ppp.linkdown?


-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Oh My God! They killed init! You Bastards!
--from a /. post
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


measure traffic caused by pppd (UMTS)

2008-05-02 Thread Matthias Apitz

Hello,

Sometimes when I travel around and can't see any usable WLAN I'm using
the UMTS and PPPD, which works well but of course one must pay for this;

Is there some tool which I could put into /etc/ppp/ip_down script which
logs the traffic done into some file; I see /usr/ports/net/ppptraf which
comes without any documentation and is curses based :-(
any other ideas?

I'm not interested in any analysis about to which location the traffic
goes or about speed and bandwidth; just

- cmd line based with output to a file or stdout
- the amount of bytes/megabytes in and out;

thx in advance

matthias
-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e [EMAIL PROTECTED] - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
Don't top-post, read RFC1855 http://www.faqs.org/rfcs/rfc1855.html
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on Usenet and in e-mail?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]