Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2020 20:35:35 +0200
From:      Daniel Ebdrup Jensen <debdrup@FreeBSD.org>
To:        Freebsd hackers list <freebsd-hackers@freebsd.org>
Subject:   Re: Request: show interfaces
Message-ID:  <20200529183535.6lm4xk6pkq7n25do@nerd-thinkpad.local>
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

[-- Attachment #1 --]
On Fri, May 29, 2020 at 10:49:40AM -0700, 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.
>
>Thanks,
>
>Joe
>
>
>Joe McGuckin
>ViaNet Communications
>
>joe@via.net
>650-207-0372 cell
>650-213-1302 office
>650-969-2124 fax
>
>
>
>_______________________________________________
>freebsd-hackers@freebsd.org mailing list
>https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"

Hi Joe,

FreeBSD, and other Unix-likes historically, exposes this differently from how 
it's available on IOS (and not even IOS is consistent about OID namespacing), 
which tends to have a more CLI based approach than a real vty; this is of 
course a matter of preference, but I think I'm partial to a vty rather than a CLI.

For FreeBSD, most of the information you're seeking is available via 'sysctl -a' 
where you can often grep the dev.<driver>.%d.mac_stats. namespace for the various
counts - from which you can figure a rate by dividing into number of 
seconds and assuming an IMIX distribution, unless you know your distribution to 
be, also get a rough count of the actual bandwidth. If you need more detailed 
information there's either the SIFTR(4) framework or dtrace (though at least the 
latter has quite noticable probe effect if you're tracing individual packets) if
you aren't using a firewall.

There's also a lot of additional information available, at least if you're 
running ipfw. I can't speak to pf, but I'd be surprised if it's lacking.

There's also information about the physical hardware itself available in in 
'pciconf -BcelvV' - although I imagine this might depend on the hardware itself 
to some degree.

Hope this helps, because I think I might not be the only one that doesn't like 
the CLI-ification of a certain piece of opensource software. :)

Yours,
Daniel Ebdrup Jensen

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQGTBAABCgB9FiEEDonNJPbg/JLIMoS6Ps5hSHzN87oFAl7RVfdfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDBF
ODlDRDI0RjZFMEZDOTJDODMyODRCQTNFQ0U2MTQ4N0NDREYzQkEACgkQPs5hSHzN
87pVBAf/aGlYbAsEY+X8CyAjS3+rff1/nm/VCOo/dNSNV672QA8DcHBamROGdrD8
DEe+zGbjCAX70hY/wrGGnrWqN3pxG6MXmWtKykuMp2allTwGl3c8rcR3SIO/T+KB
pXcsUnld0PY2a4ERUDqPD1svf3bnaXUQ6/oi6kvMxTfuxZItkOX0N2g9P814j/gs
jY9CbKzjdV4CkWclmPFJMRXee1jmIEjYI8FSqs8UmEIdGsTaGhWJwrtBjFf6xlRw
Bq9EawWdnpuUriNjCUSk13I7biZDhSF3efK0jVOmsOeR963PT+2MOoodgPK7Y4Op
FBXrrkyp7io4RWonczVjv80B1Vz/BQ==
=ylE7
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200529183535.6lm4xk6pkq7n25do>