Some more work here.
This commit is contained in:
@@ -298,6 +298,7 @@ libgtop_sysctl_proc (ctl_table *table, int nlen, int *name,
|
||||
struct task_struct *tsk)
|
||||
{
|
||||
libgtop_proc_state_t *proc_state;
|
||||
int i;
|
||||
|
||||
switch (table->ctl_name) {
|
||||
case LIBGTOP_PROC_STATE:
|
||||
@@ -337,6 +338,15 @@ libgtop_sysctl_proc (ctl_table *table, int nlen, int *name,
|
||||
proc_state->cstime = tsk->times.tms_cstime;
|
||||
|
||||
proc_state->start_time = tsk->start_time;
|
||||
|
||||
#ifdef __SMP__
|
||||
for (i = 0; i < NR_CPUS; i++) {
|
||||
proc_state->per_cpu_utime [i] = tsk->per_cpu_utime [i];
|
||||
proc_state->per_cpu_stime [i] = tsk->per_cpu_stime [i];
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
proc_state->policy = tsk->policy;
|
||||
proc_state->rt_priority = tsk->rt_priority;
|
||||
|
||||
@@ -346,6 +356,7 @@ libgtop_sysctl_proc (ctl_table *table, int nlen, int *name,
|
||||
proc_state->it_real_incr = tsk->it_real_incr;
|
||||
proc_state->it_prof_incr = tsk->it_prof_incr;
|
||||
proc_state->it_virt_incr = tsk->it_virt_incr;
|
||||
#endif
|
||||
|
||||
proc_state->min_flt = tsk->min_flt;
|
||||
proc_state->cmin_flt = tsk->cmin_flt;
|
||||
|
@@ -95,13 +95,14 @@ struct libgtop_proc_state
|
||||
int session;
|
||||
unsigned int tty;
|
||||
int tpgid;
|
||||
long priority;
|
||||
long counter;
|
||||
long def_priority;
|
||||
long priority, counter, def_priority;
|
||||
long utime, stime, cutime, cstime, start_time;
|
||||
long per_cpu_utime [NR_CPUS], per_cpu_stime [NR_CPUS];
|
||||
#if 0
|
||||
unsigned long policy, rt_priority;
|
||||
unsigned long it_real_value, it_prof_value, it_virt_value;
|
||||
unsigned long it_real_incr, it_prof_incr, it_virt_incr;
|
||||
#endif
|
||||
unsigned long keip, kesp;
|
||||
unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
|
||||
unsigned long nswap, cnswap;
|
||||
|
Reference in New Issue
Block a user