From 352ca6584bcb1aa2742da08fbadc46f6415e643c Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Wed, 26 Mar 2008 19:56:40 +0000 Subject: Merged revisions 111129 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r111129 | file | 2008-03-26 16:55:08 -0300 (Wed, 26 Mar 2008) | 6 lines Update autosupport script. (closes issue #12310) Reported by: angler Patches: autosupport.diff uploaded by angler (license 106) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111130 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- contrib/scripts/autosupport | 79 ++++++++++++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 22 deletions(-) (limited to 'contrib/scripts') diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport index 557ca6ce2..99a9698b6 100644 --- a/contrib/scripts/autosupport +++ b/contrib/scripts/autosupport @@ -12,13 +12,16 @@ OUTPUT=$HOME/digiuminfo -if [ $UID -ne 0 ]; then +MYUID=$(id -u); + +if [ $MYUID -ne 0 ]; then echo "You must be root to run this." - -exit 1 + exit 1 fi +clear + echo echo "This will gather information about your system such as:" echo "pci listing, dmesg, running processes, and kernel version" @@ -31,23 +34,23 @@ if [ "$ans" = "y" ]; then rm -f $OUTPUT echo "------------------" >> $OUTPUT; - echo "PCI LIST " >> $OUTPUT; + echo "PCI LIST" >> $OUTPUT; echo "------------------" >> $OUTPUT; - lspci -vb >> $OUTPUT; + lspci -vvvb >> $OUTPUT; echo >> $OUTPUT; echo >> $OUTPUT; echo "------------------" >> $OUTPUT; - echo "INTERRUPTS" >> $OUTPUT; + echo "PCI LIST(no lookup)" >> $OUTPUT; echo "------------------" >> $OUTPUT; - cat /proc/interrupts >> $OUTPUT; + lspci -vvvbn >> $OUTPUT; echo >> $OUTPUT; echo >> $OUTPUT; echo "------------------" >> $OUTPUT; - echo "DMESG OUTPUT" >> $OUTPUT; + echo "INTERRUPTS" >> $OUTPUT; echo "------------------" >> $OUTPUT; - dmesg >> $OUTPUT; + cat /proc/interrupts >> $OUTPUT; echo >> $OUTPUT; echo >> $OUTPUT; @@ -73,10 +76,44 @@ if [ "$ans" = "y" ]; then echo >> $OUTPUT; echo "------------------" >> $OUTPUT; - echo "HDPARM STATUS" >> $OUTPUT; + echo "VERSION INFO" >> $OUTPUT; + echo "------------------" >> $OUTPUT; + cat /proc/version >> $OUTPUT; + echo >> $OUTPUT; + echo >> $OUTPUT; + + echo "------------------" >> $OUTPUT; + echo "CMDLINE INFO" >> $OUTPUT; + echo "------------------" >> $OUTPUT; + cat /proc/cmdline >> $OUTPUT; + echo >> $OUTPUT; + echo >> $OUTPUT; + + echo "------------------" >> $OUTPUT; + echo "LOADED MODULES" >> $OUTPUT; + echo "------------------" >> $OUTPUT; + lsmod >> $OUTPUT; + echo >> $OUTPUT; + echo >> $OUTPUT; + + echo "------------------" >> $OUTPUT; + echo "ZTTEST" >> $OUTPUT; + echo "------------------" >> $OUTPUT; + zttest -c 20 >> $OUTPUT; + echo >> $OUTPUT; + echo >> $OUTPUT; + + echo "------------------" >> $OUTPUT; + echo "DMESG OUTPUT" >> $OUTPUT; + echo "------------------" >> $OUTPUT; + dmesg >> $OUTPUT; + echo >> $OUTPUT; + echo >> $OUTPUT; + + echo "------------------" >> $OUTPUT; + echo "DMIDECODE" >> $OUTPUT; echo "------------------" >> $OUTPUT; - hdparm /dev/hda >> $OUTPUT; - hdparm -i /dev/hda >> $OUTPUT; + dmidecode >> $OUTPUT; echo >> $OUTPUT; echo >> $OUTPUT; @@ -101,22 +138,18 @@ if [ "$ans" = "y" ]; then echo >> $OUTPUT; echo >> $OUTPUT; - echo "------------------" >> $OUTPUT; - echo "ZTTEST" >> $OUTPUT; - echo "------------------" >> $OUTPUT; - /usr/src/zaptel/zttest -c 20 >> $OUTPUT; - echo >> $OUTPUT; - echo >> $OUTPUT; - else echo "terminated"; exit fi +clear + echo echo "Digium may require root level access to the system to help debug"; echo "the problem you are experiencing. Do you want to provide login"; -echo "information at this time?"; +echo "information at this time? Please note that if you do so, change"; +echo "your root password to a secure temporary password for Digium support"; echo "Press 'y' for yes and any other key to exit and save the previous info collected" read login @@ -146,15 +179,17 @@ if [ "$login" = "y" ]; then echo "Additional login info: "$adinfo >> $OUTPUT + clear echo echo "All information has been stored in $OUTPUT," - echo "Please attach this file to an email ticket you already" + echo "Please attach this file to an email case you already" echo "have open with Digium Tech Support." else + clear echo echo "All information except login info has been stored in $OUTPUT," - echo "Please send this file to an email ticket you already" + echo "Please send this file to an email case you already" echo "have open with Digium Tech Support." exit fi -- cgit v1.2.3