Re: git: b5a8abe9502e - main - How to show interface traffic in bits per second

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 03 Dec 2024 17:21:39 UTC
On 12/3/24 08:09, Poul-Henning Kamp wrote:
> --------
> John Baldwin writes:
> 
>>> +When netstat reports every 8 seconds, it tells traffic in bits per second:
>>> +
>>> +$ netstat -I bge0 8
>>> +%
>>
>> Hmm, I'm pretty sure it's in bytes, and checking the code, it seems like show_stat()
>> in netstat/if.c just shows the raw delta in values without scaling it by 'interval',
>> so I think the counts are the number of bytes sent/received in 8 seconds:
> 
> And since
> 
> 	bytes/8 seconds == bits/second
> 
> Q.E.D

Ah, fair enough.  Clearly too subtle for my thick head. ;-)

-- 
John Baldwin