Operating System - HP-UX
1838219 Members
4649 Online
110125 Solutions
New Discussion

Re: savecrash fails in hpux 11.11

 
SOLVED
Go to solution
Babu A
Frequent Advisor

savecrash fails in hpux 11.11

Hi Gurus,

I would like to get it clarified about the /etc/rc.config.d/savecrash file.

The entry SAVECRASH is commented in the file, does it mean that the saving of crash dump will not happen?

===============================================

#!/sbin/sh
# @(#)B.11.11_LR
# Savecrash configuration
#
#

# SAVECRASH: Set to 0 to disable saving system crash dumps.
# SAVECRASH=1


# SAVECRASH_DIR:Directory name for system crash dumps. Note: the filesystem
# in which this directory is located should have as much free
# space as your system has RAM.
# SAVECRASH_DIR=/var/adm/crash
================================================

Please help, Thanks in advance!!!

Babu
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: savecrash fails in hpux 11.11

The answer to this question can be found by examining the /sbin/init.d/savecrash script.

If SAVECRASH is not defined or is zero then the crashdump is not saved. This may be entirely appropriate if separate dump and swap spaces have been configured; this saves a considerable amount of time in the reboot process because the dump will be left intact in the dump space after the machine completes the normal boot.
If it ain't broke, I can fix that.
Babu A
Frequent Advisor

Re: savecrash fails in hpux 11.11

Hi,

I am new to shell scripting, could you please go thro the attached /sbin/init.d/savecrash and tell me is the SAVECRASH is defined.

Thank you!!!

Babu
A. Clay Stephenson
Acclaimed Contributor

Re: savecrash fails in hpux 11.11

The key to understand are these lines:

if [ -f /etc/rc.config.d/savecrash ] ; then


This says does the file /etc/rc.config.d/savecrash exist?

if so then this line:
. /etc/rc.config.d/savecrash

says read the file and add it to the existing script (ie 'sourcing' the file; it becomes part of the foreground process).
Now any variables defined in the sourced file exist in the current shell. In your case, the variables are commented out so that no savecrash is being done. You really didn't have to attach the file; I was trying to get you to see how to answer the question yourself.
If it ain't broke, I can fix that.
Babu A
Frequent Advisor

Re: savecrash fails in hpux 11.11

Thank you for your quick response :-)

If I want to save the crash, I will have to uncomment the SAVECRASH=1 and SAVECRASH_DIR=/var/adm/crash in the savecrash file, right?

Please advise

Thank you!
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: savecrash fails in hpux 11.11

Yes
If it ain't broke, I can fix that.