.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "CPU 3pm" .TH CPU 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Sys::CPU \- Perl extension for getting CPU information. Currently only number of CPU's supported. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Sys::CPU; \& \& $number_of_cpus = Sys::CPU::cpu_count(); \& printf("I have %d CPU\*(Aqs\en",$number_of_cpus); \& print " Speed : ",Sys::CPU::cpu_clock(),"\en"; \& print " Type : ",Sys::CPU::cpu_type(),"\en"; .Ve .SH DESCRIPTION .IX Header "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). .PP v0.45 \- Corrected solaris support (Thanks Cloyce) .PP v0.60 \- Added FreeBSD support (Thanks Johan & SREZIC) v0.61 \- Fix test numbering issue .SS EXPORT .IX Subsection "EXPORT" None by default. .SH AUTHOR .IX Header "AUTHOR" Matt Sanford .SH MAINTENANCE .IX Header "MAINTENANCE" Marc Koderer .SH LICENSE .IX Header "LICENSE" .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBperl\fR\|(1), \fBsysconf\fR\|(3)