From nobody Tue Dec 03 15:41:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y2lHs6GFHz5gJ72; Tue, 03 Dec 2024 15:41:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y2lHs5f7kz4GVg; Tue, 3 Dec 2024 15:41:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733240489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tPXG1wBi0AL4+JAg8lVxbN2Jb2U5p3ABdqzyar9bXjQ=; b=uIIKZmWA4sMTqhMJeC7NBp8Ufkkf4FhgeaGPbc+fBp1sI3bLiWEj8nPAWFsckeDvDGpUUq +1bzejGiakzUZcpVJRfUp0hTi0xvrIhZvIbB6uAj+uEPZ3VH48t/phY4DHo8940PYM5+y1 efj/O+RlzZK0ERWAYTTUjsTq7BD5NSQ6yhNvxEkAYwdPjFaXajGyF7pKi8Kv7/w96a0y33 zEFcb59hs5IwH74p3V2QJfPt7ews9LMVDNPlFvgvbVq6fPUqIgzamHu2A5COzBb7JhxwTp tS2ecPeZ9zPbXKTFvp/To/3Dctwl+eENfzdLwdK4Z4L0HANZev3NqgLbxckSOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733240489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tPXG1wBi0AL4+JAg8lVxbN2Jb2U5p3ABdqzyar9bXjQ=; b=ZV9ZkPaicNMUDU8dN3FvbQ6Oc6BA5tnDqedtei5hI6Y7/L6U003OUhdGSBkP2OJK+dXzdO YjMGfNc3UYpbzYuM8D/46c2BY/7X+HEqLkkXxQbbaYhS4SPdhJnsHWzz0KD5JhCpk0WVcM RJg/TqtyDoLtSVVndyiyf4/5FJxV9N3nKtY/iKXGAphbqHuAmM3LYYK+MMqLBkC4PKJ4kJ X0bI27I0AJYmNlm1CQ606EnMaDHJA3kqTQkWTpqGSGVXOnNssGCjuHAgfdDznYgLY2ZNdo OWooiXzFyTPZyNSYykSBw/8Y+PeDRj6BoFb+jcIj3BXfhSZY/ln3qtpDUWQwTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733240489; a=rsa-sha256; cv=none; b=xcfa4QAwB8ZvyG5Qi+Bbx3XESAlStahSdluOcVlS4gsjDOd+cHGgIOk4/tV3b8d1JBi3m4 l7H3N/weboMvM8SJiBdBK21s7mMdoud5x/QWbODu/kC2BXcw0bCkS/89bJe9cxUFFGf4VA gFa825LABFbrnBNV66I9QPomH3xqrRYoV/xnC+TpDHlskuqW6VeplYk8S5wwmLJK6Y4u57 7VGazXXuwcZcyyyFvQUjbpxnLvvxLCtnXRsmldd/kkJ++IUYcMd0jYy4DdMSYKFtTa0vrS qOuAXQ3O55Z190Ri45PpYzsuFaNdCFdGwPl8Gk+eIhSq9GK49rm2/d+5tN4RHg== Received: from [IPV6:2601:5c0:4200:b830:814a:cbb2:d950:d5f7] (unknown [IPv6:2601:5c0:4200:b830:814a:cbb2:d950:d5f7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Y2lHs3zPkzPN5; Tue, 3 Dec 2024 15:41:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 3 Dec 2024 10:41:28 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: b5a8abe9502e - main - How to show interface traffic in bits per second Content-Language: en-US To: Poul-Henning Kamp , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202412022113.4B2LD0mt010926@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202412022113.4B2LD0mt010926@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/2/24 13:13, Poul-Henning Kamp wrote: > The branch main has been updated by phk: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b5a8abe9502e781598dc052698fe7fa5830f59ee > > commit b5a8abe9502e781598dc052698fe7fa5830f59ee > Author: Poul-Henning Kamp > AuthorDate: 2024-12-02 21:12:27 +0000 > Commit: Poul-Henning Kamp > CommitDate: 2024-12-02 21:12:27 +0000 > > How to show interface traffic in bits per second > --- > usr.bin/fortune/datfiles/freebsd-tips | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips > index c0807405005e..1e9501e3a6fb 100644 > --- a/usr.bin/fortune/datfiles/freebsd-tips > +++ b/usr.bin/fortune/datfiles/freebsd-tips > @@ -856,3 +856,7 @@ $ fc-list ':charset=0x1F4A1' > $ pkg which /usr/local/share/fonts/noto/NotoColorEmoji.ttf > /usr/local/share/fonts/noto/NotoColorEmoji.ttf was installed by package noto-emoji-2.042 > % > +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: > netstat -I igc0 8 input igc0 output packets errs idrops bytes packets errs bytes colls 61 0 0 14418 6 0 420 0 42 0 0 8926 5 0 346 0 43 0 0 7631 7 0 540 0 31 0 0 4269 6 0 420 0 20 0 0 2173 6 0 420 0 26 0 0 3574 5 0 346 0 32 0 0 4407 9 0 678 0 22 0 0 2374 5 0 346 0 I do think having a tip about 'netstat -I foo ' is useful btw. I'm not sure if you are trying to do just highlight the interval feature, or if you are highlighting that the stat is scaled by the interval rather than the raw delta (which isn't true for netstat, but is true for some tools (e.g. vmstat uses per-second rates in interval mode). -- John Baldwin