From 1f90bceb9883eeff8607a54ef7cb5a953a4493f3 Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Sun, 1 Feb 2026 12:33:01 +0000 Subject: [PATCH 01/10] remove rpimonitor and cpuminer Perhaps add a reference to sbcbench later for proper benchmarking --- packages/bsp/common/usr/bin/armbianmonitor | 240 +-------------------- 1 file changed, 1 insertion(+), 239 deletions(-) diff --git a/packages/bsp/common/usr/bin/armbianmonitor b/packages/bsp/common/usr/bin/armbianmonitor index b37a67854ea2..c7ebb43d0ccf 100755 --- a/packages/bsp/common/usr/bin/armbianmonitor +++ b/packages/bsp/common/usr/bin/armbianmonitor @@ -203,68 +203,6 @@ ParseOptions() { echo -e "\nPlease upload the ${BOLD}whole output${NC} above to an online pasteboard service\nand provide the URL in the forum where you have been asked for this.\n" exit 0 ;; - r | R) - # Installs RPi-Monitor and patches templates (heavily on sun8i) - fping armbian.com 2> /dev/null | grep -q alive || - ( - echo "Network/firewall problem detected. Please fix this prior to installing RPi-Monitor." >&2 - exit 1 - ) - InstallRPiMonitor - case $(awk '/Hardware/ {print $3$4}' < /proc/cpuinfo) in - *sun8i*) - PatchRPiMonitor_for_sun8i - case $(uname -r) in - 3.4.*) - sed -i 's|H3_Extended_Mainline.conf|H3_Extended.conf|' /etc/rpimonitor/template/OrangePi_H3.conf - systemctl restart rpimonitor > /dev/null 2>&1 - ;; - esac - ;; - *) - # On other SoCs than H3 make minor adjustments to config to reflect Armbian reality: - . /etc/armbian-release - sed -e "s/^web.status.1.name=.*/web.status.1.name=$BOARD_NAME/" \ - -e "s/^web.statistics.1.name=.*/web.statistics.1.name=$BOARD_NAME/" \ - < /etc/rpimonitor/template/raspbian.conf > /etc/rpimonitor/template/armbian.conf - cd /etc/rpimonitor/ - ln -sf /etc/rpimonitor/template/armbian.conf data.conf - # fix temperature everywhere - sed -i -e 's|^dynamic.12.source=.*|dynamic.12.source=/etc/armbianmonitor/datasources/soctemp|' \ - -e 's|^dynamic.12.postprocess=.*|dynamic.12.postprocess=sprintf("%.1f", $1/1000)|' \ - /etc/rpimonitor/template/temperature.conf - # monitor big cores on big.LITTLE - if [ $(grep -c '^processor' /proc/cpuinfo) -ge 4 ]; then - sed -i 's|/sys/devices/system/cpu/cpu0/cpufreq/|/sys/devices/system/cpu/cpu4/cpufreq/|g' \ - /etc/rpimonitor/template/cpu.conf - fi - # display processor architecture instead of undefined - sed -i -e "s_^static.4.source=.*_static.4.source=lscpu | awk -F' ' '/^Architecture/ {print \$2}'_" \ - -e "s/^static.4.regexp=.*/static.4.regexp=/" /etc/rpimonitor/template/version.conf - ;; - esac - echo -e "\nNow you're able to enjoy RPi-Monitor at http://$(ip a | awk -F" " '/inet / {print $2}' | grep -v '127.0.0.1' | cut -f1 -d/ | head -n1):8888" - exit 0 - ;; - p | P) - # Installs cpuminer on 32-bit platforms - fping armbian.com 2> /dev/null | grep -q alive || - ( - echo "Network/firewall problem detected. Please fix this prior to installing cpuminer." >&2 - exit 1 - ) - cd /usr/local/src/ - wget http://downloads.sourceforge.net/project/cpuminer/pooler-cpuminer-2.5.1.tar.gz - tar xf pooler-cpuminer-2.5.1.tar.gz && rm pooler-cpuminer-2.5.1.tar.gz - cd cpuminer-2.5.1/ - apt-get -f -qq -y install libcurl4-gnutls-dev - autoreconf --force --install --verbose - ./configure CFLAGS="-O3" - make && make install - echo -e "\n\nNow you can use /usr/local/bin/minerd to do automated benchmarking.\nIn case you also installed RPi-Monitor you can do a" - echo -e "\n touch /root/.cpuminer\n\nto ensure minerd is running after reboot and results are recorded\nwith RPi-Monitor" - exit 0 - ;; d) # monitors write activity to disk MonitorIO "${OPTARG}" @@ -328,7 +266,7 @@ DisplayUsage() { # grep "^#" "$0" | grep -v "^#\!/bin/bash" | sed 's/^#//' # fi echo - echo "Usage: $(basename $0) [-h] [-b] [-c \$path] [-d \$device] [-D] [-m] [-p] [-r] [-u]" + echo "Usage: $(basename $0) [-h] [-b] [-c \$path] [-d \$device] [-D] [-m] [-u]" echo echo "Options:" echo " -c /path/to/test Performs disk health/performance tests" @@ -338,8 +276,6 @@ DisplayUsage() { echo " -M Provides simple CLI monitoring - fixed-line output" echo " -n Provides simple CLI network monitoring - scrolling output" echo " -N Provides simple CLI network monitoring - fixed-line output" - echo " -p Tries to install cpuminer for performance measurements" - echo " -r Tries to install RPi-Monitor" echo " -u Tries to upload armbian-hardware-monitor.log for support purposes" echo " -v Tries to verify installed package integrity" echo " -z Runs a quick 7-zip benchmark to estimate CPU performance" @@ -750,180 +686,6 @@ CreateTempDir() { done } #CreateTempFiles -InstallRPiMonitor() { - # Installs rpimonitord loosely based on the official instructions from - # http://rpi-experiences.blogspot.fr/p/rpi-monitor-installation.html - # but using the package from our own repository - if [ "$(id -u)" != "0" ]; then - echo "Installing RPi-Monitor requires root privileges, try sudo please. Exiting" >&2 - exit 1 - fi - echo -e "Installing RPi-Monitor. This can take up to 5 minutes. Be patient please\c" - apt-get -qq -y update - apt-get -f -qq -y install rpimonitor - /usr/share/rpimonitor/scripts/updatePackagesStatus.pl & -} # InstallRPiMonitor - -PatchRPiMonitor_for_sun8i() { - echo -e "\nNow patching RPi-Monitor to deal correctly with H3" - cd / && echo "H4sIAOYyv1cAA+xc/XbayJLPv/AUPZg7NrkGIfyVk4yzS5xk4jNO4mOTZOaM7+QK1BhdhETUwoSJ -ead9hn2y/VV1S2ph7CTztbtnlzMxSOqqru+qrm7NTCVOGA+80FH9IHKSaTCJoyCNk+ZIhlOZtNTo -3u/9tPE52Nvjb3z0937HXO/s7Oy799zOwd7B/o6703Hvtd39vYO9e6L9u2f+gs9MpV4ixL0kjtO7 -xmHYcPhXEPTXfja+cUjvfU+NqhvVDTGYzkQYe77wIl/4V0MlfE/CJMQwTsSLHR7z7GOaeINU6edB -hEcTLw1oUBJPhBokwTRtAS0jCWUqvAxL6KUyoWni6EomKU03TOQHIElj8XYQJ7IluqGKxaWMZILB -ioYwQVBAGqg0GCieBkicaRIPHLovVBANpLlBo72rSxEoEcWpmCZyECgpZBTPLjWTR/F0kQSXo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JkB2VZT7AOPllspXnTAq -rGDoduw1yl6ZvIXAejWLlAD7gMzld6tIrApmFZ1Nue8MIUvMPbA9pl1dN/d4JbZkEb9ExOw9EbaM -EIjLvgc8Ux1vM7Vpj4JrYqKWg9qkn2jS3fN874CUYAsE8bDs3aiDRMPJuiGYaZUe8cfRZQU+q8QK -mFz9iVqsKg79yaQYh0t0DOsS21P3CZfYEo2h0h7F3NOmQX7kWGmgofAHE4o5jN405KpF6zMdjgLh -K7qd4dHdmNB1zKYXCTyt5+Ab5Aoi6bRlcE1YWjZZ6rq+HvP7ivxGbegre891Rv5bvLZG5DXGGo6R -8L5rj54+Pn3GcV6j6jKtZIyDTKKhbWDAZbNkmxBwmUuNpVlnAiQQrJiJV9xGQfO7ILIInXUTlvDO -YUX8hyj7viIJ8WWAZ0RLFnmPSB+A/gde4wMj+tFkVTFgssGl/LWNqgYNGjRo0KBBgwYNGjRo0KBB -gwYNGjRo0KBBw1eEfwH4UoBHAKAAAA==" | base64 --decode | tar xzf - - which systemctl > /dev/null 2>&1 - case $? in - 0) - # Jessie|Stretch|Xenial|Bionic - systemctl enable rpimonitor-helper > /dev/null 2>&1 - systemctl start rpimonitor-helper > /dev/null 2>&1 - systemctl restart rpimonitor > /dev/null 2>&1 - ;; - *) - # Wheezy|Trusty - insserv rpimonitor-helper > /dev/null 2>&1 || update-rc.d rpimonitor-helper defaults 90 10 > /dev/null 2>&1 - cd /tmp && nohup /usr/local/sbin/rpimonitor-helper.sh & - > /dev/null 2>&1 - /etc/init.d/rpimonitor stop > /dev/null 2>&1 - /etc/init.d/rpimonitor start > /dev/null 2>&1 - ;; - esac -} # PatchRPiMonitor_for_sun8i - CollectSupportInfo() { [[ -s /var/log/armbian-hardware-monitor.log ]] && cat /var/log/armbian-hardware-monitor.log || zcat /var/log/armbian-hardware-monitor.log.1.gz 2> /dev/null [[ -f /boot/armbianEnv.txt ]] && LOGLEVEL=$(awk -F'=' '/^verbosity/ {print $2}' /boot/armbianEnv.txt) From 1ee165a8abbab46a825f2b9ba32c97ae2bcde322 Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Sun, 1 Feb 2026 12:43:10 +0000 Subject: [PATCH 02/10] split uploading debug info into dedicated tool --- packages/bsp/common/usr/bin/armbian-debug | 159 +++++++++++++++++++++ packages/bsp/common/usr/bin/armbianmonitor | 136 +++--------------- 2 files changed, 180 insertions(+), 115 deletions(-) create mode 100755 packages/bsp/common/usr/bin/armbian-debug diff --git a/packages/bsp/common/usr/bin/armbian-debug b/packages/bsp/common/usr/bin/armbian-debug new file mode 100755 index 000000000000..b8f21262265a --- /dev/null +++ b/packages/bsp/common/usr/bin/armbian-debug @@ -0,0 +1,159 @@ +#!/bin/bash +# +# armbian-debug +# +# Collect and upload system debug information for Armbian support. +# Part of the Armbian project - https://www.armbian.com +# +############################################################################ + +# Config: +declare -a paste_servers=("paste.armbian.com" "paste.next.armbian.com" "paste.armbian.de") +if [[ "${PASTE_SERVER_HOST}" != "" ]]; then + echo "Using custom paste server: '${PASTE_SERVER_HOST}'" + paste_servers=("${PASTE_SERVER_HOST}" "${paste_servers[@]}") +fi + +# Set up colors if available +if test -t 1; then + ncolors=$(tput colors) + if test -n "$ncolors" && test $ncolors -ge 8; then + BOLD="$(tput bold)" + NC='\033[0m' # No Color + fi +fi + +Main() { + export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + + # Check if curl is available, install if not + if ! command -v curl > /dev/null 2>&1; then + echo "curl not found in PATH. Trying to install it..." >&2 + if [ "$(id -u)" = "0" ]; then + apt-get -f -y install curl + else + echo "Please install curl: sudo apt-get install curl" >&2 + exit 1 + fi + fi + + # 5 second countdown with option to force stdout output + force_stdout=false + echo -e "\n${BOLD}Collecting debug information for Armbian support${NC}" + echo -e "Press any key within 5 seconds to output to stdout instead of uploading..." + for i in {5..1}; do + echo -ne "\r$i seconds remaining... " + # Read with timeout (works in bash) + if read -s -n 1 -t 1; then + force_stdout=true + echo -e "\n${BOLD}Key pressed - will output to stdout${NC}\n" + break + fi + done + if [ "$force_stdout" = false ]; then + echo -e "\rStarting upload... " + fi + + # Collect and process the info + if [ "$force_stdout" = true ]; then + # Output to stdout with line numbers + CollectSupportInfo | + sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | + awk '!NF{$0=" "}1' | nl - + echo -e "\nPlease upload the ${BOLD}whole output${NC} above to an online pasteboard service\nand provide the URL in the forum where you have been asked for this.\n" + else + # Try to upload to paste servers + upload_success=false + + for paste_server in "${paste_servers[@]}"; do + echo "Collecting info and sending to ${paste_server}..." + declare -i counter=0 + { + LC_ALL=C date + echo "-----------------------------------------------------------------------------------------------------------------------------" + dmesg --color=always + echo "-----------------------------------------------------------------------------------------------------------------------------" + CollectSupportInfo || echo "Error collecting support info" + } | + sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | + curl -s --fail --data-binary @- "https://${paste_server}/log" + + # Check PIPESTATUS + for i in "${PIPESTATUS[@]}"; do + counter=$((counter + 1)) + if [[ $i -ne 0 ]]; then + echo "Failed (pipe ${counter} returned ${i})." + continue 2 + fi + done + + # If we get here, upload succeeded + upload_success=true + break + done + + if [ "$upload_success" = true ]; then + echo -e "\n${BOLD}Upload successful!${NC} Please post the URL above in the forum.\n" + else + echo -e "\n${BOLD}All upload attempts failed. Outputting to stdout instead:${NC}\n" + CollectSupportInfo | + sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | + awk '!NF{$0=" "}1' | nl - + echo -e "\nPlease upload the ${BOLD}whole output${NC} above to an online pasteboard service\nand provide the URL in the forum where you have been asked for this.\n" + fi + fi +} + +CollectSupportInfo() { + [[ -s /var/log/armbian-hardware-monitor.log ]] && cat /var/log/armbian-hardware-monitor.log || zcat /var/log/armbian-hardware-monitor.log.1.gz 2> /dev/null + [[ -f /boot/armbianEnv.txt ]] && LOGLEVEL=$(awk -F'=' '/^verbosity/ {print $2}' /boot/armbianEnv.txt) + LOGLEVEL=${LOGLEVEL:-1} + if [ ${LOGLEVEL} -gt 4 ]; then + VERBOSE='-v' + which lshw > /dev/null 2>&1 && ( + echo -e "\n### lshw:" + lshw -quiet -sanitize -numeric + ) + fi + lsusb > /dev/null 2>&1 && ( + echo -e "\n### lsusb:\n" + lsusb ${VERBOSE} 2> /dev/null + echo "" + lsusb -t 2> /dev/null + ) + lspci > /dev/null 2>&1 && ( + echo -e "\n### lspci:\n" + lspci ${VERBOSE} 2> /dev/null + ) + nvme > /dev/null 2>&1 && ( + echo -e "\n### nvme:\n" + nvme list 2> /dev/null + ) + [ -z $SUDO_USER ] || echo -e "\n### Group membership of $(groups $SUDO_USER)" + echo -en "\n### Userland" + [[ -f /etc/armbian-release ]] && echo -en " generated with Armbian Build Framework" + echo -en ":\n" + echo -e "\n$(grep PRETTY_NAME /etc/os-release)" + echo -e "\n### Installed packages:\n\n$(dpkg -l | grep -E "openmediavault|armbian| linux-")" + KernelVersion=$(awk -F" " '{print $3}' < /proc/version) + case ${KernelVersion} in + 3.*) + [[ -e /boot/script.bin ]] && echo -e "\n### fex settings: $(ls -la /boot/script.bin)\n\n$(bin2fex /boot/script.bin 2> /dev/null)" + ;; + esac + echo -e "\n### Loaded modules:\n\n$(lsmod)" + [[ -f /var/log/nand-sata-install.log ]] && echo -e "\n### nand-sata-install.log:\n\n$(cat /var/log/nand-sata-install.log)" + echo -e "\n### Current sysinfo:\n\n$(command -v iostat >/dev/null 2>&1 && iostat -p ALL | grep -v "^loop")\n\n$(vmstat -w)\n\n$(free -h)\n\n$(zramctl 2> /dev/null)\n\n$(uptime)\n\n$(dmesg | tail -n 250)" + echo -e "\n" + [[ "$(id -u)" -eq "0" ]] && for sysfsnode in /proc/sys/vm/*; do sysctl $(echo ${sysfsnode} | sed 's|/proc/sys/vm/|vm.|'); done + echo -e "\n### interrupts:\n$(cat /proc/interrupts)" + ls /tmp/armbianmonitor_checks_* > /dev/null 2>&1 || return 0 + for file in /tmp/armbianmonitor_checks_*; do + echo -e "\n### \c" + ls "${file}" | cut -f1 -d. + echo + cat "${file}" + done +} # CollectSupportInfo + +Main "$@" diff --git a/packages/bsp/common/usr/bin/armbianmonitor b/packages/bsp/common/usr/bin/armbianmonitor index c7ebb43d0ccf..572d4a1a4540 100755 --- a/packages/bsp/common/usr/bin/armbianmonitor +++ b/packages/bsp/common/usr/bin/armbianmonitor @@ -81,13 +81,6 @@ # ############################################################################ -# Config: -declare -a paste_servers=("paste.armbian.com" "paste.next.armbian.com" "paste.armbian.de") -if [[ "${PASTE_SERVER_HOST}" != "" ]]; then - echo "Using custom paste server: '${PASTE_SERVER_HOST}'" - paste_servers=("${PASTE_SERVER_HOST}" "${paste_servers[@]}") -fi - Main() { export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin @@ -156,52 +149,24 @@ ParseOptions() { NetworkMonitorMode ${OPTARG} exit 0 ;; - u) - # Upload /var/log/armbian-hardware-monitor.log with additional support info - # NOTE(rpardini): was here. briefly. just because this uses the paste server and I want ANSI dmesgs - # check if curl binary is available in path, if not try to install it. use command, not which - if ! command -v curl > /dev/null 2>&1; then - echo "curl not found in PATH. Trying to install it." >&2 - apt-get -f -y install curl + u | U) + # DEPRECATED: Support info collection has been moved to armbian-debug + cat << 'EOF' + +The -u and -U options are deprecated. This functionality has been moved to the +dedicated 'armbian-debug' tool. + +Launching armbian-debug now... +EOF + # Check if armbian-debug exists + if [ -x /usr/bin/armbian-debug ]; then + exec /usr/bin/armbian-debug + elif [ -x "$(dirname "$0")/armbian-debug" ]; then + exec "$(dirname "$0")/armbian-debug" + else + echo "Error: armbian-debug not found." >&2 + exit 1 fi - # loop over the paste_servers; first to work wins. - for paste_server in "${paste_servers[@]}"; do # defined at top of file - echo "Collecting info and sending to ${paste_server}, wait..." - declare -i counter=0 - { - LC_ALL=C date # include timestamp - echo "-----------------------------------------------------------------------------------------------------------------------------" - dmesg --color=always # output in ANSI color. The paste service handles this. - echo "-----------------------------------------------------------------------------------------------------------------------------" - CollectSupportInfo || echo "Error collecting support info via CollectSupportInfo" - } | - # we obfuscate IPv4 addresses somehow but not too much, MAC addresses have to remain - # in clear since otherwise the log becomes worthless due to randomly generated - # addresses here and there that might conflict - sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | - curl -s --fail --data-binary @- "https://${paste_server}/log" - # Check PIPESTATUS to know if everything worked. Any non-zero exit status means something didn't work. - for i in "${PIPESTATUS[@]}"; do - counter=$((counter + 1)) - if [[ $i -ne 0 ]]; then - echo "Failed grabbing info (pipe ${counter} result ${i}) and sending to server ${paste_server}." - continue 2 # continue the outer loop (paste_servers) - fi - done - echo -e "Please post the URL in the forum where you've been asked for.\n" - exit 0 - done - - ;; - - U) - # Send support info to stdout to be uploaded manually. Add line numbers to prevent - # users being creative and supressing everything that's important - CollectSupportInfo | - sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | - awk '!NF{$0=" "}1' | nl - - echo -e "\nPlease upload the ${BOLD}whole output${NC} above to an online pasteboard service\nand provide the URL in the forum where you have been asked for this.\n" - exit 0 ;; d) # monitors write activity to disk @@ -266,7 +231,7 @@ DisplayUsage() { # grep "^#" "$0" | grep -v "^#\!/bin/bash" | sed 's/^#//' # fi echo - echo "Usage: $(basename $0) [-h] [-b] [-c \$path] [-d \$device] [-D] [-m] [-u]" + echo "Usage: $(basename $0) [-h] [-c \$path] [-d \$device] [-D] [-m] [-n] [-v] [-z]" echo echo "Options:" echo " -c /path/to/test Performs disk health/performance tests" @@ -276,10 +241,12 @@ DisplayUsage() { echo " -M Provides simple CLI monitoring - fixed-line output" echo " -n Provides simple CLI network monitoring - scrolling output" echo " -N Provides simple CLI network monitoring - fixed-line output" - echo " -u Tries to upload armbian-hardware-monitor.log for support purposes" echo " -v Tries to verify installed package integrity" echo " -z Runs a quick 7-zip benchmark to estimate CPU performance" echo + echo "Note: The -u/-U options for support info upload are deprecated." + echo " Use the 'armbian-debug' command instead." + echo } # DisplayUsage @@ -686,67 +653,6 @@ CreateTempDir() { done } #CreateTempFiles -CollectSupportInfo() { - [[ -s /var/log/armbian-hardware-monitor.log ]] && cat /var/log/armbian-hardware-monitor.log || zcat /var/log/armbian-hardware-monitor.log.1.gz 2> /dev/null - [[ -f /boot/armbianEnv.txt ]] && LOGLEVEL=$(awk -F'=' '/^verbosity/ {print $2}' /boot/armbianEnv.txt) - LOGLEVEL=${LOGLEVEL:-1} - if [ ${LOGLEVEL} -gt 4 ]; then - VERBOSE='-v' - which lshw > /dev/null 2>&1 && ( - echo -e "\n### lshw:" - lshw -quiet -sanitize -numeric - ) - fi - lsusb > /dev/null 2>&1 && ( - echo -e "\n### lsusb:\n" - lsusb ${VERBOSE} 2> /dev/null - echo "" - lsusb -t 2> /dev/null - ) - lspci > /dev/null 2>&1 && ( - echo -e "\n### lspci:\n" - lspci ${VERBOSE} 2> /dev/null - ) - nvme > /dev/null 2>&1 && ( - echo -e "\n### nvme:\n" - nvme list 2> /dev/null - ) - [ -z $SUDO_USER ] || echo -e "\n### Group membership of $(groups $SUDO_USER)" - echo -en "\n### Userland" - [[ -f /etc/armbian-release ]] && echo -en " generated with Armbian Build Framework" - echo -en ":\n" - echo -e "\n$(grep PRETTY_NAME /etc/os-release)" - echo -e "\n### Installed packages:\n\n$(dpkg -l | grep -E "openmediavault|armbian| linux-")" - KernelVersion=$(awk -F" " '{print $3}' < /proc/version) - case ${KernelVersion} in - 3.*) - [[ -e /boot/script.bin ]] && echo -e "\n### fex settings: $(ls -la /boot/script.bin)\n\n$(bin2fex /boot/script.bin 2> /dev/null)" - ;; - esac - echo -e "\n### Loaded modules:\n\n$(lsmod)" - [[ -f /var/log/nand-sata-install.log ]] && echo -e "\n### nand-sata-install.log:\n\n$(cat /var/log/nand-sata-install.log)" - echo -e "\n### Current system health:\n\n$("$0" -s | grep -E "^Time|^[0-9]")" - stress -t 3 -c $(grep -c processor /proc/cpuinfo) --backoff 250 > /dev/null 2>&1 & - "$0" -s | grep "^[0-9]" - # Include name resolving information only if upload is not possible - fping ix.io 2> /dev/null | grep -q alive || - [ -f /etc/resolv.conf ] && echo -e "\n### resolv.conf\n\n$( - ls -la /etc/resolv.conf - cat /etc/resolv.conf - )" || - echo -e "\n### resolv.conf does not exist or readable" - echo -e "\n### Current sysinfo:\n\n$(command -v iostat >/dev/null 2>&1 && iostat -p ALL | grep -v "^loop")\n\n$(vmstat -w)\n\n$(free -h)\n\n$(zramctl 2> /dev/null)\n\n$(uptime)\n\n$(dmesg | tail -n 250)" - echo -e "\n" - [[ "$(id -u)" -eq "0" ]] && for sysfsnode in /proc/sys/vm/*; do sysctl $(echo ${sysfsnode} | sed 's|/proc/sys/vm/|vm.|'); done - echo -e "\n### interrupts:\n$(cat /proc/interrupts)" - ls /tmp/armbianmonitor_checks_* > /dev/null 2>&1 || return - for file in /tmp/armbianmonitor_checks_*; do - echo -e "\n### \c" - ls "${file}" | cut -f1 -d. - echo - cat "${file}" - done -} # CollectSupportInfo CheckCard() { if [ "$(id -u)" = "0" ]; then From 0ac9c6b8d30fcd362116360227ea39282ef1641d Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Sun, 1 Feb 2026 12:54:14 +0000 Subject: [PATCH 03/10] fix a bunch of more or less significant issues --- packages/bsp/common/usr/bin/armbian-debug | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/bsp/common/usr/bin/armbian-debug b/packages/bsp/common/usr/bin/armbian-debug index b8f21262265a..feac084894bc 100755 --- a/packages/bsp/common/usr/bin/armbian-debug +++ b/packages/bsp/common/usr/bin/armbian-debug @@ -78,8 +78,11 @@ Main() { sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | curl -s --fail --data-binary @- "https://${paste_server}/log" + # Save PIPESTATUS before any other command + pipe_status=("${PIPESTATUS[@]}") + # Check PIPESTATUS - for i in "${PIPESTATUS[@]}"; do + for i in "${pipe_status[@]}"; do counter=$((counter + 1)) if [[ $i -ne 0 ]]; then echo "Failed (pipe ${counter} returned ${i})." @@ -93,7 +96,7 @@ Main() { done if [ "$upload_success" = true ]; then - echo -e "\n${BOLD}Upload successful!${NC} Please post the URL above in the forum.\n" + echo -e "\n${BOLD}Upload successful!${NC} Please post the URL at the place where you have been asked for.\n" else echo -e "\n${BOLD}All upload attempts failed. Outputting to stdout instead:${NC}\n" CollectSupportInfo | @@ -108,7 +111,7 @@ CollectSupportInfo() { [[ -s /var/log/armbian-hardware-monitor.log ]] && cat /var/log/armbian-hardware-monitor.log || zcat /var/log/armbian-hardware-monitor.log.1.gz 2> /dev/null [[ -f /boot/armbianEnv.txt ]] && LOGLEVEL=$(awk -F'=' '/^verbosity/ {print $2}' /boot/armbianEnv.txt) LOGLEVEL=${LOGLEVEL:-1} - if [ ${LOGLEVEL} -gt 4 ]; then + if [ "$LOGLEVEL" -gt 4 ]; then VERBOSE='-v' which lshw > /dev/null 2>&1 && ( echo -e "\n### lshw:" @@ -129,23 +132,21 @@ CollectSupportInfo() { echo -e "\n### nvme:\n" nvme list 2> /dev/null ) - [ -z $SUDO_USER ] || echo -e "\n### Group membership of $(groups $SUDO_USER)" + [ -z "$SUDO_USER" ] || echo -e "\n### Group membership of $(groups "$SUDO_USER")" echo -en "\n### Userland" [[ -f /etc/armbian-release ]] && echo -en " generated with Armbian Build Framework" echo -en ":\n" echo -e "\n$(grep PRETTY_NAME /etc/os-release)" echo -e "\n### Installed packages:\n\n$(dpkg -l | grep -E "openmediavault|armbian| linux-")" - KernelVersion=$(awk -F" " '{print $3}' < /proc/version) - case ${KernelVersion} in - 3.*) - [[ -e /boot/script.bin ]] && echo -e "\n### fex settings: $(ls -la /boot/script.bin)\n\n$(bin2fex /boot/script.bin 2> /dev/null)" - ;; - esac echo -e "\n### Loaded modules:\n\n$(lsmod)" [[ -f /var/log/nand-sata-install.log ]] && echo -e "\n### nand-sata-install.log:\n\n$(cat /var/log/nand-sata-install.log)" echo -e "\n### Current sysinfo:\n\n$(command -v iostat >/dev/null 2>&1 && iostat -p ALL | grep -v "^loop")\n\n$(vmstat -w)\n\n$(free -h)\n\n$(zramctl 2> /dev/null)\n\n$(uptime)\n\n$(dmesg | tail -n 250)" echo -e "\n" - [[ "$(id -u)" -eq "0" ]] && for sysfsnode in /proc/sys/vm/*; do sysctl $(echo ${sysfsnode} | sed 's|/proc/sys/vm/|vm.|'); done + if [[ "$(id -u)" -eq "0" ]]; then + for sysfsnode in /proc/sys/vm/*; do + sysctl "${sysfsnode/\/proc\/sys\/vm\//vm.}" + done + fi echo -e "\n### interrupts:\n$(cat /proc/interrupts)" ls /tmp/armbianmonitor_checks_* > /dev/null 2>&1 || return 0 for file in /tmp/armbianmonitor_checks_*; do From 6cdc0dd04f5e1d7fde2ee537349b88e0b018158a Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Sun, 1 Feb 2026 13:09:32 +0000 Subject: [PATCH 04/10] shrink readme, remove dead code, remove debug mode, remove 7z benchmark -D was referencing to ix.io which has been dead for years now and nobody complained 7z benchmark was interesting years ago when sbcs weren't as powerful as they are today. Perhaps also here reference to sbcbench for proper results. --- packages/bsp/common/usr/bin/armbianmonitor | 175 +++------------------ 1 file changed, 23 insertions(+), 152 deletions(-) diff --git a/packages/bsp/common/usr/bin/armbianmonitor b/packages/bsp/common/usr/bin/armbianmonitor index 572d4a1a4540..2f98c048eb2e 100755 --- a/packages/bsp/common/usr/bin/armbianmonitor +++ b/packages/bsp/common/usr/bin/armbianmonitor @@ -2,82 +2,33 @@ # # armbianmonitor # -# This script serves different purposes based on how it is called: +# System monitoring and debugging utility for Armbian. +# Part of the Armbian project - https://www.armbian.com # -# - toggle boot verbosity (works) -# - monitoring mode: continually print monitoring info (WiP) -# - uploading /var/log/armbian-hardware-monitor.log to online pastebin service +# Features: +# - Live system monitoring (CPU, temp, voltage, etc.) +# - Network monitoring +# - Disk I/O monitoring +# - Disk health/performance testing +# - Package integrity verification # -# Without arguments called it should present a simple user -# interface that guides through: +# For support info collection and upload, use 'armbian-debug'. # -# - installation of RPi-Monitor if not already installed by user -# - active basic or more verbose monitoring mode -# - provides monitoring parameters for connected disks +# Disk Configuration Format: +# When checking disks, proposals are generated for /etc/armbianmonitor/disks.conf: # -# The second part is WiP and all the user interaction part -# still completely missing. +# ${GUID}:${Name}:${smartctl_prefix}:${temp_call}:${CRC}:${LCC} # -# This script is used to configure armbianmonitor behaviour. -# It will ask the user whether to activate monitoring or not, -# whether to enable debug monitoring and also how to deal with -# connected disks. In fact it walks through the list of available -# disks, checks them, tries to patch hddtemp.db if necessary -# and provides a proposal for /etc/armbianmonitor/disks.conf -# when a new disk is found. +# Fields: +# - GUID: Disk identifier from gdisk +# - Name: Display name (defaults to device model) +# - smartctl_prefix: USB disk type prefix (e.g., '-d sat', '-d usbjmicron') +# - temp_call: Command to get temperature (omit to use hddtemp) +# - CRC: S.M.A.R.T. attribute number for CRC errors +# - LCC: S.M.A.R.T. attribute number for load cycle count # -# In case monitoring should be activated the following file -# will be created: /etc/armbianmonitor/start-monitoring. If -# debug output has been chosen, then DEBUG will be written to -# the file. -# -# The script will install smartmontools/gdisk if not already -# installed and patches smartmontools' update-smart-drivedb -# script if necessary. For disks the 'device model' will be -# shown but internally we rely always on the GUID. This is the -# key for entry in /etc/armbianmonitor/disks.conf -# -# When the script exits and the user activated monitoring it -# recommends doing a restart since on the next reboot the -# setup-armbian-monitoring-environment script will configure -# monitoring sources and decides based on the existence and -# contents of /etc/armbianmonitor/start-monitoring whether -# rpimonitord should be started or not. -# -# The format of /etc/armbianmonitor/disks.conf is as follows: -# -# ${GUID}:${Name}:${smartctl prefix}:${temp call}:${CRC}:${LCC} -# -# Two examples: -# -# A57BF307-7D82-4783-BD1D-B346CA8C195B:WD Green::199:193 # WD HDD on SATA -# F8D372DC-63DB-494B-B802-87DC47FAD4E1:Samsung EVO:sat::199: # SSD in USB enclosure -# -# - GUID is the GUID as determined by gdisk -# - 'Name': The name as it will later be shown in RPi-Monitor, defaults to -# the 'device model' read out through smartctl but can be changed to -# be more significant (beware that this string must contain colons!) -# - "smartctl prefix" can be empty or should be the the necessary prefix for -# USB disks, eg. '-d sat' or '-d usbjmicron' and so on -- please have a -# look at https://www.smartmontools.org/wiki/Supported_USB-Devices -# - "temp call" when being omitted indicates that hddtemp should be used. -# Otherwise it should contain the complete command line ('DISK' will be -# dynamically replaced by the device node when the actual monitoring -# happens), for example: -# /sbin/hdparm -C DISK | grep -Eq "standby|sleeping" || \ -# /usr/sbin/smartctl -d sat -a DISK | awk -F" " '/Temperature_Cel/ {printf $10}' -# - 'CRC attribute': The decimal value of the S.M.A.R.T. attribute that -# is used to store the count of checksum errors between disk and host -# controller (might be omitted if the drive doesn't support it) -# - 'LCC attribute': The decimal value of the S.M.A.R.T. attribute that -# should contain the load cycle counter value (might be omitted -# if the drive doesn't support it) -# -# TODO: -# -# - develop main functionality ;) asking the user regarding monitoring -# - deal with 'SMART overall-health self-assessment test result:' -# - write documentation +# Example: +# A57BF307-7D82-4783-BD1D-B346CA8C195B:WD Green::199:193 # ############################################################################ @@ -102,29 +53,10 @@ Main() { ) ParseOptions "$@" - - exit 0 - PreRequisits - - # check whether user runs rpimonitord on his own or we activated it - if [ -f /etc/armbianmonitor/start-monitoring ]; then - # we should already provide monitoring, check whether DEBUG - # is also set - ArmbianMonitoring=TRUE - read -r DebugMode < /etc/armbianmonitor/start-monitoring 2> /dev/null - fi - - # check whether rpimonitord is running and compare with ${ArmbianMonitoring} - # In case the user chose to run rpimonitord on his own, we skip the config - # part and only output disk info - : - - # check available disk devices - CheckDisks } # Main ParseOptions() { - while getopts 'hHuUrRmMsnNd:Dc:C:pPvz' c; do + while getopts 'hHuUrRmMsnNd:c:C:pPv' c; do case ${c} in H) # display full help test @@ -173,31 +105,6 @@ EOF MonitorIO "${OPTARG}" exit 0 ;; - D) - fping ix.io 2> /dev/null | grep -q alive || - ( - echo "Network/firewall problem detected. Please fix this prior to installing RPi-Monitor." >&2 - exit 1 - ) - DebugOutput="$(mktemp /tmp/${0##*/}.XXXXXX)" - trap "rm \"${DebugOutput}\" ; exit 0" 0 1 2 3 15 - set -x - exec 2> "${DebugOutput}" - PreRequisits > /dev/null 2>&1 - CheckDisks - which curl > /dev/null 2>&1 || apt-get -f -qq -y install curl - echo -e "\nDebug output has been collected at the following URL: \c" - ( - cat "${DebugOutput}" - echo -e "\n\n\ngdisk.txt contents:\n" - cat "${MyTempDir}/gdisk.txt" - echo -e "\n\n\nsmartctl.txt contents:\n" - cat "${MyTempDir}/smartctl.txt" - ) | - curl -F 'f:1=<-' ix.io - echo -e "Please post the URL in the Armbian forum where you've been asked for." - exit 0 - ;; c | C) # check card mode CheckCard "${OPTARG}" @@ -209,12 +116,6 @@ EOF VerifyInstallation exit 0 ;; - z) - # Do a quick 7-zip benchmark to estimate CPU performance - runs=$2 - Run7ZipBenchmark 2> /dev/null - exit 0 - ;; *) echo "Invalid flag: ${c}" >&2 exit 7 @@ -231,18 +132,16 @@ DisplayUsage() { # grep "^#" "$0" | grep -v "^#\!/bin/bash" | sed 's/^#//' # fi echo - echo "Usage: $(basename $0) [-h] [-c \$path] [-d \$device] [-D] [-m] [-n] [-v] [-z]" + echo "Usage: $(basename $0) [-h] [-c \$path] [-d \$device] [-m] [-n] [-v]" echo echo "Options:" echo " -c /path/to/test Performs disk health/performance tests" echo " -d Monitors writes to \$device" - echo " -D Tries to upload debug disk info to improve armbianmonitor" echo " -m Provides simple CLI monitoring - scrolling output" echo " -M Provides simple CLI monitoring - fixed-line output" echo " -n Provides simple CLI network monitoring - scrolling output" echo " -N Provides simple CLI network monitoring - fixed-line output" echo " -v Tries to verify installed package integrity" - echo " -z Runs a quick 7-zip benchmark to estimate CPU performance" echo echo "Note: The -u/-U options for support info upload are deprecated." echo " Use the 'armbian-debug' command instead." @@ -932,32 +831,4 @@ kickAllStatsDown() { cnt=0 } -Run7ZipBenchmark() { - echo -e "Preparing benchmark. Be patient please..." - # Do a quick 7-zip benchmark, check whether binary is there. If not install it - MyTool=$(which 7za || which 7zr) - [ -z "${MyTool}" ] && apt-get -f -qq -y install p7zip && MyTool=/usr/bin/7zr - [ -z "${MyTool}" ] && ( - echo "No 7-zip binary found and could not be installed. Aborting" >&2 - exit 1 - ) - # Send CLI monitoring to the background to be able to spot throttling and other problems - MonitoringOutput="$(mktemp /tmp/${0##*/}.XXXXXX)" - trap "rm \"${MonitoringOutput}\" ; exit 0" 0 1 2 3 15 - armbianmonitor -m > ${MonitoringOutput} & - MonitoringPID=$! - # run 7-zip benchmarks after waiting 10 seconds to spot whether the system was idle before. - # We run the benchmark a single time by default unless otherwise specified on the command line - RunHowManyTimes=${runs:-1} - sleep 10 - for ((i = 1; i <= RunHowManyTimes; i++)); do - "${MyTool}" b - done - # report CLI monitoring results as well - kill ${MonitoringPID} - echo -e "\nMonitoring output recorded while running the benchmark:\n" - sed -e '/^\s*$/d' -e '/^Stop/d' < ${MonitoringOutput} - echo -e "\n" -} # Run7ZipBenchmark - Main "$@" From 56fd55f3d4ac2c77e82fd24d05c61565f9c37368 Mon Sep 17 00:00:00 2001 From: Werner <3305006+EvilOlaf@users.noreply.github.com> Date: Mon, 2 Feb 2026 05:49:54 +0100 Subject: [PATCH 05/10] yaps - yet another paste service well...actually has been there for a while.. --- packages/bsp/common/usr/bin/armbian-debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bsp/common/usr/bin/armbian-debug b/packages/bsp/common/usr/bin/armbian-debug index feac084894bc..a374bf915ea4 100755 --- a/packages/bsp/common/usr/bin/armbian-debug +++ b/packages/bsp/common/usr/bin/armbian-debug @@ -8,7 +8,7 @@ ############################################################################ # Config: -declare -a paste_servers=("paste.armbian.com" "paste.next.armbian.com" "paste.armbian.de") +declare -a paste_servers=("paste.armbian.com" "paste.next.armbian.com" "paste.armbian.de" "paste.armbian.eu") if [[ "${PASTE_SERVER_HOST}" != "" ]]; then echo "Using custom paste server: '${PASTE_SERVER_HOST}'" paste_servers=("${PASTE_SERVER_HOST}" "${paste_servers[@]}") From 0cd97e68c42f72310079144b58443392f3bb5710 Mon Sep 17 00:00:00 2001 From: Werner <3305006+EvilOlaf@users.noreply.github.com> Date: Mon, 2 Feb 2026 05:54:32 +0100 Subject: [PATCH 06/10] wording/copyright --- packages/bsp/common/usr/bin/armbian-debug | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/bsp/common/usr/bin/armbian-debug b/packages/bsp/common/usr/bin/armbian-debug index a374bf915ea4..13aa903572e3 100755 --- a/packages/bsp/common/usr/bin/armbian-debug +++ b/packages/bsp/common/usr/bin/armbian-debug @@ -1,9 +1,8 @@ #!/bin/bash # -# armbian-debug +# Copyright (c) Authors: https://www.armbian.com/authors # # Collect and upload system debug information for Armbian support. -# Part of the Armbian project - https://www.armbian.com # ############################################################################ @@ -60,7 +59,7 @@ Main() { CollectSupportInfo | sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | awk '!NF{$0=" "}1' | nl - - echo -e "\nPlease upload the ${BOLD}whole output${NC} above to an online pasteboard service\nand provide the URL in the forum where you have been asked for this.\n" + echo -e "\nPlease upload the ${BOLD}whole output${NC} above to an online pasteboard service\nand provide the URL at the place where you have been asked for this.\n" else # Try to upload to paste servers upload_success=false From fa4cff6c53d8197d1fe408da8392ca904b59b56a Mon Sep 17 00:00:00 2001 From: Werner <3305006+EvilOlaf@users.noreply.github.com> Date: Mon, 2 Feb 2026 05:55:39 +0100 Subject: [PATCH 07/10] also copyright here --- packages/bsp/common/usr/bin/armbianmonitor | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/bsp/common/usr/bin/armbianmonitor b/packages/bsp/common/usr/bin/armbianmonitor index 2f98c048eb2e..707581c6b0bb 100755 --- a/packages/bsp/common/usr/bin/armbianmonitor +++ b/packages/bsp/common/usr/bin/armbianmonitor @@ -1,9 +1,8 @@ #!/bin/bash # -# armbianmonitor +# Copyright (c) Authors: https://www.armbian.com/authors # # System monitoring and debugging utility for Armbian. -# Part of the Armbian project - https://www.armbian.com # # Features: # - Live system monitoring (CPU, temp, voltage, etc.) From 373c549e6eff8ead1b538bba17627b65155ddecf Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Tue, 17 Feb 2026 17:15:07 +0000 Subject: [PATCH 08/10] fix two issues this code hasn't been touched by me I believe, so these bugs must have been present for a loooong time... --- packages/bsp/common/usr/bin/armbianmonitor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bsp/common/usr/bin/armbianmonitor b/packages/bsp/common/usr/bin/armbianmonitor index 707581c6b0bb..748efffb2c60 100755 --- a/packages/bsp/common/usr/bin/armbianmonitor +++ b/packages/bsp/common/usr/bin/armbianmonitor @@ -633,7 +633,7 @@ CheckCard() { if [ "X$2" = "XMB/s" ]; then RawReadSpead=$(echo "$1 * 1000" | bc -s | cut -f1 -d.) else - RawReadSpead$(echo "$1" | cut -f1 -d.) + RawReadSpead=$(echo "$1" | cut -f1 -d.) fi echo -e "\n${NC}${BOLD}Performance summary:${NC}\nSequential reading speed:$(printf "%6s" $1) $2 \c" [ ${RawReadSpead} -le 2500 ] && Exclamation="${LRED}${BOLD}way " || Exclamation="" @@ -715,6 +715,9 @@ NetworkMonitorMode() { # Allow armbianmonitor to return back to armbian-config trap "echo ; exit 0" 0 1 2 3 15 + # Ensure net-tools is installed for 'route' command + which route > /dev/null 2>&1 || (apt-get update && apt-get -f -y install net-tools) + # Count interfaces - multiple routes causing interfaces to show up more than once, filtering... ifacecount=$(route -n | grep -E UG | grep -Eo '[^ ]*$' | sort | uniq) # If there are two ore more interfaces detected open a dynamic dialog box to select which to monitor From a802809679eae7e0248708c874e2cd3d1d7219b2 Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Tue, 17 Feb 2026 17:22:35 +0000 Subject: [PATCH 09/10] add timeout for `curl` --- packages/bsp/common/usr/bin/armbian-debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bsp/common/usr/bin/armbian-debug b/packages/bsp/common/usr/bin/armbian-debug index 13aa903572e3..06b8638fb10b 100755 --- a/packages/bsp/common/usr/bin/armbian-debug +++ b/packages/bsp/common/usr/bin/armbian-debug @@ -75,7 +75,7 @@ Main() { CollectSupportInfo || echo "Error collecting support info" } | sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' | - curl -s --fail --data-binary @- "https://${paste_server}/log" + curl -s --fail --connect-timeout 10 --max-time 30 --data-binary @- "https://${paste_server}/log" # Save PIPESTATUS before any other command pipe_status=("${PIPESTATUS[@]}") From 2c2b543a56868cca60e9b0dfd6030c321567000c Mon Sep 17 00:00:00 2001 From: EvilOlaf Date: Tue, 17 Feb 2026 17:24:50 +0000 Subject: [PATCH 10/10] move message to more sane place --- packages/bsp/common/usr/bin/armbianmonitor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bsp/common/usr/bin/armbianmonitor b/packages/bsp/common/usr/bin/armbianmonitor index 748efffb2c60..bd5da6bbd511 100755 --- a/packages/bsp/common/usr/bin/armbianmonitor +++ b/packages/bsp/common/usr/bin/armbianmonitor @@ -86,13 +86,13 @@ ParseOptions() { The -u and -U options are deprecated. This functionality has been moved to the dedicated 'armbian-debug' tool. - -Launching armbian-debug now... EOF # Check if armbian-debug exists if [ -x /usr/bin/armbian-debug ]; then + echo "Launching armbian-debug now..." exec /usr/bin/armbian-debug elif [ -x "$(dirname "$0")/armbian-debug" ]; then + echo "Launching armbian-debug now..." exec "$(dirname "$0")/armbian-debug" else echo "Error: armbian-debug not found." >&2