mirror of https://github.com/mikaku/Monitorix.git
fix to compare kernel versions as strings instead as numbers
This commit is contained in:
parent
14ef25171b
commit
abec035a39
|
@ -170,7 +170,7 @@ sub fs_init {
|
|||
};
|
||||
}
|
||||
|
||||
if($config->{os} eq "Linux" && $config->{kernel} > 2.4) {
|
||||
if($config->{os} eq "Linux" && $config->{kernel} gt "2.4") {
|
||||
my $lvm;
|
||||
my $lvm_disk;
|
||||
my $is_md;
|
||||
|
@ -434,7 +434,7 @@ sub fs_update {
|
|||
my $d = $fs->{devmap}->{$f};
|
||||
if($d) {
|
||||
if($config->{os} eq "Linux") {
|
||||
if($config->{kernel} > 2.4) {
|
||||
if($config->{kernel} gt "2.4") {
|
||||
open(IN, "/proc/diskstats");
|
||||
while(<IN>) {
|
||||
if(/ $d /) {
|
||||
|
@ -931,7 +931,7 @@ sub fs_cgi {
|
|||
undef(@tmpz);
|
||||
undef(@CDEF);
|
||||
if($config->{os} eq "Linux") {
|
||||
if($config->{kernel} > 2.4) {
|
||||
if($config->{kernel} gt "2.4") {
|
||||
$graph_title = "$config->{graphs}->{_fs3} ($tf->{nwhen}$tf->{twhen})";
|
||||
$vlabel = "Milliseconds";
|
||||
} else {
|
||||
|
|
|
@ -203,7 +203,7 @@ sub net_update {
|
|||
while(<IN>) {
|
||||
if(/Link/ && /$nl[$n]/) {
|
||||
# Idrop column added in 8.0
|
||||
if($config->{kernel} > 7.2) {
|
||||
if($config->{kernel} gt "7.2") {
|
||||
(undef, undef, undef, undef, $net_packs_in[$n], $net_error_in[$n], undef, $net_bytes_in[$n], $net_packs_out[$n], $net_error_out[$n], $net_bytes_out[$n]) = split(' ', $_);
|
||||
} else {
|
||||
(undef, undef, undef, undef, $net_packs_in[$n], $net_error_in[$n], $net_bytes_in[$n], $net_packs_out[$n], $net_error_out[$n], $net_bytes_out[$n]) = split(' ', $_);
|
||||
|
|
Loading…
Reference in New Issue