App::OS::Detect::MachineCores - Detect how many cores your machine has (OS-independently)
version 0.035
On different system, different approaches are needed to detect the number of cores for that machine.
This Module is a wrapper around these different approaches.
This module will install one executable, mcores, in your bin.
mcores
It is really simple and straightforward:
usage: mcores [-?i] [long options...] -h --help Prints this usage information. -i --add_one add one to the number of cores (useful in scripts)
darwin (OSX)
Linux
During development of dotfiles for different platforms I was searching for some way to be able to transparantly detect the number of available cores and couldn't find one. Also it is quite handy to be able to increment the number by simply using a little switch -i.
-i
Example:
export TEST_JOBS=`mcores -i`
Daniel B. <dbr@cpan.org>
This software is Copyright (c) 2012 by Daniel B..
This is free software, licensed under:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004
To install App::OS::Detect::MachineCores, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::OS::Detect::MachineCores
CPAN shell
perl -MCPAN -e shell install App::OS::Detect::MachineCores
For more information on module installation, please visit the detailed CPAN module installation guide.