[SIGAR-106] Add cpu irq, soft_irq and steal
This commit is contained in:
1 parent
e3510e0805
commit
9a1f45cd7b
12 files changed
+118
-9
No files matched your search
@@ -717,6 +717,9 @@ int sigar_cpu_get(sigar_t *sigar, sigar_cpu_t *cpu)
|
||||
cpu->sys = SIGAR_TICK2MSEC(cpu_data.sys);
|
||||
cpu->idle = SIGAR_TICK2MSEC(cpu_data.idle);
|
||||
cpu->wait = SIGAR_TICK2MSEC(cpu_data.wait);
|
||||
cpu->irq = 0; /*N/A*/
|
||||
cpu->soft_irq = 0; /*N/A*/
|
||||
cpu->steal = 0; /*N/A*/
|
||||
cpu->total = cpu->user + cpu->sys + cpu->idle + cpu->wait;
|
||||
return SIGAR_OK;
|
||||
}
|
||||
@@ -736,6 +739,9 @@ int sigar_cpu_get(sigar_t *sigar, sigar_cpu_t *cpu)
|
||||
cpu->sys = SIGAR_TICK2MSEC(data.cpu[CPU_KERNEL]);
|
||||
cpu->idle = SIGAR_TICK2MSEC(data.cpu[CPU_IDLE]);
|
||||
cpu->wait = SIGAR_TICK2MSEC(data.cpu[CPU_WAIT]);
|
||||
cpu->irq = 0; /*N/A*/
|
||||
cpu->soft_irq = 0; /*N/A*/
|
||||
cpu->steal = 0; /*N/A*/
|
||||
cpu->total = cpu->user + cpu->sys + cpu->idle + cpu->wait;
|
||||
|
||||
return SIGAR_OK;
|
||||
|
||||
Reference in new issue
Block a user