diff options
Diffstat (limited to 'usr.bin/systat')
| -rw-r--r-- | usr.bin/systat/mbufs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/systat/mbufs.c b/usr.bin/systat/mbufs.c index f79305351fd60..df53e0cd9a84e 100644 --- a/usr.bin/systat/mbufs.c +++ b/usr.bin/systat/mbufs.c @@ -190,7 +190,8 @@ initmbufs() nmbtypes = mbtypeslen / sizeof(*m_mbtypes); #endif len = sizeof(int); - if (sysctlbyname("kern.smp.cpus", &ncpu, &len, NULL, 0) < 0) { + if (sysctlbyname("kern.smp.cpus", &ncpu, &len, NULL, 0) < 0 && + sysctlbyname("hw.ncpu", &ncpu, &len, NULL, 0) < 0) { error("sysctl getting number of cpus"); return 0; } |
