Difference between revisions of "10393 SSD Debugging"
From ElphelWiki
(Created page with "==Enable Panic== * ''enable_panic.sh'' #!/bin/bash # Enable kernel panic in disk drivers when command timeout has occurred for IP in `seq 161 163`; do ssh-copy-id -i...") |
|||
Line 1: | Line 1: | ||
==Enable Panic== | ==Enable Panic== | ||
* ''enable_panic.sh'' | * ''enable_panic.sh'' | ||
− | #!/bin/bash | + | <font size='2'>#!/bin/bash |
# Enable kernel panic in disk drivers when command timeout has occurred | # Enable kernel panic in disk drivers when command timeout has occurred | ||
Line 9: | Line 9: | ||
ssh root@192.168.0."$IP" 'echo 1 > /sys/devices/soc0/amba\@0/80000000.elphel-ahci/enable_panic_flag' | ssh root@192.168.0."$IP" 'echo 1 > /sys/devices/soc0/amba\@0/80000000.elphel-ahci/enable_panic_flag' | ||
ssh root@192.168.0."$IP" 'echo ''module ahci_elphel line 526 +p'' > /sys/kernel/debug/dynamic_debug/control' | ssh root@192.168.0."$IP" 'echo ''module ahci_elphel line 526 +p'' > /sys/kernel/debug/dynamic_debug/control' | ||
− | done | + | done</font> |
==Read SATA buffer== | ==Read SATA buffer== | ||
* ''read_sata_buffer.py'' | * ''read_sata_buffer.py'' | ||
− | #!/usr/bin/env python | + | <font size='2'>#!/usr/bin/env python |
from __future__ import print_function | from __future__ import print_function | ||
Line 24: | Line 24: | ||
hex([((mem.read_mem(0x80000ffc) >> 10) & 0xffc) + 0x80001000,mem.mem_dump (0x80001000, 0x400,4),sata.reg_status()][0]) | hex([((mem.read_mem(0x80000ffc) >> 10) & 0xffc) + 0x80001000,mem.mem_dump (0x80001000, 0x400,4),sata.reg_status()][0]) | ||
− | print("'"+hex(((mem.read_mem(0x80000ffc)>>10)&0xffc)+0x80001000)+"'") | + | print("'"+hex(((mem.read_mem(0x80000ffc)>>10)&0xffc)+0x80001000)+"'")</font> |
Latest revision as of 10:24, 27 April 2017
Enable Panic
- enable_panic.sh
#!/bin/bash # Enable kernel panic in disk drivers when command timeout has occurred for IP in `seq 161 163`; do ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.0."$IP" ssh root@192.168.0."$IP" 'echo 1 > /sys/devices/soc0/amba\@0/80000000.elphel-ahci/enable_panic_flag' ssh root@192.168.0."$IP" 'echo module ahci_elphel line 526 +p > /sys/kernel/debug/dynamic_debug/control' done
Read SATA buffer
- read_sata_buffer.py
#!/usr/bin/env python from __future__ import print_function from __future__ import division import x393sata import x393_mem mem = x393_mem.X393Mem(1,0,1) sata = x393sata.x393sata() hex([((mem.read_mem(0x80000ffc) >> 10) & 0xffc) + 0x80001000,mem.mem_dump (0x80001000, 0x400,4),sata.reg_status()][0]) print("'"+hex(((mem.read_mem(0x80000ffc)>>10)&0xffc)+0x80001000)+"'")