EMMC flash storage wear level: различия между версиями

Материал из Wiren Board
(Новая страница: «The following commands are used to get the estimated wear level of the eMMC flash storage chip used in Wiren Board 5 controllers: Mount debugfs <pre> mount -t…»)
 
Строка 4: Строка 4:
Mount debugfs
Mount debugfs


<pre>
<syntaxhighlight lang="bash">
mount -t debugfs none /sys/kernel/debug/  
mount -t debugfs none /sys/kernel/debug/  
</pre>
</syntaxhighlight>




Read the wear level estimation
Read the wear level estimation


<pre>
<syntaxhighlight lang="bash">
cat /sys/kernel/debug/mmc0/mmc0\:0001/ext_csd | python -c 'import binascii, sys; print "~%d%% wear" % (ord(binascii.unhexlify(sys.stdin.read().strip())[0x5e])*10)'
cat /sys/kernel/debug/mmc0/mmc0\:0001/ext_csd | python -c 'import binascii, sys; print "~%d%% wear" % (ord(binascii.unhexlify(sys.stdin.read().strip())[0x5e])*10)'
<pre>
</syntaxhighlight>


Example output:
Example output:

Версия 01:59, 22 января 2016

The following commands are used to get the estimated wear level of the eMMC flash storage chip used in Wiren Board 5 controllers:


Mount debugfs

mount -t debugfs none /sys/kernel/debug/


Read the wear level estimation

cat /sys/kernel/debug/mmc0/mmc0\:0001/ext_csd | python -c 'import binascii, sys; print "~%d%% wear" % (ord(binascii.unhexlify(sys.stdin.read().strip())[0x5e])*10)'

Example output:

~10% wear

The level is returned in multiplies of 10 percent. The minimum wear is 0% (new device), the maximum is supposed to be 100%.