Date: Sat, 30 May 2020 10:24:00 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: joe mcguckin <joe@via.net>, Freebsd hackers list <freebsd-hackers@freebsd.org> Subject: Re: Request: show interfaces Message-ID: <d58c36b6-31b9-a29a-4688-d0b7af38b15a@grosbein.net> In-Reply-To: <ED8005AC-990A-4AC3-8BF3-14B24AF97D02@via.net> References: <ED8005AC-990A-4AC3-8BF3-14B24AF97D02@via.net>
next in thread | previous in thread | raw e-mail | index | archive | help
30.05.2020 0:49, joe mcguckin wrote:
> It’s always bugged me that Unix doesn’t show as much information as a typical router
> does about ethernet interface statistics.
>
> What we really need is the equivalent of Cisco ’show interface’
>
> This shows the bit rate, packet rate, count, all the various type of errors, etc.
>
> Cisco allows a description field to be set for each interface, and that shows up also in a ’show int’ output.
>
> I think these would be great features, considering how ofter FreeBSD is used for routers and firewalls.
We already have most of these values available.
Both rc.conf(5) and ifconfig(8) manual pages document how do you set and view
interface description with ifconfig and via SNMP.
"netstat -I em0 -dnW" shows total number of input/output packets, errors,
drops and collisions.
"netstat -I em0 -dnW 5" shows rates you mentioned per specified interval of 5 seconds.
Hardware-specific MAC-level counters generally exposed by driver(s) via sysctl:
# sysctl dev.bce.0 | wc -l
66
# sysctl dev.igb.0 | wc -l
187
There are too many values to include in single command output
and while I work with Cisco over 20 years, I don't really like its "show interface"
format because its too "fat". If you do, you can (almost) easily reproduce it
with custom script if you read ifconfig(8) and netstat(1) manual pages carefully.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d58c36b6-31b9-a29a-4688-d0b7af38b15a>
