1CPU(3) User Contributed Perl Documentation CPU(3)
2
3
4
6 Sys::CPU - Perl extension for getting CPU information. Currently only
7 number of CPU's supported.
8
10 use Sys::CPU;
11
12 $number_of_cpus = Sys::CPU::cpu_count();
13 printf("I have %d CPU's\n",$number_of_cpus);
14 print " Speed : ",Sys::CPU::cpu_clock(),"\n";
15 print " Type : ",Sys::CPU::cpu_type(),"\n";
16
18 In responce to a post on perlmonks.org, a module for counting the
19 number of CPU's on a system. Support has now also been added for type
20 of CPU and clock speed. While much of the code is from
21 UNIX::Processors, win32 support has been added (but not tested).
22
23 v0.45 - Corrected solaris support (Thanks Cloyce)
24
25 EXPORT
26 None by default.
27
29 Matt Sanford
30
32 Marc Koderer
33
36 perl(1), sysconf(3)
37
38
39
40perl v5.16.3 2012-11-13 CPU(3)