Add byte graph in bytes to gensens via 'byt' identifier.

This commit is contained in:
Andreas Bachlechner 2021-09-23 12:09:41 +02:00
parent 8fc243df90
commit 93f0e4639c
1 changed files with 3 additions and 1 deletions

View File

@ -424,7 +424,7 @@ sub gensens_cgi {
foreach my $sg (sort keys %{$gensens->{list}}) { foreach my $sg (sort keys %{$gensens->{list}}) {
my @ls = split(',', $gensens->{list}->{$sg}); my @ls = split(',', $gensens->{list}->{$sg});
# determine if we are dealing with a 'temp', 'cpu', 'bat', 'pwr', 'fan' or 'pct' graph # determine if we are dealing with a 'temp', 'cpu', 'bat', 'pwr', 'fan', 'pct' or 'byt' graph
if(index($ls[0], "temp") == 0) { if(index($ls[0], "temp") == 0) {
$vlabel = $temp_scale; $vlabel = $temp_scale;
} elsif(index($ls[0], "cpu") == 0) { } elsif(index($ls[0], "cpu") == 0) {
@ -437,6 +437,8 @@ sub gensens_cgi {
$vlabel = "RPM"; $vlabel = "RPM";
} elsif(index($ls[0], "pct") == 0) { } elsif(index($ls[0], "pct") == 0) {
$vlabel = "Percent (%)"; $vlabel = "Percent (%)";
} elsif(index($ls[0], "byt") == 0) {
$vlabel = "bytes";
} else { } else {
# not supported yet # not supported yet
} }