Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2024 12:21:39 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: b5a8abe9502e - main - How to show interface traffic in bits per second
Message-ID:  <665823ac-7f80-4872-b224-ae2bfa7059ac@FreeBSD.org>
In-Reply-To: <202412031609.4B3G9HAf023627@critter.freebsd.dk>
References:  <202412022113.4B2LD0mt010926@gitrepo.freebsd.org> <a6f175eb-b81c-43be-8dba-d188eb7b40bd@FreeBSD.org> <202412031609.4B3G9HAf023627@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?665823ac-7f80-4872-b224-ae2bfa7059ac>