Tayyip Eser
TRin
← Back to archive

Documentation · Aug 10, 2026

Reading printer toner levels with SNMP

Reading maximum capacity and current supply values through Printer-MIB and converting them to percentages.

SNMPPrinter-MIBNode.js

Short answer Read the supply description, maximum capacity and current level tables from Printer-MIB using the same index. For valid values, toner percentage is current level / maximum capacity × 100.

01

Prepare the printer

  • Enable SNMP only on the management network; never expose it to the internet.
  • Prefer SNMPv3. If SNMPv2c is required, use a unique read-only community instead of public.
  • Verify UDP/161 reachability from the management device to the printer.
02

Read the Printer-MIB tables

# Linux / net-snmp kurulu bir yönetim cihazı
snmpwalk -v2c -c <COMMUNITY> <YAZICI_IP> 1.3.6.1.2.1.43.11.1.1.6.1
snmpwalk -v2c -c <COMMUNITY> <YAZICI_IP> 1.3.6.1.2.1.43.11.1.1.8.1
snmpwalk -v2c -c <COMMUNITY> <YAZICI_IP> 1.3.6.1.2.1.43.11.1.1.9.1
...43.11.1.1.6.1Supply description

Returns names such as black toner, cyan toner or drum.

...43.11.1.1.8.1Maximum capacity

The full capacity reported by the device.

...43.11.1.1.9.1Current level

The remaining amount currently reported.

03

Match identical indexes

The index at the end of each OID identifies the same supply. For example, description .1.1, maximum capacity .1.1 and current level .1.1 belong together. Never calculate across different indexes.

FORMULAToner percentage = (Current level ÷ Maximum capacity) × 100Example: 2,500 ÷ 10,000 × 100 = 25%
04

If values are negative or invalid

Printer-MIB values such as -1, -2 and -3 can mean other, unknown or unavailable. Do not calculate a percentage for them; show “Unavailable”. Some vendors require proprietary OIDs, so validate each model.

+

Convert the returned value safely

Calculate only when maximum capacity is above zero and current level is not negative. Never convert special negative SNMP values into percentages.

# Convert sample SNMP values to a percentage
$Maximum = 10000
$Current   = 2500
if ($Maximum -gt 0 -and $Current -ge 0) {
  "Toner level: %{0}" -f [math]::Round(($Current/$Maximum)*100,1)
} else {
  "Toner level unavailable"
}