ETegro/astor2-rrdd — pull request #1 by stargrave (2014-07-08 11:52:58+00:00)
Title: Free softwarering, performance optimizations, PEP8, refactoring

Fixed regular expression format for ifconfig parsing seems to be a wrong way. I have got:

# ifconfig eth0 | grep bytes
RX bytes:861824500 (821.8 MiB) TX bytes:25883938364 (24.1 GiB)

and '{print $5}' will print TX. Noone guarantees that there won't be space after bytes:. Seems that /proc/net/dev contains enough machine readable information.

I did not test that code, because of hard-coded filepaths, however that could be easily configured through argparser or environment variables.