LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Weird SNMP (snmpwalk vs. snmpget) issues with HP Officejet H611a printer (https://www.linuxquestions.org/questions/linux-networking-3/weird-snmp-snmpwalk-vs-snmpget-issues-with-hp-officejet-h611a-printer-4175487883/)

Phaylon 12-13-2013 04:49 PM

Weird SNMP (snmpwalk vs. snmpget) issues with HP Officejet H611a printer
 
Dear forum members!

While I'm trying to monitor the supply levels of a (brand new) HP Officejet 6100 printer I ran into some strange SNMP behaviour (which in fact prevents pulling magenta levels).
All other printers - inkjet as well as laser - from different manufacturers are all being monitored perfectly.
Monitoring-Server is a CentOS release 5.10 (Final) box, all updates as well as all necessary mibs are installed. (at least I think IANA-printer-mibs v1 and v2 along with the HP vendor specific mibs should do the trick for such a basic inkjet)

Anyways - snmpwalk looks perfectly as expected:
Code:

[root@server]# snmpwalk -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSupplies
Printer-MIB::prtMarkerSuppliesDescription.0.1 = STRING: "black ink"
Printer-MIB::prtMarkerSuppliesDescription.0.2 = STRING: "yellow ink"
Printer-MIB::prtMarkerSuppliesDescription.0.3 = STRING: "cyan ink"
Printer-MIB::prtMarkerSuppliesDescription.0.4 = STRING: "magenta ink"
Printer-MIB::prtMarkerSuppliesMaxCapacity.0.1 = INTEGER: 109
Printer-MIB::prtMarkerSuppliesMaxCapacity.0.2 = INTEGER: 39
Printer-MIB::prtMarkerSuppliesMaxCapacity.0.3 = INTEGER: 43
Printer-MIB::prtMarkerSuppliesMaxCapacity.0.4 = INTEGER: 45
Printer-MIB::prtMarkerSuppliesLevel.0.1 = INTEGER: 107
Printer-MIB::prtMarkerSuppliesLevel.0.2 = INTEGER: 39
Printer-MIB::prtMarkerSuppliesLevel.0.3 = INTEGER: 43
Printer-MIB::prtMarkerSuppliesLevel.0.4 = INTEGER: 45

but snmpget does the job right only for cartridge (1..3)
Code:

[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesDescription.1.1
Printer-MIB::prtMarkerSuppliesDescription.1.1 = STRING: "black ink"
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesDescription.1.2
Printer-MIB::prtMarkerSuppliesDescription.1.2 = STRING: "yellow ink"
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesDescription.1.3
Printer-MIB::prtMarkerSuppliesDescription.1.3 = STRING: "cyan ink"
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesDescription.1.4
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: Printer-MIB::prtMarkerSuppliesDescription.1.4

[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesMaxCapacity.1.1
Printer-MIB::prtMarkerSuppliesDescription.1.1 = INTEGER: 109
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesMaxCapacity.1.2
Printer-MIB::prtMarkerSuppliesDescription.1.2 = INTEGER: 39
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesMaxCapacity.1.3
Printer-MIB::prtMarkerSuppliesDescription.1.3 = INTEGER: 43
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesMaxCapacity.1.4
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: Printer-MIB::prtMarkerSuppliesMaxCapacity.1.4

[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesLevel.1.1
Printer-MIB::prtMarkerSuppliesDescription.1.1 = INTEGER: 107
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesLevel.1.2
Printer-MIB::prtMarkerSuppliesDescription.1.2 = INTEGER: 39
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesLevel.1.3
Printer-MIB::prtMarkerSuppliesDescription.1.3 = INTEGER: 43
[root@server]# snmpget -v1 -c prn_read 172.68.20.39 Printer-MIB::prtMarkerSuppliesLevel.1.4
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: Printer-MIB::prtMarkerSuppliesLevel.1.4

Google and the forum search didn't provide any useful hints: Does anybody have an idea why snmpwalk shows magenta and snmpget doesn't? (I even tried "snmpget -Dparse-mibs")

Thanks Lots!
Markus

Phaylon 12-14-2013 03:55 PM

Just for info if someone else runs into this - I'm using a workaround with snmpwalk now:

Code:

snmpwalk -v1 -c public 172.68.20.39 Printer-MIB::prtMarkerSuppliesLevel |cut -d " " -f4 | tail -n 1|head -n 1
But I still would like to know how to do it "the clean way" with snmpget ....

Cheers
Markus

Habitual 12-16-2013 10:09 AM

try the OID ?

Phaylon 12-16-2013 10:27 AM

Quote:

Originally Posted by Habitual
try the OID ?

Thanks for the input. Yeah - I already did try the OID. Same behavior like above. K/Y/C (cartridges 1..3) working like a charm, magenta not at all (error in packet) :-/

Just can't figure it out. Could that be a bug in the firmware/embedded snmp implementation? I don't get it ...

xplorn 12-17-2013 07:52 PM

Try v2c? Not sure if HP printers support it.

Habitual 12-18-2013 04:15 PM

Quote:

Originally Posted by xplorn (Post 5082850)
Try v2c?

ooh, good catch!

Phaylon 12-19-2013 03:11 AM

Code:

[root@server ~]# snmpwalk -v2c -c public 172.68.20.39
Timeout: No Response from 172.68.20.39

... looks like v2c isn't supported ...

Thanks anyways!

turboc1208 01-14-2017 03:16 PM

Any luck on this?
 
I ran across this old post today. I am having the exact same problem with magenta not working with SNMP. Did you ever find a solution to this?

Phaylon 01-15-2017 01:59 AM

Quote:

Originally Posted by turboc1208
[...] Did you ever find a solution to this?

Nope. And I quit investigating shortly after. I dumped the printer a little later, because the head clogged and can't be replaced.

turboc1208 01-15-2017 11:24 AM

Thanks,
This printer is at home, which means I have to spend my money to replace it. :) And my wife doesn't like that idea. LOL


All times are GMT -5. The time now is 01:16 AM.