Comments (4)
Hi @nfast. Unfortunately this library doesn't really have a concept of MIBs. The main reason is that there is no PHP library capable of parsing the SMI-v2 format (which is the format a MIB is in). The SMI format is basically a subset of the X.681 spec, which is essentially a very complex syntax for describing data structures. It doesn't surprise me that such a parser doesn't exist in PHP because it's use is very limited outside of a few protocols / niche cases nowadays, and implementing the spec correctly is a huge undertaking. (Spec can be found here: https://www.itu.int/ITU-T/studygroups/com17/languages/X.681-0207.pdf).
That said, I did attempt to implement a pure PHP based MIB parser and made it quite far. But I just haven't had the time to finish it. I'd like to pick up my work again. I'm just not sure when I'll be able to.
from snmp.
I'm trying to get Xerox printer health values, like amount of toner-percentage of a certain color. And I'm also looking for those MIB files.
Snmp is new for me, but reading a MIB can be done with: snmp_read_mib and snmprealwalk right?
from snmp.
I'm trying to get Xerox printer health values, like amount of toner-percentage of a certain color. And I'm also looking for those MIB files.
Snmp is new for me, but reading a MIB can be done with: snmp_read_mib and snmprealwalk right?
Yes, you could use the SNMP extension instead if you have it available. This library just implements the raw SNMP protocol, without any dependencies / the need for an extension. As such, I don't want to introduce a requirement for it.
I mostly started this as a fun project in my free time. But there are advantages to this library. Such as, there's no way to receive traps and parse them using the PHP SNMP extension, like you can with this library.
Regarding the Xerox printer health status, it looks like you'd want to read / interpret this OID for it:
OID: 1.3.6.1.2.1.25.3.5.1.2
Reference: https://oidref.com/1.3.6.1.2.1.25.3.5.1.2
It looks like the value uses a series on / off bits to represent different statuses for various printer parts.
from snmp.
With your SNMP-library I found these OID's indeed, but those don't give percentages or such. That's why I think I need a MIB file.
1.3.6.1.2.1.43.11.1.1.6.1.5 = Waste Toner Container
1.3.6.1.2.1.43.11.1.1.6.1.6 = Black Drum Cartridge
1.3.6.1.2.1.43.11.1.1.6.1.7 = Yellow Drum Cartridge
1.3.6.1.2.1.43.11.1.1.6.1.8 = Magenta Drum Cartridge
1.3.6.1.2.1.43.11.1.1.6.1.9 = Cyan Drum Cartridge
1.3.6.1.2.1.43.11.1.1.6.1.12 = Fuser Assembly
Do you think it's possible without a MIB, to check for example if a printer door is open, with doorOpen?
Does it work something like this 1.3.6.1.2.1.25.3.5.1.2 adding the .4, to make 1.3.6.1.2.1.25.3.5.1.2.4?
from snmp.
Related Issues (14)
- Counter64 Values Can Exceed the PHP Max Int Value HOT 2
- Authentication was requested, but the received header has none specified. HOT 11
- Do I need to close SnmpClient? HOT 7
- No message received from host. HOT 7
- SnmpWalk method not working HOT 3
- Certain return types do not get interpeted correctly in walks HOT 7
- send string value HOT 1
- reactPHP HOT 4
- SNMP Server Component HOT 1
- Finding issues with Exception class.. HOT 3
- Equivalent for snmp_bulk_walk HOT 10
- What is the purpose of 1.3.6.1.2.1 HOT 3
- Reason for spread operator HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snmp.