fix iostat on MINIMAL

`MINIMAL` do not have `iostat` so suppress the error occurring when doing `armbianmonitor -u` on such systems.
This commit is contained in:
Werner
2024-11-09 17:01:54 +01:00
committed by Igor
parent 0afd94a84b
commit fb261bb49b

View File

@@ -973,7 +973,7 @@ CollectSupportInfo() {
cat /etc/resolv.conf
)" ||
echo -e "\n### resolv.conf does not exist or readable"
echo -e "\n### Current sysinfo:\n\n$(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### 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)"