On Thu, 26 Jan 2017 14:44:39 +0200 Nogah Frankel <nog...@mellanox.com> wrote:
> Extended stats are part of the RTM_GETSTATS method. This patch adds them > to ifstat. > While extended stats can come in many forms, we support only the > rtnl_link_stats64 struct for them (which is the 64 bits version of struct > rtnl_link_stats). > We support stats in the main nesting level, or one lower. > The extension can be called by its name or any shorten of it. If there is > more than one matched, the first one will be picked. > > To get the extended stats the flag -x <stats type> is used. > > Signed-off-by: Nogah Frankel <nog...@mellanox.com> > Reviewed-by: Jiri Pirko <j...@mellanox.com> Sorry I was confused because RTM_GETSTATS contains multiple statistics. Your patch is about getting LINK_XSTATS and after looking in more detail, you are correct this should be an option. Although it would make sense to show this as addition to the basic statistics. And when I tested it no output happens which seems confusing. $ ./misc/ifstat -p -x cpu_hits #kernel Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate RX Errs/Drop TX Errs/Drop RX Over/Rate TX Coll/Rate What I was intending in earlier discussion was using IFLA_STATS_LINK_64 which would allow supporting 64 bit statistics on 32 bit platforms.