source: src-sh/pc-extractoverlay/ports-overlay/usr/local/bin/ixinitdiag @ 90ae8ad

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 90ae8ad was 90ae8ad, checked in by Kris Moore <kris@…>, 13 months ago

Enable diagnostics report submission, will be used with
crash-dumps for debugging kernel panics and such

  • Property mode set to 100755
File size: 1.3 KB
Line 
1#!/bin/sh
2# Script to upload the initial system diagonostics report
3#
4# No personal data is contained in this report, it is just
5# used for crash dump diagnostics and metrics
6########################################################
7
8DIAGFILE=`mktemp /tmp/.diagFile.XXXXXX` || exit 1
9
10# Create the diagnostics file now
11echo "hostid: `cat /etc/hostid`" > ${DIAGFILE}
12echo "#########################" >> ${DIAGFILE}
13
14echo "dmesg output:" >> ${DIAGFILE}
15echo "#########################" >> ${DIAGFILE}
16dmesg >> ${DIAGFILE}
17echo "#########################" >> ${DIAGFILE}
18
19echo "pkg output:" >> ${DIAGFILE}
20echo "#########################" >> ${DIAGFILE}
21pkg info >> ${DIAGFILE}
22echo "#########################" >> ${DIAGFILE}
23
24echo "gpart output:" >> ${DIAGFILE}
25echo "#########################" >> ${DIAGFILE}
26gpart show >> ${DIAGFILE}
27echo "#########################" >> ${DIAGFILE}
28
29echo "pciconf output:" >> ${DIAGFILE}
30echo "#########################" >> ${DIAGFILE}
31pciconf -lv >> ${DIAGFILE}
32echo "#########################" >> ${DIAGFILE}
33
34echo "zpool status output:" >> ${DIAGFILE}
35echo "#########################" >> ${DIAGFILE}
36zpool status >> ${DIAGFILE}
37echo "#########################" >> ${DIAGFILE}
38
39/usr/local/bin/crashuploader $DIAGFILE
40if [ $? -eq 0 ] ; then
41   # Good upload? Ok, we can ignore this from now on
42   touch /var/db/ix_diag_init
43fi
44rm $DIAGFILE
Note: See TracBrowser for help on using the repository browser.