CPU(3)

πŸ’» CPU(3) β€” Sys::CPU, but make it group chat ✨

okay so bestie, welcome to the Sys::CPU page from the User Contributed Perl Documentation crew. We're talking CPU(3), and yes, it's giving β€œsmall module, big CPU-counting energy.” πŸ’…

🌸 NAME 🌸

Sys::CPU β€” a Perl extension for getting CPU information. Currently only number of CPU's supported. That's literally what the NAME says, bestie, and I'm not gonna gaslight you about it. 🫢

✨ SYNOPSIS ✨

okay so the vibe-check code is literally this:

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";

that's the whole synopsis, no cap. πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

In responce to a post on perlmonks.org β€” yes, β€œresponce” is the spelling from the original, bestie β€” this is a module for counting the number of CPU's on a system. Iconic origin story, honestly. 🫢

Support has now also been added for type of CPU and clock speed. So it's not just a one-trick CPU-counter anymore β€” it's giving main character energy. πŸ’…

While much of the code is from UNIX::Processors, win32 support has been added (but not tested).

⚠️ win32 support has been added, but it is not tested β€” the original says so, fr fr. Don't @ me. πŸ’€

Version tea, in order:

  • 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. That's it. No exports, no extra goodies, no cap. πŸŽ€

πŸ‘‘ AUTHOR πŸ‘‘

Matt Sanford. That's the author, periodt. πŸ’–

πŸ’… MAINTENANCE πŸ’…

Marc Koderer. He's on maintenance duty, bestie. πŸ› οΈ

πŸ“œ LICENSE πŸ“œ

Okay so the original page has the LICENSE heading and then… literally nothing under it. No license text shown here. Not me staring at an empty section, but here we are. πŸ™ˆ

🌈 SEE ALSO 🌈

Go peek at perl(1) and sysconf(3) β€” those are the referenced besties. πŸ’œ


xoxo, your Sys::CPU hype girl πŸ’‹ β€” this page is from perl v5.42.0, dated 2024-03-04, and that's the footer tea. 🫢✨

πŸ“¦ where this page comes from