You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running nvme wdc vs-nand-stats will change the values of the user data fields
depending on output format used. In regular stdout, the ordering is TLC min,
TLC Max, SLC Min, SLC Max. However in json, the values get reassigned, what
was SLC Min in stdout will become TLC >
Regular format (TLC Min, TLC Max, SLC Min, SLC Max)
[root@ /tmp/]# nvme wdc vs-nand-stats /dev/nvme0n1 | grep User\ Data
User Data Erase Counts - TLC Min 169
User Data Erase Counts - TLC Max 310
User Data Erase Counts - SLC Min 10719
User Data Erase Counts - SLC Max 11676
Json format (SLC Min, SLC Max, TLC Min, TLC Max)
[root@ /tmp/]# nvme wdc vs-nand-stats /dev/nvme0n1 -o json | grep User\ Data
"User Data Erase Counts - SLC Min" : 169,
"User Data Erase Counts - SLC Max" : 310,
"User Data Erase Counts - TLC Min" : 10719,
"User Data Erase Counts - TLC Max" : 11676,
The difference can be traced to how the array subscripts are being
used in the two output formats
stdout : https://t.ly/sRIDz
tlc_min == 0
tlc_max == 1
slc_min == 2
slc_max == 3
json : https://t.ly/pmU-m
slc_min = 0
slc_max = 1
tlc_min = 2
tlc_max = 3
With the patch, we rename the fields to be the same for both stdout & json.
Output comparison below
Regular format (TLC Min, TLC Max, SLC Min, SLC Max)
[root@ /tmp/]# ./nvme wdc vs-nand-stats /dev/nvme0n1 | grep User\ Data
User Data Erase Counts - TLC Min 169
User Data Erase Counts - TLC Max 310
User Data Erase Counts - SLC Min 10719
User Data Erase Counts - SLC Max 11676
Json format (TLC Min, TLC Max, SLC Min, SLC Max)
[root@ /tmp/]# ./nvme wdc vs-nand-stats /dev/nvme0n1 -o json | grep User\ Data
"User Data Erase Counts - TLC Min":169,
"User Data Erase Counts - TLC Max":310,
"User Data Erase Counts - SLC Min":10719,
"User Data Erase Counts - SLC Max":11676,
Signed-off-by: Carl Moran<carl.moran1@meta.com>
0 commit comments