add proc_state.threads
This commit is contained in:
parent
fb61a2ebb0
commit
bb5aa9c263
|
@ -273,6 +273,7 @@ typedef struct {
|
||||||
char name[SIGAR_PROC_NAME_LEN];
|
char name[SIGAR_PROC_NAME_LEN];
|
||||||
char state;
|
char state;
|
||||||
sigar_uint64_t handles;
|
sigar_uint64_t handles;
|
||||||
|
sigar_uint64_t threads;
|
||||||
} sigar_win32_pinfo_t;
|
} sigar_win32_pinfo_t;
|
||||||
|
|
||||||
struct sigar_t {
|
struct sigar_t {
|
||||||
|
|
|
@ -948,6 +948,7 @@ SIGAR_DECLARE(int) sigar_proc_state_get(sigar_t *sigar, sigar_pid_t pid,
|
||||||
procstate->priority = pinfo->priority;
|
procstate->priority = pinfo->priority;
|
||||||
procstate->nice = SIGAR_FIELD_NOTIMPL;
|
procstate->nice = SIGAR_FIELD_NOTIMPL;
|
||||||
procstate->tty = SIGAR_FIELD_NOTIMPL;
|
procstate->tty = SIGAR_FIELD_NOTIMPL;
|
||||||
|
procstate->threads = pinfo->threads;
|
||||||
|
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
@ -1048,6 +1049,7 @@ static int get_proc_info(sigar_t *sigar, sigar_pid_t pid)
|
||||||
pinfo->ppid = PERF_VAL(PERF_IX_PPID);
|
pinfo->ppid = PERF_VAL(PERF_IX_PPID);
|
||||||
pinfo->priority = PERF_VAL(PERF_IX_PRIORITY);
|
pinfo->priority = PERF_VAL(PERF_IX_PRIORITY);
|
||||||
pinfo->handles = PERF_VAL(PERF_IX_HANDLE_CNT);
|
pinfo->handles = PERF_VAL(PERF_IX_HANDLE_CNT);
|
||||||
|
pinfo->threads = PERF_VAL(PERF_IX_THREAD_CNT);
|
||||||
|
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue