-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathultragrid-bugreport-collect.sh
executable file
·99 lines (73 loc) · 1.64 KB
/
ultragrid-bugreport-collect.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/local/bin:/opt/local/sbin:$PATH
DATE=`date +%y%m%d%H%M%S`
LOG=ultragrid-bugreport-$DATE.txt
export LC_ALL=C
#test "`id -nu`" = root || echo "You SHOULD run this script as a root!!" >&2
(
exec > "$LOG" || error "cannot create $LOG file"
exec 2>&1
exec < /dev/null
set -x
echo $DISPLAY
echo $LD_LIBRARY_PATH
echo $LD_PRELOAD_PATH
if [ ! "`uname -s`" = "Darwin"]; then
cat /etc/ld.so.conf
cat /etc/ld.so.conf.d/*
fi
if [ -f /etc/issue ]; then
cat /etc/issue
fi
if [ -f /proc/cpuinfo ]; then
cat /proc/cpuinfo
fi
if [ -x /usr/bin/sw_vers ]; then
/usr/bin/sw_vers
fi
uname -a
sysctl -a
ip -s -s link show ||| ifconfig
if [ -x /sbin/ethtool ]; then
for n in `ls /sys/class/net/`; do
ethtool $n
ethtool -S $n
done
fi
if [ -r /etc/sysctl.conf ]; then
cat /etc/sysctl.conf
fi
netstat -ni
netstat -s
netstat -rn
if [ "`uname -s`" = "Darwin"]; then
netstat -ln -f inet
netstat -ln -f inet6
else
netstat -ln -A inet
netstat -ln -A inet6
fi
if [ -x /sbin/iptables ]; then
iptables -L
fi
if [ -f /Library/Preferences/com.apple.alf ]; then
defaults get /Library/Preferences/com.apple.alf globalstate
fi
ps -ef
glxinfo | grep OpenGL
if [ -x /usr/bin/lspci ]; then
/usr/bin/lspci -vvvnn
fi
if [ -f /proc/asound/cards ]; then
cat /proc/asound/cards
fi
if [ -x /usr/bin/aplay ]; then
/usr/bin/aplay -L
fi
dmesg
for dir in /proc/dvsdriver_*/; do for file in $dir/*; do cat $file; done; done
)
gzip -f $LOG
echo >&2
echo Report $LOG.gz generated
chmod 666 $LOG.gz