version 1.4, 2009/12/10 19:35:26 |
version 1.11, 2017/12/17 02:28:33 |
|
|
#!/bin/sh |
#!/bin/sh |
# $RedRiver: send_dmesg,v 1.3 2009/10/29 23:33:15 andrew Exp $ |
# $AFresh1: send_dmesg,v 1.10 2014/11/08 20:32:08 andrew Exp $ |
|
|
SUBJECT=`sysctl -n hw.vendor hw.product hw.version 2> /dev/null | xargs` |
SUBJECT=`sysctl -n hw.vendor hw.product hw.version 2> /dev/null | xargs` |
#echo ${SUBJECT} |
tmpfile=`mktemp` |
( dmesg; sysctl hw.sensors ) | mail -s "${SUBJECT}" root |
[ -z "$SUBJECT" ] && SUBJECT=unknown |
|
cat /var/run/dmesg.boot > $tmpfile |
|
echo \$ usbdevs -v | tee -a $tmpfile |
|
usbdevs -v >> $tmpfile |
|
echo \$ pcidump | tee -a $tmpfile |
|
doas -n pcidump >> $tmpfile |
|
echo \$ sysctl hw | tee -a $tmpfile |
|
sysctl hw >> $tmpfile |
|
echo \$ mixerctl | tee -a $tmpfile |
|
mixerctl >> $tmpfile |
|
echo \$ audioctl | tee -a $tmpfile |
|
audioctl >> $tmpfile |
|
echo \$ apm | tee -a $tmpfile |
|
apm >> $tmpfile |
|
echo \$ md5 -ttt | tee -a $tmpfile |
|
md5 -ttt >> $tmpfile |
|
|
|
mail -s "dmesg for ${SUBJECT}" root < $tmpfile |
|
cp $tmpfile dmesg.last |
|
rm -f $tmpfile |
|
|
|
echo Sent dmesg to root |