Help language development. Donate to The Perl Foundation

Linux::Cpuinfo zef:jonathanstowe last updated on 2022-08-07



Obtain Linux CPU information.

Build Status


use Linux::Cpuinfo;

my $cpuinfo =;

my $cnt  = $cpuinfo.num-cpus();   # > 1 for an SMP system

for $cpuinfo.cpus -> $cpu {
   say $cpu.bogomips;


On Linux systems various information about the CPU ( or CPUs ) in the computer can be gleaned from /proc/cpuinfo. This module provides an object oriented interface to that information for relatively simple use in Raku programs.


Assuming you have a working Rakudo installation you should be able to install this with zef :

# From the source directory

zef install .

# Remote installation

zef install Linux::Cpuinfo


Suggestions/patches are welcomed via github at

I'd be particularly interested in the /proc/cpuinfo from a variety of architectures to test against, the ones that I already have can be seen in t/proc

I'm not able to test on a wide variety of platforms so any help there would be appreciated.


Please see the LICENCE file in the distribution.

© Jonathan Stowe 2015, 2016, 2017, 2019