Sys::S...LoadAVG(3pm)
π Sys::S...LoadAVG β the perl manpage but make it cute π
okay so bestie, you're reading the User Contributed Perl Documentation for Sys::Statistics::Linux::LoadAVG (yes the manual name is literally Sys::S...LoadAVG(3pm), it's giving β¨abbreviatedβ¨ but we move). Buckle up, this one's short and sweet and honestly kinda iconic.
β¨ NAME β¨
Sys::Statistics::Linux::LoadAVG β Collect linux load average statistics. π§π
π SYNOPSIS π
use Sys::Statistics::Linux::LoadAVG;
my $lxs = Sys::Statistics::Linux::LoadAVG->new;
my $stat = $lxs->get;
that's it. that's the whole vibe. two lines and you're done, no cap. π«Ά
πΈ DESCRIPTION πΈ
Sys::Statistics::Linux::LoadAVG gathers the load average from the virtual /proc filesystem (aka procfs). it just... reads it. respectfully. π
if you want the full tea, go read the docs of the front-end module Sys::Statistics::Linux. it's the main character, this module is the bestie holding its iced coffee. π
π₯ LOAD AVERAGE STATISTICS π₯
Generated by /proc/loadavg. three little numbers, one big mood:
avg_1β The average processor workload of the last minute. β±οΈavg_5β The average processor workload of the last five minutes. β³avg_15β The average processor workload of the last fifteen minutes. π°οΈ
ngl it's giving "how stressed is my CPU" energy and i am obsessed. π
π¦ METHODS π¦
new()
Call new() to create a new object. fresh, brand new, never-been-used. β¨
my $lxs = Sys::Statistics::Linux::LoadAVG->new;
It's possible to set the path to the proc filesystem. like, if your procfs is somewhere else (mysterious of you, but ok π΅οΈ):
Sys::Statistics::Linux::LoadAVG->new(
files => {
# This is the default
path => '/proc',
loadavg => 'loadavg',
}
);
π that# This is the defaultcomment is doing so much heavy lifting, do not ignore it. the defaults arepathβ/procandloadavgβloadavg.
get()
Call get() to get the statistics. get() returns the statistics as a hash reference. like, it hands you the whole hashref and says "here bestie, take it". π«΄
my $stat = $lxs->get;
π EXPORTS π
No exports. nothing. zero. nada. it's an independent queen and it will not be exporting anything today. π
π SEE ALSO π
go read it, iykyk. π
π REPORTING BUGS π
Please report all bugs to <jschulz.cpan(at)bloonix.de>. found a bug? don't gatekeep it, send it in. fr fr. π
π AUTHOR π
Jonny Schulz <jschulz.cpan(at)bloonix.de>. the author. the moment. the legend. π
π COPYRIGHT π
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page bestie!! this beauty shipped as part of perl v5.36.0, dated 2022-11-19, and it goes out to you from Sys::S...LoadAVG(3pm) πβ¨π slay, go read your load averages, drink some water, and remember: avg_15 always tells the truth. periodt. πΈπ¦β
π¦ where this page comes from
- debian bookworm: libsys-statistics-linux-perl 0.66-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libsys-statistics-linux-perl 0.66-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libsys-statistics-linux-perl 0.66-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsys-statistics-linux-perl 0.66-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsys-statistics-linux-perl 0.66-5 Β· 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