We are currently implementing support for parallel blocklist processing in adblock-lean and we would like to have an 'auto' mode which would detect CPU core count automatically and set the number of parallel jobs based on that.
However I couldn't find a built-in utility included with OpenWrt by default which would just print this information. Perhaps this is available via ubus in some way?
Installing packages is not a solution because we do not want adblock-lean to have extra dependencies.
If there is not better way, we may end up using
grep -c '^processor\s*:' /proc/cpuinfo
However I'm not sure how reliable this method is.
Any ideas would be appreciated.