Snmpget command to get printer location

I need HP printer information from the SNMP HP printer jetleg agent. I can get the printer counter using this snmpget command:

snmpwalk -v1 -c public 10.0.0.110 mib-2.43.10.2.1.4.1.1 
SNMPv2-SMI::mib-2.43.10.2.1.4.1.1 = Counter32: 16101

But now I need to get the printer location from the SNMP agent, does anyone have an idea how to do this? Please inform.

+4
source share
2 answers

1) You can perfectly start here → Printer SNMP-RFC1759 . This is all the important information that SNMP can provide you about your printer.

2) MIB , . mib mib. , , upTime, , , , .

3) jetdirect SNMP. , , MIB.

+1

OID , MIB "Printer-MIB", IETF RFC 3805. : http://tools.ietf.org/html/rfc3805

, "" , . -, , "", .1.3.6.1.2.1.43.10.2.1.3.1.1, , !

3=tenThousandthsOfInches(3)
4=micrometers(4)
5=characters(5)
6=lines(6)
7=impressions(7)
8=sheets(8)
9=dotRow(9)
11=hours(11)
16=feet(16)
17=meters(17)

/, prtMarkerSuppliesTable, prtMarkerSuppliesLevel,.1.3.6.1.2.1.43.11.1.1.9.

- , Printer-MIB. , SNMPv2-MIB, .1.3.6.1.2.1.1.6 (sysLocation).

"The physical location of this node (e.g., 'telephone closet, 3rd floor'). If the location is unknown, the value is the zero-length string."

, ​​ ,

  • HP SNMPv2-MIB (, , )
  • , , , sysLocation - . , SNMP.

: SNMP-. , MIB.

snmpwalk -v1 -Ont -c public 10.0.0.110 

( -Ont MIB OID .)

.1.3.6.1.2.1.1.6. OID .0, , ".1.3.6.1.2.1.1.6.0 = 4- "

, grep, .

, - , ( ). HP , , .

+3

Source: https://habr.com/ru/post/1539085/


All Articles