--- array.c.0 Wed Aug 25 11:35:28 1999
+++ array.c Wed Aug 25 11:39:44 1999
@@ -244,9 +244,8 @@
int i, len;
unsigned sum = 0;
extern unsigned long total_forks;
- unsigned long ticks;
+ unsigned long jif = jiffies;
- ticks = jiffies * smp_num_cpus;
for (i = 0 ; i < NR_IRQS ; i++)
sum += kstat_irqs(i);
@@ -256,14 +255,14 @@
kstat.cpu_user,
kstat.cpu_nice,
kstat.cpu_system,
- jiffies*smp_num_cpus - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system));
+ jif*smp_num_cpus - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system));
for (i = 0 ; i < smp_num_cpus; i++)
len += sprintf(buffer + len, "cpu%d %u %u %u %lu\n",
i,
kstat.per_cpu_user[cpu_logical_map(i)],
kstat.per_cpu_nice[cpu_logical_map(i)],
kstat.per_cpu_system[cpu_logical_map(i)],
- jiffies - ( kstat.per_cpu_user[cpu_logical_map(i)] \
+ jif - ( kstat.per_cpu_user[cpu_logical_map(i)] \
+ kstat.per_cpu_nice[cpu_logical_map(i)] \
+ kstat.per_cpu_system[cpu_logical_map(i)]));
len += sprintf(buffer + len,
@@ -289,7 +288,7 @@
kstat.cpu_user,
kstat.cpu_nice,
kstat.cpu_system,
- ticks - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system),
+ jif*smp_num_cpus - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system),
#endif
kstat.dk_drive[0], kstat.dk_drive[1],
kstat.dk_drive[2], kstat.dk_drive[3],
@@ -313,7 +312,7 @@
"btime %lu\n"
"processes %lu\n",
kstat.context_swtch,
- xtime.tv_sec - jiffies / HZ,
+ xtime.tv_sec - jif / HZ,
total_forks);
return len;
}