Skip to content

Commit 24eed48

Browse files
author
Keith Busch
authored
Merge pull request #530 from djukyo/master
[Log] Memblaze add more log infomation for S.M.A.R.T.
2 parents 692d550 + 418333d commit 24eed48

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

plugins/memblaze/memblaze-nvme.c

100644100755
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ enum {
2828
WEARLEVELING_COUNT,
2929
HOST_WRITE,
3030
THERMAL_THROTTLE_CNT,
31+
CORRECT_PCIE_PORT0,
32+
CORRECT_PCIE_PORT1,
33+
REBUILD_FAIL,
34+
ERASE_FAIL,
35+
PROGRAM_FAIL,
36+
READ_FAIL,
3137
NR_SMART_ITEMS,
3238
};
3339

@@ -194,6 +200,35 @@ static int show_memblaze_smart_log(int fd, __u32 nsid, const char *devname,
194200
printf("Thermal throttling count since device born : %u\n",
195201
item->thermal_throttle_cnt.cnt);
196202

203+
item = &smart->items[CORRECT_PCIE_PORT0];
204+
if (item_id_2_u32(item) == 0xED)
205+
printf("PCIE Correctable Error Count of Port0 : %llu\n",
206+
(unsigned long long)raw_2_u64(item->rawval, sizeof(item->rawval)));
207+
208+
item = &smart->items[CORRECT_PCIE_PORT1];
209+
if (item_id_2_u32(item) == 0xEE)
210+
printf("PCIE Correctable Error Count of Port1 : %llu\n",
211+
(unsigned long long)raw_2_u64(item->rawval, sizeof(item->rawval)));
212+
213+
item = &smart->items[REBUILD_FAIL];
214+
if (item_id_2_u32(item) == 0xEF)
215+
printf("End-to-End Error Detection Count : %llu\n",
216+
(unsigned long long)raw_2_u64(item->rawval, sizeof(item->rawval)));
217+
218+
item = &smart->items[ERASE_FAIL];
219+
if (item_id_2_u32(item) == 0xF0)
220+
printf("Erase Fail Count : %llu\n",
221+
(unsigned long long)raw_2_u64(item->rawval, sizeof(item->rawval)));
222+
223+
item = &smart->items[PROGRAM_FAIL];
224+
if (item_id_2_u32(item) == 0xF1)
225+
printf("Program Fail Count : %llu\n",
226+
(unsigned long long)raw_2_u64(item->rawval, sizeof(item->rawval)));
227+
228+
item = &smart->items[READ_FAIL];
229+
if (item_id_2_u32(item) == 0xF2)
230+
printf("Read Fail Count : %llu\n",
231+
(unsigned long long)raw_2_u64(item->rawval, sizeof(item->rawval)));
197232
return err;
198233
}
199234

0 commit comments

Comments
 (0)