c# - Dealing with an incrementing SNMP OID? -
i'm trying use snmp data printer. if turn printer off , on, oid need get
.1.3.6.1.2.1.43.18.1.1.8.1.1
. each time printer has "event", such getting paused, running out of paper or having paper jam, oidfor data want increments.
for example, turn printer on , query .1.3.6.1.2.1.43.18.1.1.8.1.1.
, "paused" value. unpause printer , remove of paper printer, , "add paper" message have query .1.3.6.1.2.1.43.18.1.1.8.1.2
.
i don't know if normal snmp behavior wonder people suggest in these cases able programatically printer state?
yes it's normal retreiving rows alert table :
just have mib :
the corresponding text part of mib (from rfc 1759):
prtalerttable object-type syntax sequence of prtalertentry max-access not-accessible status current description "" ::= { prtalert 1 } prtalertentry object-type syntax prtalertentry max-access not-accessible status current description "entries may exist in table each device index who's device type `printer'." index { hrdeviceindex, prtalertindex } ::= { prtalerttable 1 } prtalertentry ::= sequence { prtalertindex integer32, prtalertseveritylevel integer, prtalerttraininglevel integer, prtalertgroup integer, prtalertgroupindex integer32, prtalertlocation integer32, prtalertcode integer, prtalertdescription octet string, prtalerttime timeticks }
so way snmp works is suffix oid entry of mib index of row. can whole table get-bulk, think first thing understand how retreive snmp table.
in exact case : 1.3.6.1.2.1.43.18.1.1.8.1.1
have read :
1.3.6.1.2.1.43.18.1.1.8
: prtalertdescription followed by
1
: hrdeviceindex followed
1
: prtalertindex row.
an advice can find assembly called snmpsharpnet helpful play snmp on top of .net.
Comments
Post a Comment