LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Getting ethtool rx-crc-errors programmatically? (https://www.linuxquestions.org/questions/linux-newbie-8/getting-ethtool-rx-crc-errors-programmatically-4175425652/)

rjratnip 09-04-2012 05:25 PM

Getting ethtool rx-crc-errors programmatically?
 
Hi,
I need to get the rx-crc-errors output from ethtool programmatically in C. I've seen examples for getting ethernet speed, etc., using ioctl(), but not for the NIC statistics output from 'ethtool -S eth0'.

> ethtool -S eth0
NIC statistics:
rx-dropped-by-kernel: 0
rx-large-frame-errors: 0
rx-short-frame-errors: 0
rx-non-octet-errors: 0
rx-crc-errors: 0
.....

Any ideas? Thanks.


All times are GMT -5. The time now is 09:45 AM.