最近有个项目需要用snmp远程监控进程信息。于是我查了一下资料。
一、资料
.1.3.6.1.2.1.25.4.2.1.1
.iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunIndex
A unique value for each piece of software running on the host. Wherever possible, this should be the system's native, unique identification number.
进程ID。Windows里进程id为0的,snmp里为1。
.1.3.6.1.2.1.25.4.2.1.2
.iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunName
A textual description of this running piece of software, including the manufacturer, revision, and the name by which it is commonly known. If this software was installed locally, this should be the same string as used in the corresponding hrSWInstalledName.
进程名。
.1.3.6.1.2.1.25.4.2.1.3
.iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunID
The product ID of this running piece of software.
产品ID?
.1.3.6.1.2.1.25.4.2.1.4
.iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunPath
A description of the location on long-term storage (e.g. a disk drive) from which this software was loaded.
进程所在路径。个别进程为空,一般以路径分隔字符结尾。
.1.3.6.1.2.1.25.4.2.1.5
.iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunParameters
A description of the parameters supplied to this software when it was initially loaded.
命令行参数。奇怪的是,chrome的参数貌似没取到。
.1.3.6.1.2.1.25.4.2.1.6
.iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunType
The type of this software.
进程类型。
INTEGER
Value Label/Meaning
1 unknown
2 operatingSystem
3 deviceDriver
4 application
.1.3.6.1.2.1.25.4.2.1.7
.iso.org.dod.internet.mgmt.mib-2.host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunStatus
The status of this running piece of software. Setting this value to invalid(4) shall cause this software to stop running and to be unloaded.
进程状态。
INTEGER
Value Label/Meaning
1 running
2 runnable
3 notRunnable
4 invalid
参考资料——
http://www.net-snmp.org/docs/mibs/host.html
HOST-RESOURCES-MIB
二、推荐工具
mib浏览器——
http://www.crsky.com/soft/13130.html
KS-Soft MIB Browser v1.11
简单好用的SNMP测试工具——
http://www.onlinedown.net/soft/410166.htm
FreeSnmp 2.0.3
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库