diff options
| author | Doug Ledford <dledford@compaq.xsintricity.com> | 2003-08-17 05:27:07 -0400 |
|---|---|---|
| committer | Doug Ledford <dledford@compaq.xsintricity.com> | 2003-08-17 05:27:07 -0400 |
| commit | 39d2edc443b18d72ad47e2d4aeae8ceebbfefcb1 (patch) | |
| tree | d38ee2a433a1a776834f9529db6687f71f013a82 /fs/proc/proc_misc.c | |
| parent | a1ad3d823549923ee72310496e463ed0081c0f6b (diff) | |
Add irq and softirq time accounting to the kernel
Diffstat (limited to 'fs/proc/proc_misc.c')
| -rw-r--r-- | fs/proc/proc_misc.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 4ceb4a90a6f2..23a295cf2269 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -362,7 +362,7 @@ static int kstat_read_proc(char *page, char **start, off_t off, int i, len; extern unsigned long total_forks; u64 jif; - unsigned int sum = 0, user = 0, nice = 0, system = 0, idle = 0, iowait = 0; + unsigned int sum = 0, user = 0, nice = 0, system = 0, idle = 0, iowait = 0, irq = 0, softirq = 0; struct timeval now; unsigned long seq; @@ -388,25 +388,31 @@ static int kstat_read_proc(char *page, char **start, off_t off, system += kstat_cpu(i).cpustat.system; idle += kstat_cpu(i).cpustat.idle; iowait += kstat_cpu(i).cpustat.iowait; + irq += kstat_cpu(i).cpustat.irq; + softirq += kstat_cpu(i).cpustat.softirq; for (j = 0 ; j < NR_IRQS ; j++) sum += kstat_cpu(i).irqs[j]; } - len = sprintf(page, "cpu %u %u %u %u %u\n", + len = sprintf(page, "cpu %u %u %u %u %u %u %u\n", jiffies_to_clock_t(user), jiffies_to_clock_t(nice), jiffies_to_clock_t(system), jiffies_to_clock_t(idle), - jiffies_to_clock_t(iowait)); + jiffies_to_clock_t(iowait), + jiffies_to_clock_t(irq), + jiffies_to_clock_t(softirq)); for (i = 0 ; i < NR_CPUS; i++){ if (!cpu_online(i)) continue; - len += sprintf(page + len, "cpu%d %u %u %u %u %u\n", + len += sprintf(page + len, "cpu%d %u %u %u %u %u %u %u\n", i, jiffies_to_clock_t(kstat_cpu(i).cpustat.user), jiffies_to_clock_t(kstat_cpu(i).cpustat.nice), jiffies_to_clock_t(kstat_cpu(i).cpustat.system), jiffies_to_clock_t(kstat_cpu(i).cpustat.idle), - jiffies_to_clock_t(kstat_cpu(i).cpustat.iowait)); + jiffies_to_clock_t(kstat_cpu(i).cpustat.iowait), + jiffies_to_clock_t(kstat_cpu(i).cpustat.irq), + jiffies_to_clock_t(kstat_cpu(i).cpustat.softirq)); } len += sprintf(page + len, "intr %u", sum); |
