Obtain Linux CPU information (p6 version of Linux::Cpuinfo)
Perl6
Permalink
Failed to load latest commit information.
lib/Linux Up version Apr 27, 2016
t Add the RPi 3 cpu info Apr 27, 2016
.gitignore Add precomp stuff to .gitignore Dec 24, 2015
.travis.yml Simplified travis config Apr 27, 2016
LICENCE rename LICENCE as en_GB May 30, 2016
META6.json Rename the META file Apr 27, 2016
README.md Tosh up the README Apr 27, 2016

README.md

Linux::Cpuinfo

Obtain Linux CPU information.

Build Status

Synopsis

  use Linux::Cpuinfo;

  my $cpuinfo = Linux::Cpuinfo.new();

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

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

Description

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 Perl programs.

Installation

Assuming you have a working perl6 installation you should be able to install this with panda :

# From the source directory

panda install .

# Remote installation

panda install Linux::Cpuinfo

Although I haven't tested it I see no reason that this won't work with "zef" or some equally capable package manager.

Support

Suggestions/patches are welcomed via github at:

https://github.com/jonathanstowe/p6-Linux-Cpuinfo/issues

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.

Licence

Please see the LICENCE file in the distribution

© Jonathan Stowe 2015, 2016