> -----Original Message----- > From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> > Sent: Friday, December 10, 2021 1:24 AM > To: Spencer Ku (古世瑜) <Spencer.Ku@xxxxxxxxxxxx> > Cc: systemd-devel@xxxxxxxxxxxxxxxxxxxxx; Litzung Chen (陳利琮) > <Litzung.Chen@xxxxxxxxxxxx>; Nan Zhou <nanzhou@xxxxxxxxxx> > Subject: Re: Additional Information for Ethernet > > 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. > > > > > > > > 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? > I'm not quite familiar with netlink, let me check on that. Thanks for your reply! > thanks, > > greg k-h