3 # Collect support information
5 # Copyright (C) 2005, Digium, Inc.
7 # Written by John Bigelow (support@digium.com)
9 # Distributed under the terms of the GNU General Public
13 OUTPUT
=$HOME/digiuminfo
17 if [ $MYUID -ne 0 ]; then
19 echo "You must be root to run this."
26 echo "This will gather information about your system such as:"
27 echo "pci listing, dmesg, running processes, and kernel version"
28 echo "This may take up to half a minute to run. Please be patient."
29 echo "To continue press 'y', to quit press any other key"
32 if [ "$ans" = "y" ]; then
36 echo "------------------" >> $OUTPUT;
37 echo "PCI LIST" >> $OUTPUT;
38 echo "------------------" >> $OUTPUT;
39 lspci
-vvvb >> $OUTPUT;
43 echo "------------------" >> $OUTPUT;
44 echo "PCI LIST(no lookup)" >> $OUTPUT;
45 echo "------------------" >> $OUTPUT;
46 lspci
-vvvbn >> $OUTPUT;
50 echo "------------------" >> $OUTPUT;
51 echo "INTERRUPTS" >> $OUTPUT;
52 echo "------------------" >> $OUTPUT;
53 cat /proc
/interrupts
>> $OUTPUT;
57 echo "------------------" >> $OUTPUT;
58 echo "RUNNING PROCESSES" >> $OUTPUT;
59 echo "------------------" >> $OUTPUT;
64 echo "------------------" >> $OUTPUT;
65 echo "KERNEL VERSION" >> $OUTPUT;
66 echo "------------------" >> $OUTPUT;
71 echo "------------------" >> $OUTPUT;
72 echo "CPU INFO" >> $OUTPUT;
73 echo "------------------" >> $OUTPUT;
74 cat /proc
/cpuinfo
>> $OUTPUT;
78 echo "------------------" >> $OUTPUT;
79 echo "VERSION INFO" >> $OUTPUT;
80 echo "------------------" >> $OUTPUT;
81 cat /proc
/version
>> $OUTPUT;
85 echo "------------------" >> $OUTPUT;
86 echo "CMDLINE INFO" >> $OUTPUT;
87 echo "------------------" >> $OUTPUT;
88 cat /proc
/cmdline
>> $OUTPUT;
92 echo "------------------" >> $OUTPUT;
93 echo "KERNEL CONFIG" >> $OUTPUT;
94 echo "------------------" >> $OUTPUT;
95 echo "/lib/modules/$(uname -r)/build/.config:" >> $OUTPUT;
96 cat /lib
/modules
/$
(uname
-r)/build
/.config
>> $OUTPUT;
98 echo "/usr/src/linux/.config:" >> $OUTPUT;
99 cat /usr
/src
/linux
/.config
>> $OUTPUT;
103 echo "------------------" >> $OUTPUT;
104 echo "ZAPTEL MODULE INFO" >> $OUTPUT;
105 echo "------------------" >> $OUTPUT;
106 modinfo
/lib
/modules
/$
(uname
-r)/misc
/*.ko
>> $OUTPUT;
110 echo "------------------" >> $OUTPUT;
111 echo "OTHER INFO" >> $OUTPUT;
112 echo "------------------" >> $OUTPUT;
113 echo "/etc/*issues*:" >> $OUTPUT;
114 cat /etc
/*issues
* >> $OUTPUT;
116 echo "/etc/*release*:" >> $OUTPUT;
117 cat /etc
/*release
* >> $OUTPUT;
119 echo "/etc/*motd*:" >> $OUTPUT;
120 cat /etc
/*motd
* >> $OUTPUT;
124 echo "------------------" >> $OUTPUT;
125 echo "LOADED MODULES" >> $OUTPUT;
126 echo "------------------" >> $OUTPUT;
131 echo "------------------" >> $OUTPUT;
132 echo "ZTTEST" >> $OUTPUT;
133 echo "------------------" >> $OUTPUT;
134 zttest
-c 20 >> $OUTPUT;
138 echo "------------------" >> $OUTPUT;
139 echo "DMESG OUTPUT" >> $OUTPUT;
140 echo "------------------" >> $OUTPUT;
145 echo "------------------" >> $OUTPUT;
146 echo "DMIDECODE" >> $OUTPUT;
147 echo "------------------" >> $OUTPUT;
148 dmidecode
>> $OUTPUT;
152 echo "------------------" >> $OUTPUT;
153 echo "ZAPTEL CONFIG" >> $OUTPUT;
154 echo "------------------" >> $OUTPUT;
155 grep -v '^#' /etc
/zaptel.conf
>> $OUTPUT;
159 echo "------------------" >> $OUTPUT;
160 echo "ZAPATA CONFIG" >> $OUTPUT;
161 echo "------------------" >> $OUTPUT;
162 grep -v '^;' /etc
/asterisk
/zapata.conf
>> $OUTPUT;
166 echo "------------------" >> $OUTPUT;
167 echo "EXTENSIONS CONFIG" >> $OUTPUT;
168 echo "------------------" >> $OUTPUT;
169 grep -v '^;' /etc
/asterisk
/extensions.conf
>> $OUTPUT;
181 echo "Digium may require root level access to the system to help debug";
182 echo "the problem you are experiencing. Do you want to provide login";
183 echo "information at this time? Please note that if you do so, change";
184 echo "your root password to a secure temporary password for Digium support";
185 echo "Press 'y' for yes and any other key to exit and save the previous info collected"
188 if [ "$login" = "y" ]; then
190 echo "------------------" >> $OUTPUT;
191 echo "LOGIN INFORMATION" >> $OUTPUT;
192 echo "------------------" >> $OUTPUT;
195 echo "What is your root password?"
199 echo "Root pass: "$rootpass >> $OUTPUT
202 echo "What is your PUBLIC IP address?"
205 echo "IP address: "$ip >> $OUTPUT
208 echo "Please provide any other login information that the technician"
209 echo "may need to know to login to the system'(press enter if not)'"
212 echo "Additional login info: "$adinfo >> $OUTPUT
216 echo "All information has been stored in $OUTPUT,"
217 echo "Please attach this file to an email case you already"
218 echo "have open with Digium Tech Support."
223 echo "All information except login info has been stored in $OUTPUT,"
224 echo "Please send this file to an email case you already"
225 echo "have open with Digium Tech Support."