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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
crashdc : an automated collection tool
======================================
How To Install
1. Installing crashdc
=====================
crashdc is delivered as a RPM so installation is trivial. RPM files can be
found here :
http://sourceforge.net/projects/crashdc/files/
If you decide to use the long and winding road and downloaded the tarball, then
copy the files in the directories where they belong which is :
/usr/bin/crashdc
/usr/bin/run-crashdc-rhel5.sh
/usr/bin/run-crashdc-sles10.sh
/usr/bin/run-crashdc-sles11.sh
/etc/init.d/crashdc
/etc/sysconfig/crashdc.rhel5
/etc/sysconfig/crashdc.sles10
/etc/sysconfig/crashdc.sles11
/usr/share/man/man8/crashdc.8.gz
/usr/share/man/man5/crashdc.5.gz
2. crashdc prerequisites
========================
The following packages must be present on the system :
* kexec-tools
* crash
* kernel-debuginfo-common-{version} (for RHEL5)
* kernel-debuginfo-{version}
3. Configuring crashdc
======================
The absence of autoconfiguration for crashdc during installation is a design
choice. We do not want to force any sysadmin to have scripts executed without
his knowledge when a system is recovering from crash. So the configuration must
be a deliberate action by the sysadmin.
Moreover, there is three ways of generating a crash-data-{date}.txt file :
* Automatic invokation by kdump at dump time
* Automatic execution of the init.d script at boot time
* Manual execution
All of those three methods require the same basic configuration steps which are
described here in more details.
For obvious reasons, kdump should already be configured and running on the host
where crashdc is to be configured.
3.1 Configuring crashdc on RHEL5
================================
3.1.1 Install crashdc
---------------------
Install the latest crashdc rpm :
rpm -vih crashdc-0.6-1.noarch.rpm
Copy the distribution specific crashdc configuration file :
cp /etc/sysconfig/crashdc.rhel5 /etc/sysconfig/crashdc
3.1.2 Configuring crashdc for kdump invokation
----------------------------------------------
Modify the /etc/kdump.conf file and uncomment the kdump_post variable. It should
look like this :
kdump_post /var/crash/scripts/kdump-post.sh
Create the /var/crash/scripts directory
mkdir /var/crash/scripts
Create a symlink in /var/crash/scripts pointing to the run-crashdc-rhel5.sh
script
ln -s /usr/bin/run-crashdc-rhel5.sh /var/crash/scripts/kdump-post.sh
Rebuild the initrd.img file
service kdump restart
3.1.3 Configuring crashdc for boot time execution
-------------------------------------------------
Enable automatic execution of the /etc/init.d/crashdc script at boot time
chkconfig crashdc on
This is all that needs to be done. We would strongly suggest to test the crashdc
mechanism once to make sure that it works as advertized.
3.2 Configuring crashdc on SLES10
=================================
3.2.1 Install crashdc
---------------------
Install the latest crashdc rpm :
rpm -vih crashdc-0.6-1.noarch.rpm
Rename the distribution specific crashdc configuration file :
cp /etc/sysconfig/crashdc.sles10 /etc/sysconfig/crashdc
3.2.2 Configuring crashdc for kdump invokation
----------------------------------------------
You must modify the /etc/sysconfig/kdump file to add the following line :
KDUMP_TRANSFER="/usr/bin/run-crashdc-sles.sh"
Modify the crashkernel= boot parameter present in your GRUB/LILO/EFI
configuration file so it uses at least 128M of reserved space :
crashkernel=128M@16M
*** WARNING *** : Any value underneath this is known to cause a hang of kexec
environment. If a hang happens while executing crashdc, you can force a restart
with a power-cycle.
The server needs to be rebooted for the crashkernel parameter to be taken into
account.
3.2.3 Configuring crashdc for boot time execution
-------------------------------------------------
Enable automatic execution of the /etc/init.d/crashdc script at boot time
chkconfig crashdc on
This is all that needs to be done. We would strongly suggest to test the crashdc
mechanism once to make sure that it works as advertized.
3.3 Configuring crashdc on SLES11
=================================
3.3.1 Install crashdc
---------------------
Install the latest crashdc rpm :
rpm -vih crashdc-0.6-1.noarch.rpm
Rename the distribution specific crashdc configuration file :
cp /etc/sysconfig/crashdc.sles11 /etc/sysconfig/crashdc
3.3.2 Configuring crashdc for kdump invokation
----------------------------------------------
Modify the /etc/sysconfig/kdump file and define the following variable with
_THIS EXACT SYNTAX_ :
kdump_required_programs="/etc/sysconfig/crashdc /bin/basename \
/usr/bin/strings /bin/echo /usr/bin/crash \
/usr/bin/crashdc /etc/sysconfig/crashdc \
/usr/bin/run-crashdc-sles11.sh \
/etc/rc.status /bin/logger /usr/bin/gdb \
/lib/libpthread.so.0 /lib/libthread_db.so.1"
KDUMP_POSTSCRIPT="/usr/bin/run-crashdc-sles11.sh"
Force a rebuild of the kdump initrd file by restarting the boot.kdump service
# service boot.kdump restart
Modify the crashkernel= boot parameter present in your GRUB/LILO/EFI
configuration file so it uses at least 256M of reserved space :
crashkernel=256M-:256M@16M
*** WARNING *** : Any value underneath this is known to cause a hang of kexec
environment. If a hang happens while executing crashdc, you can force a restart
with a power-cycle.
The server needs to be rebooted for the crashkernel parameter to be taken into
account.
3.3.3 Configuring crashdc for boot time execution
-------------------------------------------------
Enable automatic execution of the /etc/init.d/crashdc script at boot time
chkconfig crashdc on
This is all that needs to be done. We would strongly suggest to test the crashdc
|