The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::OS::Detect::MachineCores - Detect how many cores your machine has (OS-independently)

VERSION

version 0.037

SYNOPSIS

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.

USAGE

This module will install one executable, mcores, in your bin.

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)

SUPPORTED SYSTEMS

  • darwin (OSX)

  • Linux

MOTIVATION

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.

Example:

     export TEST_JOBS=`mcores -i`

AUTHOR

Daniel B. <dbr@cpan.org>

COPYRIGHT AND LICENSE

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