---
name: "Sys::CPU"
section: "3pm"
platform: "linux"
package: "libsys-cpu-perl"
version: "0.61-3+b4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Sys::CPU"
---

# Sys::CPU(3pm)

Perl extension for getting CPU information. Currently only number of CPU's supported.

## NAME

Sys::CPU - Perl extension for getting CPU information. Currently only number of CPU's supported.

## SYNOPSIS

```
  use Sys::CPU;
  $number_of_cpus = Sys::CPU::cpu_count();
  printf("I have %d CPU's\n",$number_of_cpus);
  print "  Speed : ",Sys::CPU::cpu_clock(),"\n";
  print "  Type  : ",Sys::CPU::cpu_type(),"\n";
```

## DESCRIPTION

In responce to a post on perlmonks.org, a module for counting the number of CPU's on a system. Support has now also been added for type of CPU and clock speed. While much of the code is from UNIX::Processors, win32 support has been added (but not tested).

v0.45 - Corrected solaris support (Thanks Cloyce)

v0.60 - Added FreeBSD support (Thanks Johan & SREZIC) v0.61 - Fix test numbering issue

### EXPORT

None by default.

## AUTHOR

Matt Sanford

## MAINTENANCE

Marc Koderer

## LICENSE

## SEE ALSO

[**perl**(1)](/perl/1.md), [**sysconf**(3)](/sysconf/3.md)
