Skip to content

Commit 2160a16

Browse files
NateThorntonigaw
authored andcommitted
ocp: Add all statistics to the map table
Adds all OCP 2.6+ statistics identifier names to the map table. OCP 2.7 relaxed the requirement drive vendors including the statistics in the Telemetry String Log, thus it is necessary to include them in the tools. Specifically, this adds statistic identifiers 0x1E ~ 0x6F Signed-off-by: Nate Thornton <[email protected]>
1 parent bedfebd commit 2160a16

1 file changed

Lines changed: 84 additions & 2 deletions

File tree

plugins/ocp/ocp-telemetry-decode.c

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,89 @@ struct statistic_entry statistic_identifiers_map[] = {
262262
{ 0x1A, "PERST Events Count"},
263263
{ 0x1B, "Max Die Bad Block"},
264264
{ 0x1C, "Max NAND Channel Bad Block"},
265-
{ 0x1D, "Minimum NAND Channel Bad Block"}
265+
{ 0x1D, "Minimum NAND Channel Bad Block"},
266+
{ 0x1E, "Physical Media Units Written"},
267+
{ 0x1F, "Physical Media Units Read"},
268+
{ 0x20, "Bad User NAND Blocks"},
269+
{ 0x21, "Bad System NAND Blocks"},
270+
{ 0x22, "XOR Recovery Count"},
271+
{ 0x23, "Uncorrectable Read Error Count"},
272+
{ 0x24, "Soft ECC Error Count"},
273+
{ 0x25, "End to End Correction Counts"},
274+
{ 0x26, "System Data % Used"},
275+
{ 0x27, "Refresh Counts"},
276+
{ 0x28, "User Data Erase Counts"},
277+
{ 0x29, "Thermal Throttling Status and Count"},
278+
{ 0x2A, "DSSD Specification Version"},
279+
{ 0x2B, "PCIe Correctable Error Count"},
280+
{ 0x2C, "Incomplete Shutdowns"},
281+
{ 0x2D, "% Free Blocks"},
282+
{ 0x2E, "Capacitor Health"},
283+
{ 0x2F, "NVM Express Base Errata Version"},
284+
{ 0x30, "NVM Command Set Errata Version"},
285+
{ 0x31, "NVM Express Management Interface Errata Version"},
286+
{ 0x32, "Unaligned I/O"},
287+
{ 0x33, "Security Version Number"},
288+
{ 0x34, "Total NUSE"},
289+
{ 0x35, "PLP Start Count"},
290+
{ 0x36, "Endurance Estimate"},
291+
{ 0x37, "PCIe Link Retraining Count"},
292+
{ 0x38, "Power State Change Count"},
293+
{ 0x39, "Lowest Permitted Firmware Revision"},
294+
{ 0x3A, "Log Page Version"},
295+
{ 0x3B, "Media Dies Offline"},
296+
{ 0x3C, "Max Temperature Recorded"},
297+
{ 0x3D, "NAND Avg. Erase Count"},
298+
{ 0x3E, "Command Timeouts"},
299+
{ 0x3F, "System Area Program Fail Count"},
300+
{ 0x40, "System Area Read Fail Count"},
301+
{ 0x41, "System Area Erase Fail Count"},
302+
{ 0x42, "Max Peak Power Capability"},
303+
{ 0x43, "Current Average Power"},
304+
{ 0x44, "Lifetime Power Consumed"},
305+
{ 0x45, "Error / Assert Count"},
306+
{ 0x46, "Device Busy Time"},
307+
{ 0x47, "Critical Warning"},
308+
{ 0x48, "Composite Temperature"},
309+
{ 0x49, "Available Spare"},
310+
{ 0x4A, "Available Spare Threshold"},
311+
{ 0x4B, "Percentage Used"},
312+
{ 0x4C, "Endurance Group Critical Warning Summary"},
313+
{ 0x4D, "Data Units Read"},
314+
{ 0x4E, "Data Units Written"},
315+
{ 0x4F, "Host Read Commands"},
316+
{ 0x50, "Host Write Commands"},
317+
{ 0x51, "Controller Busy Time"},
318+
{ 0x52, "Power Cycles"},
319+
{ 0x53, "Power On Hours"},
320+
{ 0x54, "Unsafe Shutdowns"},
321+
{ 0x55, "Media and Data Integrity Errors"},
322+
{ 0x56, "Number of Error Information Log Entries"},
323+
{ 0x57, "Warning Composite Temperature Time"},
324+
{ 0x58, "Critical Composite Temperature Time"},
325+
{ 0x59, "Temperature Sensor 1"},
326+
{ 0x5A, "Temperature Sensor 2"},
327+
{ 0x5B, "Temperature Sensor 3"},
328+
{ 0x5C, "Temperature Sensor 4"},
329+
{ 0x5D, "Temperature Sensor 5"},
330+
{ 0x5E, "Temperature Sensor 6"},
331+
{ 0x5F, "Temperature Sensor 7"},
332+
{ 0x60, "Temperature Sensor 8"},
333+
{ 0x61, "Thermal Management Temperature 1 Transition Count"},
334+
{ 0x62, "Thermal Management Temperature 2 Transition Count"},
335+
{ 0x63, "Total Time For Thermal Management Temperature 1"},
336+
{ 0x64, "Total Time For Thermal Management Temperature 2"},
337+
{ 0x65, "Endurance Estimate"},
338+
{ 0x66, "Data Units Read"},
339+
{ 0x67, "Data Units Written"},
340+
{ 0x68, "Media Units Written"},
341+
{ 0x69, "Number of Error Information Log Entries"},
342+
{ 0x6A, "Form Factor"},
343+
{ 0x6B, "Dies In Use Bad NAND Blocks"},
344+
{ 0x6C, "Proactive Bad Die Retirement"},
345+
{ 0x6D, "Namespace ID Context Statistic Descriptor"},
346+
{ 0x6E, "Controller ID Context Statistic Descriptor"},
347+
{ 0x6F, "Queue ID Context Statistic Descriptor"}
266348
};
267349

268350
struct request_data host_log_page_header[] = {
@@ -562,7 +644,7 @@ int get_statistic_id_ascii_string(int identifier, char *description)
562644

563645
// If ASCII string isn't found, see in our internal Map
564646
// for 2.5 Spec defined strings
565-
if (identifier <= 0x1D) {
647+
if (identifier <= 0x6F) {
566648
strcpy(description, statistic_identifiers_map[identifier].description);
567649
return 0;
568650
}

0 commit comments

Comments
 (0)