System...::Linux(3pm)
β¨ System::Info::Linux π
okay bestie, so this whole page is about System::Info::Linux β it's the object that holds all the Linux-specific info, from the System::Info Perl fam. π§π Think of it as the Linux girlie in the group chat, she knows everything about her machine and she's not shy about it.
πΈ DESCRIPTION πΈ
π«Ά $si->prepare_sysinfo
Use os-specific tools to find out more about the system. that's it, that's the whole vibe β she goes digging with whatever the OS gives her. π
π $si->prepare_os
Use os-specific tools to find out more about the operating system. same energy, different target: this one's all about the OS itself. β¨
π $si->linux_generic
This one snoops through /proc/cpuinfo looking for these keys, no cap:
"processor"β count the occurrences, that's your__cpu_countπ’"model name"β this becomes part of__cpu"vendor_id"β also part of__cpu"cpu mhz"β yep, part of__cpu"cpu cores"β these values get added onto__cpu_count
π¦ $si->linux_arm
the ARM girlie. she also checks /proc/cpuinfo, but for these keys:
"processor"β count the occurrences for__cpu_countπ’"Processor"β part of__cpu"BogoMIPS"β part of__cpu
not me noticingprocessorandProcessorare two different keys here. case sensitivity said "I'm the main character". π
π $si->linux_ppc
PowerPC time!! also reads /proc/cpuinfo, and she wants:
"processor"β count the occurrences for__cpu_countπ’"cpu"β part of__cpu"machine"β part of__cpu"clock"β part of__cpu"detected"β this one altersmachineif it's present π
β $si->linux_sparc
sparc girlie reporting for duty, once again in /proc/cpuinfo:
"processor"β count the occurrences for__cpu_countπ’"cpu"β part of__cpu"Cpu0ClkTck"β part of__cpu
π $si->linux_s390x
big iron icon behavior π she checks /proc/cpuinfo for:
"processor"β count the occurrences for__cpu_countπ’"Processor"β part of__cpu"BogoMIPS"β part of__cpu
π $si->prepare_proc_cpuinfo
Reads the complete /proc/cpuinfo. all of it. the whole thing. front to back, no skimming. π
π§ $si->count_in_cpuinfo ($regex)
Returns the number of lines $regex matches for. π
π $si->count_unique_in_cpuinfo ($regex)
Returns the number of lines $regex matches for. (yes bestie, the description really does say the exact same thing as the one above β we report, we don't editorialize π)
πΈ $si->from_cpuinfo ($key)
Returns the first value of that key in /proc/cpuinfo. just the first one, she's not scrolling past that. β¨
π COPYRIGHT AND LICENSE π
(c) 2016-2026, Abe Timmerman & H.Merijn Brand, All rights reserved.
With contributions from Jarkko Hietaniemi, Campo Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn, David Cantrell. π«Ά the whole friend group showed up!!
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
fr fr, read that last bit. no warranty, so don't come for her if it breaks. π
okay that's the whole page, and just so you know exactly which one you're reading: this is perl v5.40.1, dated 2026-01-25, page System...::Linux(3pm). slay, go read your cpuinfo π
β¨
π¦ where this page comes from
- ubuntu resolute: libsystem-info-perl 0.067-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsystem-info-perl 0.067-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms