On Wed, 2003-10-29 at 02:54, Payal Rathod wrote:
> On Mon, Oct 27, 2003 at 06:18:25PM -0500, VaibhaV Sharma wrote:
> > --------------------
> > [EMAIL PROTECTED] root]# iptables -L -v -n
> > Chain INPUT (policy ACCEPT 6296 packets, 1675K bytes)
> [...]
> 
> Quite easy way out.
> Maybe somehow I can get the count at every fixed interval and mail it to
> an account.
> 
> > that rule.
> 
> I just need to know data passed thru' for ppp0

There is another, easier way to do this. (there always is ;) )

------------------
[EMAIL PROTECTED] vaibhav]$ /sbin/ifconfig eth0 | grep bytes
          RX bytes:34679798 (33.0 Mb)  TX bytes:8910271 (8.4 Mb)
[EMAIL PROTECTED] vaibhav]$ 

[EMAIL PROTECTED] vaibhav]$ /sbin/ifconfig eth1 | grep bytes
          RX bytes:1922211858 (1833.1 Mb)  TX bytes:497490640 (474.4 Mb)
[EMAIL PROTECTED] vaibhav]$ 
------------------

RX is received, TX is transmitted. Replace eth0 with ppp0 and with some
more bash/perl magic you can store these numbers in a file. But these
will be reset whenever ppp0 goes up/down so you would need to store them
somewhere.

HTH.

VaibhaV
http://vsharma.net
PS: Do I hear the one liner king aka Raju muttering a quick recepie? ;)




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to