mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
wakeups
This commit is contained in:
parent
800fa1cc43
commit
c5ba45e0eb
9
pinxi
9
pinxi
|
@ -36048,11 +36048,16 @@ sub process_power {
|
|||
sub get_wakeups {
|
||||
eval $start if $b_log;
|
||||
return if %risc;
|
||||
my ($wakeups);
|
||||
my ($path,$suspend, $wakeups);
|
||||
# this increments on suspend, but since you can't see it until wake, numbers
|
||||
# work.
|
||||
my $path = '/sys/power/suspend_stats/success';
|
||||
$path = '/sys/power/suspend_stats/success';
|
||||
$suspend = reader($path,'strip',0) if -r $path;
|
||||
# not all systems had /success file
|
||||
$path = '/sys/power/wakeup_count';
|
||||
$wakeups = reader($path,'strip',0) if -r $path;
|
||||
# wakeup_count is not understood, sometimes == success, other times not at all
|
||||
$wakeups = $suspend if defined $suspend;
|
||||
eval $end if $b_log;
|
||||
return $wakeups;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue