Révision 6c7ad652
silly bug: writecycles must be calculated from written bytes
This fixes issue #1127
| plugins/disk/nvme | ||
|---|---|---|
| 267 | 267 |
my $info = $list->{$_};
|
| 268 | 268 |
|
| 269 | 269 |
# The unit size reported is 1000 blocks. |
| 270 |
my $cycles = $info->{smart}->{data_units_read} * 512_000 / $info->{capacity};
|
|
| 270 |
my $cycles = $info->{smart}->{data_units_written} * 512_000 / $info->{capacity};
|
|
| 271 | 271 |
print "$_.value $cycles\n"; |
| 272 | 272 |
} |
| 273 | 273 |
} |
Formats disponibles : Unified diff