Adjust default values for stor dev

This commit is contained in:
Daniel Berteaud 2023-12-21 14:09:42 +01:00
parent f7835e1b90
commit 12c8396be3
2 changed files with 9 additions and 9 deletions

View File

@ -30,14 +30,14 @@ if (not defined $dev or $dev !~ m|^/dev/\w+(/\w+)?$| or not -e $dev){
}
my $json = {
temperature_celsius => -1,
power_on_hours => -1,
power_cycle_count => -1,
reallocated_sector_count => -1,
current_pending_sector => -1,
offline_uncorrectable => -1,
percent_lifetime_remain => -1,
firmware_version => -1
temperature_celsius => 25,
power_on_hours => 0,
power_cycle_count => 0,
reallocated_sector_count => 0,
current_pending_sector => 0,
offline_uncorrectable => 0,
percent_lifetime_remain => 100,
firmware_version => 0
};
my $smartctl = which('smartctl');

View File

@ -52,7 +52,7 @@ foreach my $device (@{$smart_scan->{devices}}){
'{#STOR_DEV_DESC}' => $device->{info_name},
'{#STOR_DEV_TYPE}' => $device->{type},
'{#STOR_DEV_PROTO}' => $device->{protocol},
'{#STOR_DEV_MODEl}' => $model,
'{#STOR_DEV_MODEL}' => $model,
'{#STOR_DEV_SN}' => $sn,
'{#STOR_DEV_SMART}' => int $has_smart
};