Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Oct 1999 22:22:04 GMT
From:      Alexander Yeremenko <ay@sita.kiev.ua>
To:        freebsd-ipfw@freebsd.org
Subject:   Re: packet counting with firewall
Message-ID:  <FIy3Gs.7sK@sita.kiev.ua>
References:  <Pine.BSF.4.05.9910010921540.39615-100000@home.elischer.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Julian Elischer <julian@whistle.com> wrote:
[...]

>> 
>> By the way, I'm interested in another alternatives if it's too crazy.  Yes I
>> know that with netstat -iI pppX I can get the packet statistics, but:
>> a) are there any methods to reset the counters, eg: netstat -z -I pppX or
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> something like that
^^^^^^^^^^^^^^^^^^^^^^^

> netstat -ib also counts bytes

> You can use the same calls as netstat to read these numbers in your own
> C code..



> both methods would work ok..


> julian


>> 
>> Thank,
>> 	Gabor
>> 
>> PS: Please CC: to me, as I'm not on that list.  Thanx!
>> 
>> ZGabor at CoDe dot HU
>> 
>> -- 
>> #!/bin/ksh
>> Z='21N16I25C25E30, 40M30E33E25T15U!' ;IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set $Z ;for i { [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set $Z;X=;for i { [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;X="$X $i";typeset +l i;};print "$X"
>> 
>> 
>> To Unsubscribe: send mail to majordomo@FreeBSD.org
>> with "unsubscribe freebsd-ipfw" in the body of the message
>> 



> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-ipfw" in the body of the message



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ipfw" in the body of the message




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?FIy3Gs.7sK>