The new iostat applet tries to count CPUs via /proc/cpuinfo checking for "Processor\t:". Some architectures like ARM use "processor\t:". We should really be using something like get_cpu_nr() from the mpstat applet that parses /proc/stat instead since SPARC uses yet another convention that won't work with this either.
>From 539c342133493240bb4e3a23f16bcf29a5dbd9db Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias <[email protected]> Date: Thu, 12 Aug 2010 09:48:38 -0300 Subject: [PATCH] iostat: improve processor detection for other architectures Signed-off-by: Gustavo Zacarias <[email protected]> --- procps/iostat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/procps/iostat.c b/procps/iostat.c index 8641c23..e888d48 100644 --- a/procps/iostat.c +++ b/procps/iostat.c @@ -126,7 +126,7 @@ static int get_number_of_cpus(void) fp = xfopen_for_read("/proc/cpuinfo"); while (fgets(buf, sizeof(buf), fp)) - if (strncmp(buf, "processor\t:", 11) == 0) + if (strncasecmp(buf, "processor\t:", 11) == 0) n++; fclose(fp); -- 1.7.1
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
