OneCDOnly / sherpa

A mini-package-manager for QNAP NAS
GNU General Public License v3.0
114 stars 13 forks source link

bug: CPU core count incorrect on TS-431 #250

Closed OneCDOnly closed 1 year ago

OneCDOnly commented 1 year ago

Noticed here: https://forum.qnap.com/viewtopic.php?p=835900#p835900

dbug: (**)  HARDWARE:             model: TS-431
dbug: (**)  HARDWARE:               CPU: ARMv7 Processor rev 1 (v7l)
dbug: (**)  HARDWARE:         CPU cores: 3
dbug: (**)  HARDWARE:  CPU architecture: armv7l

This is a 2 core CPU. Need to see the raw /proc/cpuinfo for this model.

OneCDOnly commented 1 year ago

Ah, found a post here with the info I need: https://forum.qnap.com/viewtopic.php?f=24&t=135995

[/root] # cat /proc/cpuinfo
Processor name : ARMv7 Processor rev 1 (v7l)
processor : 0
BogoMIPS : 2387.14

processor : 1
BogoMIPS : 2393.70

Features : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 1

Hardware : Comcerto 2000 EVM
Revision : 0001
Serial : 0000000000000000

So, the issue is that "processor" is the first word on 3 lines.

Maybe I'll need to return to checking by character-case. If lowercase check for ^processor returns zero, then count ^Processor lines instead.