From b47e93ce7a47bca573e0421043b2506bffd4b1f8 Mon Sep 17 00:00:00 2001 From: Andreas Bachlechner <62039342+bachandi@users.noreply.github.com> Date: Tue, 12 Oct 2021 08:56:58 +0200 Subject: [PATCH] Fix img size and reduce rrds. --- lib/nvme.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nvme.pm b/lib/nvme.pm index fe90923..c64591a 100644 --- a/lib/nvme.pm +++ b/lib/nvme.pm @@ -31,7 +31,7 @@ our @EXPORT = qw(nvme_init nvme_update nvme_cgi); my $max_number_of_hds = 8; # Changing this number destroys history. my $max_number_of_smart_values = 2; # Excluding temperature. Changing this number does not require rrd recreation as long as max_number_of_smart_values_in_rrd is not changed. -my $max_number_of_smart_values_in_rrd = 12; # Excluding temperature. Changing this number destroys history. +my $max_number_of_smart_values_in_rrd = 7; # Excluding temperature. Changing this number destroys history. sub nvme_init { my $myself = (caller(0))[3]; @@ -428,7 +428,7 @@ sub nvme_cgi { } for($n = 0; $n < keys(%{$nvme->{list}}); $n++) { - for($n2 = 1; $n2 <= $max_number_of_hds; $n2++) { + for($n2 = 1; $n2 <= $max_number_of_smart_values+1; $n2++) { $str = $u . $package . $n . $n2 . "." . $tf->{when} . ".$imgfmt_lc"; push(@IMG, $str); unlink("$IMG_DIR" . $str);