The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Linux::Info::SysInfo::CPU::Arm - Collects Arm based CPU information from /proc/cpuinfo

VERSION

version 2.19

SYNOPSIS

See Linux::Info::SysInfo get_cpu method.

DESCRIPTION

This is a subclass of Linux::Info::SysInfo::CPU, with specific code to parse ARM format of "proc/cpuinfo".

ARM processor information parsing is a pain in the ass. Manufactures basically add whatever information they want, and there are several manufactures.

Finding information about a ARM processor can also be quite difficult. Not all vendors have model information available on the "proc/cpuinfo" file, and sometimes is required to even search specifications for a processor using the following attributes in this class:

  • vendor (or "CPU implementer" in the original source file)

  • variant

  • part

  • revision

Most probably those values will be only hexadecimals that you will need to search for.

This module does it best to correlate the vendor with a human readable text, but this is limited, and in cases it fails, vendor will filled with original hexadecimal for "CPU implementer" and a warn will be generated.

One good source to search for more information is the OpenBenchmarking website.

METHODS

processor_regex

Returns a regular expression that identifies the processor that is being read.

get_cores

Returns the number of cores of the processor.

get_hardware

Returns the content of Hardware field on /proc/cpuinfo if available.

Otherwise returns undef.

get_serial

Returns the content of Serial field on /proc/cpuinfo if available.

Otherwise returns undef.

get_model_name

Returns the content of model name field on /proc/cpuinfo if available.

Otherwise returns undef.

get_cpu_revision

Returns the content of cpu revision field on /proc/cpuinfo if available.

Otherwise returns undef.

get_part

Return an hexadecimal of the CPU part.

get_revision

Return an hexadecimal of the CPU revision.

get_variant

Return an hexadecimal of the CPU variant.

get_threads

Returns the number of threads of the processor.

SEE ALSO

AUTHOR

Alceu Rodrigues de Freitas Junior <glasswalk3r@yahoo.com.br>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Alceu Rodrigues de Freitas Junior.

This is free software, licensed under:

  The GNU General Public License, Version 3, June 2007