以下是RFC2790中队hrSWRunPerfCPU的描述。 注意centi-seconds为百分之一秒。它表示从运行开始,smss.exe进程总共用了2688.61秒CPU。 hrSWRunPerfCPU OBJECT-TYPE SYNTAX Integer32 (0..2147483647) MAX-ACCESS read-only STATUS current DESCRIPTION "The number of centi-seconds of the total system's CPU resources consumed by this process. Note that on a multi-processor system, this value may increment by more than one centi-second in one centi-second of real (wall clock) time." ::= { hrSWRunPerfEntry 1 } hrSWRunPerfMem OBJECT-TYPE SYNTAX KBytes UNITS "KBytes" MAX-ACCESS read-only STATUS current DESCRIPTION "The total amount of real system memory allocated to this process." ::= { hrSWRunPerfEntry 2 }
因此要转换整数,你要用正确的单位(比如百万分之),
或用正确的格式化(Textual Convention),比如d-3表示3个小数位,则格式化为27.612。
memory(hrSWRunPerfMem)的OID=.1.3.6.1.2.1.25.5.1.1.2可通过snmp4j获得的结果是cpu=268861,memory=16 这两个数值的单位是什么呢?表示什么意思?怎么解释?
注意centi-seconds为百分之一秒。它表示从运行开始,smss.exe进程总共用了2688.61秒CPU。
hrSWRunPerfCPU OBJECT-TYPE
SYNTAX Integer32 (0..2147483647)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of centi-seconds of the total system's CPU
resources consumed by this process. Note that on a
multi-processor system, this value may increment by
more than one centi-second in one centi-second of real
(wall clock) time."
::= { hrSWRunPerfEntry 1 } hrSWRunPerfMem OBJECT-TYPE
SYNTAX KBytes
UNITS "KBytes"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total amount of real system memory allocated to
this process."
::= { hrSWRunPerfEntry 2 }