[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1288122986.2652.20.camel@edumazet-laptop>
Date: Tue, 26 Oct 2010 21:56:26 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: greearb@...delatech.com, netdev@...r.kernel.org
Subject: Re: netlink stats: Ability to get stats for a single device?
Le mardi 26 octobre 2010 à 12:38 -0700, David Miller a écrit :
> From: Ben Greear <greearb@...delatech.com>
> Date: Tue, 26 Oct 2010 12:31:12 -0700
>
> > Am I missing something, or do I just need to write up a patch
> > to have netlink pay attention to the ifindex?
>
> Setting the ->ifi_index or IFLA_IFNAME attribute values appropriately
> in the getlink request doesn't work?
>
> That should give you back, amonst other things, the rtnl_link_stats
> for the device in the netlink response.
> --
Yep, it should be easy to change iproute2 to not ask a full dump
in ip/ipaddress.c :
if (rtnl_wilddump_request(&rth, preferred_family, RTM_GETLINK) < 0) ...
and instead use rtnl_send() or something like that, if user provided one
specific interface name (or index)
ip link show dev eth0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists