The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more
|
my @cpustats = qw(
user
nice
system
idle
total
) ;
my $sys = Sys::Statistics::Linux->new();
$sys ->set( cpustats => 1);
sleep (1);
my $stats = $sys ->get;
ok( defined $stats ->cpustats->{cpu}->{ $_ }, "checking cpustats $_" ) for @cpustats ;
|