[arch-general] Can you test machine to set --jobs[=N] from w/i PKGBUILD?

Vitor Garcia vitorlopesgarcia at gmail.com
Sun Apr 1 07:05:23 EDT 2012

On Sun, 1 Apr 2012 04:45:08 -0400
Auguste Pop <auguste at gmail.com> wrote:

> anyway, i think the following command can easily get the information
> you need: grep -c processor /proc/cpuinfo

This command will make a few 2 Cores processor with some kind of
virtual processing technology (like hyper-threading) to be counted as a
4 cores processor.

You may use:
#cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

To get the number of CPU "slots" you have on the machine.

And then:
#cat /proc/cpuinfo | grep "cpu cores" | uniq

To get the number of cores per "slot".

Then you just have to multiply both numbers and you know how many "real
cpus" you have on the system. Otherwise you may be counting virtual
processors, which shouldn't be used for heavy stuff such as compiling.


More information about the arch-general mailing list