我正在尝试从一系列设备中检索硬件信息,到目前为止,我使用了带有以下OID 1.3.6.1.2.1.25.3.2.1 的snmpget / snmpwalk。它返回的信息很少,例如,如果我是从Windows操作系统在计算机上运行的,则会得到以下CPU:
I am trying to retrieve hardware informations from a series of devices, so far I used snmpget/snmpwalk with the following OID 1.3.6.1.2.1.25.3.2.1 but it returns very few informations, for example if I run this on my computer from a Windows OS I get those CPUs:
未知处理器
Unknown Processor
未知处理器
未知处理器
未知处理器
相反,如果我从Debian运行命令,则会得到正确的值:
Instead if I run the command from Debian I get the correct value:
正品Intel:Intel(R)CoreTM i3 CPU M 330 @ 2.13GHz
Genuine Intel: Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz
猜测有一个浮点协处理器
Guessing that there's a floating point co-processor
我了解Windows和Linux以完全不同的方式填充MIB,但就其本身而言,它们的机器人似乎完全忘记了其他诸如视频卡或鼠标/键盘之类的设备。 Windows可以正确显示键盘,Linux则不能。他们两个都根本不显示视频卡和声卡。问题是否与我必须设置的某些选项有关?
I understand that Windows and Linux fill MIBs in a completely different way but, for istance, bot of them seem to completely forget about other devices such as video card or mouse/keyboard. Windows shows the keyboard correctly, Linux does not. Both of them don't show video card and sound card at all. Is the problem related to some options I have to set?
如果我想获取更多信息(例如CPU频率)怎么办?
And what if I want to obtain MORE informations such as CPU frequency?
推荐答案上面OID所在的HOST-RESOURCES-MIB实际上将描述有关系统硬件的大量信息。但是:
The HOST-RESOURCES-MIB, which is where the above OID lies, will in deed describe a fair amount about the hardware on the system. But:
对于Linux案例,您不应该列出这些类型的组件或未编写使它起作用的代码。
For the linux case, you could always go work on the code and submit patches back to the original package (which for linux is certainly the Net-SNMP package).
还有ENTITY-MIB,其目的是更好地模拟系统的硬件,但我不知道linux(或Windows)
There is also the ENTITY-MIB which is designed to model a system's hardware better, but I don't know of linux (or windows) support for it.
最后,如果未返回正确的结果,则始终可以在Windows计算机上运行其他SNMP代理。 IE,我听说过(但我自己不使用Windows),与本地SNMP代理相比,Net-SNMP代理在Windows上提供了优越的功能。
Finally, you could always run a different SNMP agent on the windows machine if it's not returning the right result. IE, I have heard (but don't use windows myself) that the Net-SNMP agent provides superior functionality on windows compared to the native SNMP agent.
更多推荐
通过SNMP检索硬件信息
发布评论