0

If I want to find out network traffic on my Linux Servers using SNMP. I use the ifOutOctets. and ifInOctets. OIDs in an snmpget request. Where do these OIDs get the data from?

I tried looking at the rfc for these OIDs but I'm still none the wiser. https://www.rfc-editor.org/rfc/rfc3635#section-3.2.5

1
  • I hope this would be helpful; debianadmin.com/… Commented Jul 27, 2017 at 2:15

1 Answer 1

1

It depends. For ifOutOctets and ifInOctets, snmpd probably gets them by querying the kernel (either directly via a syscall or perhaps by examining /proc/net/dev).

For other OIDs, it may get them by running an external command to extract and process the data before returning it. e.g. see Extending snmpd using shell scripts for examples.

1
  • On Ubuntu at least, ifOutOctets and ifInOctets references the data from /proc/net/dev file. This can be verified using strace -p <pid Of SNMP> -e trace=open Commented Jul 28, 2017 at 20:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.