echo '===MONITOR:dmesg===' DMESG_ERR=$(dmesg --level=err,crit,alert,emerg 2>/dev/null | tail -30 || true) if [ -n "$DMESG_ERR" ]; then echo 'status:fail' echo "output:${DMESG_ERR}" else echo 'status:pass' echo 'output:无硬件相关内核报错' fi echo '' echo '===END==='