LoginSignup
2
2

More than 5 years have passed since last update.

magicolor 1690MF のトナー残量をSNMP経由で得る

Last updated at Posted at 2013-06-07

今回はプリンタのトナー残量をSNMPから取得することを試みます。

一言で言えば以下のページで全て分かれ、となります。

しかし残念ながら、対応するMIBファイルが公開されていないようです。

コニカミノルタの他のプリンタでは公開されているケースもあるようですが、整合性がありませんでした (そもそもそのMIBファイル、exeで自己展開するという悲しい形式で、しかも出てきたMIB形式としては壊れたものでした。うぐぅ)

気を取り直して上のページで一応snmpwalkの結果らしきものが出てます。これと管理者ページのトナー残量の結果を見比べて探すという非プログラマティカルなことをした結果

~> snmpget printer.example.com -v 2c -c public SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.1
SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.1 = Counter32: 60
~> snmpget printer.example.com -v 2c -c public SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.2
SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.2 = Counter32: 40
~> snmpget printer.example.com -v 2c -c public SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.3
SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.3 = Counter32: 40
~> snmpget printer.example.com -v 2c -c public SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.4
SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.4 = Counter32: 30
~> snmpget printer.example.com -v 2c -c public SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.5
SNMPv2-SMI::enterprises.18334.1.1.1.5.7.4.4.1.3.5 = Counter32: 30

このあたりがそれ臭いということが分かりました。

後は使いたいように使えば良いですね。

一般論として言えば、多分トナー残量を示す上での共通の値はありません。enterprises 下に独自ツリーを各社が作っている状況ですんで、別のプリンターでは上の値は使えません。あはは。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2