version 1.8, 2010/11/01 03:20:17 |
version 1.10, 2014/11/08 20:32:08 |
|
|
#!/bin/sh |
#!/bin/sh |
# $AFresh1: send_dmesg,v 1.7 2010/06/29 20:34:54 andrew Exp $ |
# $AFresh1: send_dmesg,v 1.9 2012/04/19 04:05:38 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` |
|
tmpfile=`mktemp` |
[ -z "$SUBJECT" ] && SUBJECT=unknown |
[ -z "$SUBJECT" ] && SUBJECT=unknown |
#echo ${SUBJECT} |
cat /var/run/dmesg.boot > $tmpfile |
( cat /var/run/dmesg.boot; sysctl hw.sensors ) | mail -s "dmesg for ${SUBJECT}" root |
echo \$ usbdevs -v | tee -a $tmpfile |
|
usbdevs -v >> $tmpfile |
|
echo \$ pcidump | tee -a $tmpfile |
|
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 |
echo Sent dmesg to root |