Updated: 16 November 2026 · Applies to: Net-SNMP 5.9.4 (snmpd) on AlmaLinux 10 and Debian 13

When SNMP monitoring times out, shows gaps or makes snmpd use a lot of CPU on a busy server, the usual cause is the TCP connection table. A monitoring tool that walks the whole tree asks snmpd to list every open TCP connection, and on a web or mail server with thousands of connections that takes longer than the poller waits. The fix is to exclude the connection tables from the SNMP view while keeping everything else, including the TCP counters.

Fix: exclude the TCP connection tables

  1. Open /etc/snmp/snmpd.conf and find the view your community uses. Look at the rocommunity line (-V names the view) or the access line. On a stock Debian 13 server it is systemonly; on a stock AlmaLinux 10 server it is systemview. In the example below the view is called all.
  2. Add excluded lines with that same view name, below its included lines:
    view all included .1
    view all excluded .1.3.6.1.2.1.6.13
    view all excluded .1.3.6.1.2.1.6.19
    .1.3.6.1.2.1.6.13 is TCP-MIB::tcpConnTable and .1.3.6.1.2.1.6.19 is TCP-MIB::tcpConnectionTable (the newer version of the same list, with IPv6).
  3. Restart the agent:
    systemctl restart snmpd
  4. Check that the table is hidden and the counters still answer. Replace COMMUNITY with your community string:
    snmpwalk -v2c -c COMMUNITY 127.0.0.1 TCP-MIB::tcpConnectionState
    Output after the change:
    TCP-MIB::tcpConnectionState = No Such Object available on this agent at this OID
    snmpget -v2c -c COMMUNITY 127.0.0.1 TCP-MIB::tcpCurrEstab.0
    Output:
    TCP-MIB::tcpCurrEstab.0 = Gauge32: 100

In our lab test with about 100 open connections, the same walk returned 122 rows before the change and none after, while tcpCurrEstab (the number of established connections, which most graphs use) kept working.

Why the view name matters

According to the Net-SNMP manual, several view lines with the same name are combined, and excluded entries cut a subtree out of what included lines allow. An excluded line with a view name that no community uses has no effect. So a line such as view all excluded .1.3.6.1.2.1.6 only helps if your community really reads the view called all.

Older guides exclude the whole TCP group, .1.3.6.1.2.1.6. That also works, but it hides the TCP counters too (established connections, resets, retransmissions), so your monitoring loses those graphs. Excluding only the two tables is enough.

If UDP is also busy (for example a DNS server), the UDP listener tables can be excluded the same way: .1.3.6.1.2.1.7.5 (udpTable) and .1.3.6.1.2.1.7.7 (udpEndpointTable).

Check how many connections the server has

ss -s

If the TCP total runs into thousands, the connection table is very likely what slows SNMP down. You can time a walk of it to be sure:

time snmpwalk -v2c -c COMMUNITY 127.0.0.1 TCP-MIB::tcpConnectionTable | wc -l

Other reasons SNMP does not answer

  • snmpd listens only on localhost. Debian's default snmpd.conf has agentaddress 127.0.0.1,[::1], so a remote poller gets no reply. According to the Net-SNMP manual, without an agentaddress line the agent listens on UDP port 161 on all IPv4 interfaces. To listen on one public address only, use for example agentaddress udp:203.0.113.10:161.
  • The view is too small. Both stock configurations only show the system group and a small part of the host resources group to the public community, so interface traffic is missing. Add an included line for what you need, such as .1.3.6.1.2.1.2 (interfaces) and .1.3.6.1.2.1.31 (64-bit interface counters).
  • The firewall blocks UDP 161. Allow it only from your monitoring server's address, not from everyone. See How to Open a Port in Linux and Ubuntu: Firewall Commands and How to Open a Port in the Firewall on RHEL, AlmaLinux and Rocky Linux.
  • The poller gives up too early. Raise the timeout on the monitoring side, for example snmpwalk -t 10 -r 1 (10 seconds, one retry).

Use a long, random community string (or SNMPv3 with a user and password) and never leave public open to the internet. If you would rather not run SNMP yourself, our server monitoring service can watch the server for you.

Official documentation: snmpd.conf manual page.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket