diff --git a/scsiprint.cpp b/scsiprint.cpp
index cca0dcc..5576b60 100644
|
a
|
b
|
scsiGetSmartData(scsi_device * device, bool attribs)
|
| 332 | 332 | } |
| 333 | 333 | if (255 == triptemp) |
| 334 | 334 | pout("Drive Trip Temperature: <not available>\n"); |
| 335 | | else |
| 336 | | pout("Drive Trip Temperature: %d C\n", triptemp); |
| | 335 | else { |
| | 336 | jout("Drive Trip Temperature: %d C\n", triptemp); |
| | 337 | jglb["temperature"]["drive_trip"] = triptemp; |
| | 338 | } |
| 337 | 339 | } |
| 338 | 340 | pout("\n"); |
| 339 | 341 | return err; |
| … |
… |
scsiPrintErrorCounterLog(scsi_device * device)
|
| 828 | 830 | "algorithm processed uncorrected\n"); |
| 829 | 831 | pout(" fast | delayed rewrites corrected " |
| 830 | 832 | "invocations [10^9 bytes] errors\n"); |
| | 833 | |
| | 834 | json::ref jref = jglb["scsi_error_counter_log"]; |
| 831 | 835 | for (int k = 0; k < 3; ++k) { |
| 832 | 836 | if (! found[k]) |
| 833 | 837 | continue; |
| 834 | 838 | ecp = &errCounterArr[k]; |
| 835 | 839 | static const char * const pageNames[3] = |
| 836 | 840 | {"read: ", "write: ", "verify: "}; |
| 837 | | pout("%s%8" PRIu64 " %8" PRIu64 " %8" PRIu64 " %8" PRIu64 |
| | 841 | static const char * jpageNames[3] = |
| | 842 | {"read", "write", "verify"}; |
| | 843 | jout("%s%8" PRIu64 " %8" PRIu64 " %8" PRIu64 " %8" PRIu64 |
| 838 | 844 | " %8" PRIu64, pageNames[k], ecp->counter[0], |
| 839 | 845 | ecp->counter[1], ecp->counter[2], ecp->counter[3], |
| 840 | 846 | ecp->counter[4]); |
| 841 | 847 | double processed_gb = ecp->counter[5] / 1000000000.0; |
| 842 | | pout(" %12.3f %8" PRIu64 "\n", processed_gb, |
| | 848 | jout(" %12.3f %8" PRIu64 "\n", processed_gb, |
| 843 | 849 | ecp->counter[6]); |
| | 850 | // Error counter log info |
| | 851 | jref[jpageNames[k]]["errors_corrected_by_eccfast"] = ecp->counter[0]; |
| | 852 | jref[jpageNames[k]]["errors_corrected_by_eccdelayed"] = ecp->counter[1]; |
| | 853 | jref[jpageNames[k]]["errors_corrected_by_rereads_rewrites"] = ecp->counter[2]; |
| | 854 | jref[jpageNames[k]]["total_errors_corrected"] = ecp->counter[3]; |
| | 855 | jref[jpageNames[k]]["correction_algorithm_invocations"] = ecp->counter[4]; |
| | 856 | jref[jpageNames[k]]["gigabytes_processed"] = strprintf("%.3f", processed_gb); |
| | 857 | jref[jpageNames[k]]["total_uncorrected_errors"] = ecp->counter[6]; |
| 844 | 858 | } |
| 845 | 859 | } |
| 846 | 860 | else |
| … |
… |
scsiPrintTemp(scsi_device * device)
|
| 2224 | 2238 | } |
| 2225 | 2239 | if (255 == trip) |
| 2226 | 2240 | pout("Drive Trip Temperature: <not available>\n"); |
| 2227 | | else |
| 2228 | | pout("Drive Trip Temperature: %d C\n", trip); |
| | 2241 | else { |
| | 2242 | jout("Drive Trip Temperature: %d C\n", trip); |
| | 2243 | jglb["temperature"]["drive_trip"] = trip; |
| | 2244 | } |
| 2229 | 2245 | pout("\n"); |
| 2230 | 2246 | } |
| 2231 | 2247 | |