> > On Thu, Dec 09, 2021 at 03:13:42AM +0000, Spencer Ku (古世瑜) wrote: > >> Hi All, > >> We are developing the redfish of openbmc, and want to expose some > >> Ethernet > > > information through the redfish interface, like packet count, drop > > count. My > > > goal is to calculate the bandwidth / drop package rate of the > > Ethernet. We can get those counts from Ethernet driver > > (/sys/class/net/{Ethernet_Name}/statistics), but as far as I know, > > there is > > > no suitable d-bus to read those metrics. > > I wonder: What's the problem with just reading that file? We just want to above to operate the system file directly, but it's also a implement method to choose. Thanks for your reply! > > >> > >> > >> > >> My question is that: is it possible to create the new D-bus > >> properties ( > > like under the /org/freedesktop/{network}/network/{Ethernet_Name}), > > then > sync > > the counts to that D-Bus? > > > > Why not just use netlink for this? I think it provides this > > information already as part of networking stats. Have you looked into that? > > > > thanks, > > > > greg k-h >