summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmccontrol
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2008-11-16 04:26:38 +0000
committerjkoshy <jkoshy@FreeBSD.org>2008-11-16 04:26:38 +0000
commit89701909aa1a94e04b555eb5d9ace17db0c3e068 (patch)
tree1cb779b233ea5d45c2ec209d329ebe584fa9fac7 /usr.sbin/pmccontrol
parenteba4f21c3ff943c361145c8ad4df2f1208c90245 (diff)
downloadFreeBSD-src-89701909aa1a94e04b555eb5d9ace17db0c3e068.zip
FreeBSD-src-89701909aa1a94e04b555eb5d9ace17db0c3e068.tar.gz
Ignore absent CPUs when listing the current state of PMC hardware.
Diffstat (limited to 'usr.sbin/pmccontrol')
-rw-r--r--usr.sbin/pmccontrol/pmccontrol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c
index 2a147dd..84c4f17 100644
--- a/usr.sbin/pmccontrol/pmccontrol.c
+++ b/usr.sbin/pmccontrol/pmccontrol.c
@@ -256,9 +256,12 @@ pmcc_do_list_state(void)
(logical_cpus_mask & (1 << cpu)))
continue; /* skip P4-style 'logical' cpus */
#endif
- if (pmc_pmcinfo(cpu, &pi) < 0)
+ if (pmc_pmcinfo(cpu, &pi) < 0) {
+ if (errno == ENXIO)
+ continue;
err(EX_OSERR, "Unable to get PMC status for CPU %d",
cpu);
+ }
printf("#CPU %d:\n", c++);
npmc = pmc_npmc(cpu);
OpenPOWER on IntegriCloud