Minor logging/support tweaks

This commit is contained in:
ThomasKaiser
2017-11-22 11:32:12 +01:00
parent 3d9dd7b3be
commit 7dd3a3154a
2 changed files with 6 additions and 2 deletions

View File

@@ -284,7 +284,7 @@ log_hardware_info() {
cat /proc/meminfo >>${Log}
if [ -x /sbin/ip ]; then
echo -e "\n### ip addr:\n" >>${Log}
ip addr >>${Log}
/sbin/ip r s ; /sbin/ip a >>${Log}
echo " " >>${Log}
else
echo -e "\n### ifconfig:\n" >>${Log}
@@ -295,7 +295,7 @@ log_hardware_info() {
echo -e "\n### df:\n" >>${Log}
df -h >>${Log}
which zpool >/dev/null 2>&1 && echo -e "\n### zpools:\n\n$(zpool list)\n\n### zfs datasets:\n\n$(zfs list)" >>${Log}
echo -e "\n### blkid:\n" >>${Log}
echo -e "\n### lsblk:\n" >>${Log}
lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,UUID | grep -v "^zram" >>${Log}
echo -e "\n### mtab:\n" >>${Log}
egrep '^/dev/|\ zfs\ ' /etc/mtab | egrep -v "log2ram|folder2ram" | sort >>${Log}

View File

@@ -825,6 +825,10 @@ CollectSupportInfo() {
echo -e "\n### Current system health:\n\n$("$0" -s | egrep "^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 sprunge.us 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$(iostat -p ALL | grep -v "^loop")\n\n$(vmstat -w)\n\n$(free -h)\n\n$(uptime)\n\n$(dmesg | tail -n 250)"
echo -e "\n### interrupts:\n$(cat /proc/interrupts)"
ls /tmp/armbianmonitor_checks_* >/dev/null 2>&1 || return