On arm64 we don't have the CPU information in /proc/cpuinfo as expected
by our config_cpu, so its output is broken:
| # awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo
| Processor 0 is
| Processor 1 is
| [...]
| Processor 13 is
| Processor 14 is
| Processor 15 is
FTR:
| # head /proc/cpuinfo
| processor : 0
| BogoMIPS : 50.00
| Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
| CPU implementer : 0x41
| CPU architecture: 8
| CPU variant : 0x3
| CPU part : 0xd0c
| CPU revision : 1
|
| processor : 1
While with lspcu we get the information we're interested in:
| # lscpu | grep 'Model name:'
| Model name: Neoverse-N1
| BIOS Model name: virt-5.2 CPU @ 2.0GHz
So instead of having some hackish /proc/cpuinfo parsing, let's rely on
util-linux's lscpu(1).
While at it, let's output only the number of present CPUs instead of
listing every single one of them, given that there exist systems with
>100 CPUs nowadays. :)
Thanks: Christopher Bock and AndrĂ¡s Korn for feedback