pstore-test manual


Image Types:
Image Deployment:


Test the pstore functionality usage

Execution Steps

  1. For test purpose, you can generate a kernel crash by setting reboot timeout to 10 seconds and trigger a panic:
  2. $ sudo sh -c "echo 1 > /proc/sys/kernel/sysrq"
    $ sudo sh -c "echo 10 > /proc/sys/kernel/panic"
    $ sudo sh -c "echo c > /proc/sysrq-trigger"
  3. When the target reboots enter U-Boot
  4. In U-Boot, logs can be displayed using pstore command.
  5. PStore parameters need to be set during U-Boot configuration and match kernel ramoops parameters
  6. To view the logs in U-Boot, execute the following command to set the pstore location
  7. => pstore set 0x30000000 0x100000 0x2000 0x2000
  8. Then all available dumps can be displayed using:
  9. => pstore display
  10. Make a note of the timestamp of the logs
  11. => boot
  12. After target is booted, logs can be found at /var/lib/systemd/pstore:
  13. $ sudo ls -l /var/lib/systemd/pstore


After a crash induced reboot, logs can be found at /var/lib/systemd/pstore:

total 0

  -rw------- 1 root root 4084 Mar  1 08:32 console-ramoops-0

  -rw------- 1 root root 4023 Mar  1 08:27 dmesg-ramoops-0

  -rw-r----- 1 root root 4040 Mar  1 08:15 dmesg.txt

Logs saved should be same as what was displayed after running pstore display command