使用 SNMP 采集物理机的CPU使用率


实际项目中,在使用SNMP采集 物理机的CPU使用率的时候,选对的OID很重要。

不然和用 top 命令获得的差别会很大。

 

比较正确的OID :1.3.6.1.4.1.2021.11.11 

Description:
ssCpuIdle OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS deprecated
DESCRIPTION
"The percentage of processor time spent idle,
calculated over the last minute.

This object has been deprecated in favour of
'ssCpuRawIdle(53)', which can be used to calculate
the same metric, but over any desired time period."

获取到OID 1.3.6.1.4.1.2021.11.11 对应的结果存到 ssCpuIdle

CPU空闲率 idleUsage =  ssCpuIdle 

CPU使用率 cpuUsage = 100 idleUsage 

 

PS:

想查看该OID的更多相关知识,可访问此链接:http://oid-info.com/get/1.3.6.1.4.1.2021.11.11

使用 SNMP 采集物理机的CPU使用率

 

相关文章:

  • 2022-12-23
  • 2021-11-29
  • 2021-07-03
  • 2022-12-23
  • 2021-11-23
  • 2021-05-24
  • 2021-10-22
猜你喜欢
  • 2022-01-14
  • 2022-12-23
  • 2021-10-08
  • 2021-12-21
  • 2021-08-18
相关资源
相似解决方案