Linux
banshee/linux-collection/linux/snmp/
users
Number of open sessions on a Linux host by SNMP.
by banshee1 installation2 versions
v2Latest
Published on October 28, 2026. One naming convention across collections; documentation completed.
Open sessions on a Linux host, by SNMP
Returns the number of open sessions. One watch is offered, with no default threshold.
Versions
Generic: hrSystemNumUsers (HOST-RESOURCES-MIB) is served the same way by net-snmp on any Linux.
How it works
The collector reads hrSystemNumUsers (HOST-RESOURCES-MIB): net-snmp counts the sessions the system records in utmp, on the console as well as remote ones (SSH, a graphical session).
Prerequisites
snmpd(net-snmp) running on the host, listening on an address the poller reaches (UDP 161), with the firewall open to the poller only.- The view granted to the poller includes
hrSystem(.1.3.6.1.2.1.25.1), which most default configurations already allow. - Read-only access, SNMPv2c or SNMPv3, set on the host or one of its folders (
protocol:snmp:*variables).
# /etc/snmp/snmpd.conf
agentaddress udp:161
view banshee included .1.3.6.1.2.1.25.1
rocommunity <community> 192.0.2.10 -V banshee
# or: rouser <user> priv -V banshee Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
sessions | Open sessions | — | no |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
too-many | Too many open sessions | above a threshold, on sessions | no threshold | no |
Limits
- What is normal depends on the server, a jump host or a server nobody logs into: the watch has no default threshold.
- A session that does not write to
utmp(a command run over SSH without a terminal, an automation tool) is not counted.