NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: server crashing

On Mon, Aug 22, 2011 at 03:21:22PM -0700, Andy Ruhl wrote:
> On Mon, Aug 22, 2011 at 12:35 PM, Al Zick 
> <> wrote:
> > The server is in data center and I am not there. I don't have any
> > details of what happened. It didn't seem to log anything. There is no
> > errors. I just know that it is down, when my alarm goes off. If I am
> > not trying to back up with rsync then I don't have an issue. How
> > would I get the information that you are looking for?
> A panic usually won't leave much evidence of what happened, other than
> the crash dump in /var/crash if it is in there. Sometimes you can
> infer what happened from the /var/log/messages file, but not often.
> The dump file is the definitive source of info.
> If your server is configured properly (or maybe "correctly"?), when it
> panics it will copy the dump file to /var/crash after an automatic
> reboot. This can then be used to figure out what happened, hopefully.
> I need to research how to make sure it's configured properly to do
> this, but I think you need as much swap as your memory size. I've got
> other things to do right now unfortunately. I hope someone else can
> answer if they know.

- swap >= RAM
- no savecore=NO in /etc/rc.conf (*)
- maybe adjust savecore_flags, savecore_dir in /etc/rc.conf (*) (***)
- sysctl kern.dump_on_panic = 1 (**)
- make sure you're not sleeping in DDB (in-kernel debugger) (****)

(*) see man rc.conf
(**) see man sysctl.conf; echo "kern.dump_on_panic=1" >> /etc/sysctl.conf
(***) see man 8 savecore
(****) see man 4 options. Search for "options DDB_ONPANIC". Also settable
via sysctl. echo "ddb.onpanic=0" >> /etc/sysctl.conf

This should do.


Home | Main Index | Thread Index | Old Index