diff options
Diffstat (limited to 'procps/mpstat.c')
-rw-r--r-- | procps/mpstat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/procps/mpstat.c b/procps/mpstat.c index bf0f593f7..f1a0b00b8 100644 --- a/procps/mpstat.c +++ b/procps/mpstat.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (C) 2010 Marek Polacek <mmpolacek@gmail.com> | 5 | * Copyright (C) 2010 Marek Polacek <mmpolacek@gmail.com> |
6 | * | 6 | * |
7 | * Licensed under GPLv2, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //applet:IF_MPSTAT(APPLET(mpstat, _BB_DIR_BIN, _BB_SUID_DROP)) | 10 | //applet:IF_MPSTAT(APPLET(mpstat, _BB_DIR_BIN, _BB_SUID_DROP)) |
@@ -61,7 +61,7 @@ typedef long idata_t; | |||
61 | 61 | ||
62 | 62 | ||
63 | struct stats_irqcpu { | 63 | struct stats_irqcpu { |
64 | unsigned interrupt; | 64 | unsigned interrupts; |
65 | char irq_name[MAX_IRQNAME_LEN]; | 65 | char irq_name[MAX_IRQNAME_LEN]; |
66 | }; | 66 | }; |
67 | 67 | ||
@@ -265,7 +265,7 @@ static void write_irqcpu_stats(struct stats_irqcpu *per_cpu_stats[], | |||
265 | p = &per_cpu_stats[current][(cpu - 1) * total_irqs + j]; | 265 | p = &per_cpu_stats[current][(cpu - 1) * total_irqs + j]; |
266 | q = &per_cpu_stats[prev][(cpu - 1) * total_irqs + offset]; | 266 | q = &per_cpu_stats[prev][(cpu - 1) * total_irqs + offset]; |
267 | printf("%"INTRATE_SCRWIDTH_STR".2f", | 267 | printf("%"INTRATE_SCRWIDTH_STR".2f", |
268 | (double)(p->interrupt - q->interrupt) / itv * G.hz); | 268 | (double)(p->interrupts - q->interrupts) / itv * G.hz); |
269 | } else { | 269 | } else { |
270 | printf(" N/A"); | 270 | printf(" N/A"); |
271 | } | 271 | } |
@@ -617,12 +617,12 @@ static void get_irqs_from_interrupts(const char *fname, | |||
617 | char *next; | 617 | char *next; |
618 | ic = &per_cpu_stats[current][cpu_index[cpu] * irqs_per_cpu + irq]; | 618 | ic = &per_cpu_stats[current][cpu_index[cpu] * irqs_per_cpu + irq]; |
619 | irq_i = &G.st_irq[current][cpu_index[cpu] + 1]; | 619 | irq_i = &G.st_irq[current][cpu_index[cpu] + 1]; |
620 | ic->interrupt = strtoul(cp, &next, 10); | 620 | ic->interrupts = strtoul(cp, &next, 10); |
621 | /* Count only numerical IRQs */ | 621 | /* Count only numerical IRQs */ |
622 | if (isdigit(last_char)) { | 622 | if (isdigit(last_char)) { |
623 | irq_i->irq_nr += ic->interrupt; | 623 | irq_i->irq_nr += ic->interrupts; |
624 | //bb_error_msg("G.st_irq[%u][%u].irq_nr + %u = %lld", | 624 | //bb_error_msg("G.st_irq[%u][%u].irq_nr + %u = %lld", |
625 | // current, cpu_index[cpu] + 1, ic->interrupt, irq_i->irq_nr); | 625 | // current, cpu_index[cpu] + 1, ic->interrupts, irq_i->irq_nr); |
626 | } | 626 | } |
627 | cp = next; | 627 | cp = next; |
628 | } | 628 | } |