From 0cab4ec777565b5118114b0d5c648e19cf2472b1 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 28 Feb 2021 19:31:55 +0100 Subject: [PATCH 1/4] pastekodi: include get_throttled output on RPi This will quickly tell us if the RPi is suffering from undervoltage or overtemperature issues. Signed-off-by: Matthias Reichl --- packages/mediacenter/kodi/scripts/pastekodi | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mediacenter/kodi/scripts/pastekodi b/packages/mediacenter/kodi/scripts/pastekodi index dafbb93ef6..1c183a6eaa 100755 --- a/packages/mediacenter/kodi/scripts/pastekodi +++ b/packages/mediacenter/kodi/scripts/pastekodi @@ -65,6 +65,7 @@ fi fi if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then echo "RPi Hardware Revision: $(vcgencmd otp_dump | grep 30: | cut -d: -f2)" + echo "RPi $(vcgencmd get_throttled)" fi cat_file "${LOG_FILE}" From cbd6c1f82ab4725ce9b68bb74f6eda9c78453b09 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 1 Mar 2021 10:35:49 +0100 Subject: [PATCH 2/4] pastekodi: list .config, system.d and udev.rules.d files /storage/.config/system.d is listed recursively so we also see contents of .wants and drop-ins etc directories Signed-off-by: Matthias Reichl --- packages/mediacenter/kodi/scripts/pastekodi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/mediacenter/kodi/scripts/pastekodi b/packages/mediacenter/kodi/scripts/pastekodi index 1c183a6eaa..7b3910749f 100755 --- a/packages/mediacenter/kodi/scripts/pastekodi +++ b/packages/mediacenter/kodi/scripts/pastekodi @@ -14,6 +14,18 @@ cat_file() { fi } +ls_dir() { + if [ -d "${1}" ]; then + ls -lA "${1}" | cat_data "${1}" + fi +} + +ls_dir_recursive() { + if [ -d "${1}" ]; then + ls -lAR "${1}" | cat_data "${1}" + fi +} + usage() { [ -n "${1}" ] && echo "Unknown argument: ${1}" cat < Date: Mon, 1 Mar 2021 10:54:24 +0100 Subject: [PATCH 3/4] pastekodi: use short-precise journal format Having timestamps with microsecond precision instead of only seconds makes it easier to analyse timing issues and cross-reference entries with kodi log (which has millisecond timestamps). Signed-off-by: Matthias Reichl --- packages/mediacenter/kodi/scripts/pastekodi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mediacenter/kodi/scripts/pastekodi b/packages/mediacenter/kodi/scripts/pastekodi index 7b3910749f..f26700e097 100755 --- a/packages/mediacenter/kodi/scripts/pastekodi +++ b/packages/mediacenter/kodi/scripts/pastekodi @@ -82,7 +82,7 @@ fi cat_file "${LOG_FILE}" - journalctl -a | cat_data "journalctl -a" + journalctl -a -o short-precise | cat_data "journalctl -a" if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then bootloader_version="$(vcgencmd bootloader_version)" From b2a6e313dfd5b90a59b0f2a8f49a957cb0ad3e49 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 2 Mar 2021 09:39:33 +0100 Subject: [PATCH 4/4] pastekodi: cleanup RPi bootloader version report The check for "unsupported command" was wrong as vcgencmd outputs that on stderr (which isn't captured), not stdout. Current RPii0-3 firmwares support the command and report "unknown", so the whole check can be dropped and we can simply add the output of the vcgencmd command. Signed-off-by: Matthias Reichl --- packages/mediacenter/kodi/scripts/pastekodi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/mediacenter/kodi/scripts/pastekodi b/packages/mediacenter/kodi/scripts/pastekodi index f26700e097..99d98b5d49 100755 --- a/packages/mediacenter/kodi/scripts/pastekodi +++ b/packages/mediacenter/kodi/scripts/pastekodi @@ -85,10 +85,7 @@ fi journalctl -a -o short-precise | cat_data "journalctl -a" if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then - bootloader_version="$(vcgencmd bootloader_version)" - if ! echo "${bootloader_version}" | grep -q "Command not registered"; then - echo "${bootloader_version}" | cat_data "Bootloader version" - fi + vcgencmd bootloader_version | cat_data "Bootloader version" fi cat_file "/flash/config.txt" # RPi