2.11BSD/man/cat8/savecore.0

Compare this file to the similar file:
Show the results in this format:




SAVECORE(8)	    UNIX Programmer's Manual	      SAVECORE(8)



NAME
     savecore - save a core dump of the operating system

SYNOPSIS
     savecore _d_i_r_n_a_m_e [ _s_y_s_t_e_m ]

DESCRIPTION
     _S_a_v_e_c_o_r_e is meant to be called at the end of the /etc/rc
     file.  Its function is to save the core dump of the system
     (if one was made) and to write a reboot message in the shut-
     down log.

     It saves the core image in the file _d_i_r_n_a_m_e/core.n and its
     corresponding namelist in _d_i_r_n_a_m_e/unix.n.	The second argu-
     ment is the namelist for the system which made the core
     image; the current system is always assumed to be /unix.
     The trailing ".n" in the pathnames is replaced by a number
     which grows every time _s_a_v_e_c_o_r_e is run in that directory.

     Before savecore writes out a core image, it reads a number
     from the file _d_i_r_n_a_m_e/minfree.  If there are fewer free
     blocks on the file system which contains _d_i_r_n_a_m_e than the
     number obtained from the minfree file, the core dump is not
     done.  If the minfree file does not exist, savecore always
     writes out the core file (assuming that a core dump was
     taken).

     _S_a_v_e_c_o_r_e also writes a reboot message in the shut down log.
     If the system crashed as a result of a panic, _s_a_v_e_c_o_r_e
     records the panic string in the shut down log too.

     If _s_a_v_e_c_o_r_e detects that the system time is wrong because of
     a crash (the time in the core image is after the current
     time), it will reset the system time to its best estimate of
     the time, which is the time in the core image plus the
     elapsed time since the reboot.  It announces the time that
     it set when this occurs.

FILES
     /usr/adm/shutdownlogshutdown log
     /unix		 current UNIX

BUGS
     The method used to determine whether a dump is present, and
     to prevent the same core image from being saved multiple
     times, is not elegant.  This information should be passed to
     _i_n_i_t by the system; however, this is difficult because the
     system may have to be rebooted a second time if the root
     filesystem is patched.






Printed 11/24/99						1