Many years ago while dealing with a FreeBSD (5.3?) box that randomly panic'ed and reboot (bad memory as it turned out), I came across a command in some forum post that when used would output information about previous reboots including the panic message. It allowed me to look back and see how often the issue was happening. I should have made note of it, I guess I relied too much on history to remember it.

It was an obscure (at least to me) command with a few args. It wasn't something I had to install via ports. I assume it relied on logs or dumps to collect the information. I think the output was formatted in two 40 character columns with most of the information in the first column. I think the panic message was part of the second column.

Does this sound familiar to anyone?

link|improve this question
feedback

3 Answers

If you have dumps turned on, there is some reasonably useful information about the crashes you've had in /var/crash - specifically the info.* files - this includes the dump time and the kernel panic string.

You can also use the crash dump (vmdump.*) with kgdb(1) to do more detailed debugging on these crashes.

link|improve this answer
Thanks for the reply, but what I remember wasn't really about the crashes themselves, just that the system had rebooted and why (in my case it was from panics). I've asked this question many times in different forums but no luck -- I wish I had made note of the command instead of just thinking I could get it from history. – ongle Sep 15 '09 at 22:41
feedback

The only command that i can recall is last. It's output looks like this:

> last
savetherbtz      ttyp7    ph34r.ru         Wed Aug 19 13:18   still logged in
reboot           ~                         Sat Aug 15 17:38
savetherbtz      ttyp0    192.168.0.111    Sat Aug 15 04:34 - crash  (13:03)
reboot           ~                         Sat Aug 15 04:32
savetherbtz      ttyp0    192.168.0.111    Fri Aug 14 21:07 - crash  (07:24)

If crashdumps were enabled you can also format output of ls -al in /var/crash directory

And as last resort you can see recent panics using command cat /var/log/messages | grep panic ;; bzcat /var/log/messages.?.bz2 | grep panic

link|improve this answer
Thanks for the reply. What you answered is useful but I would have remembered if it was a piped grep or awk command. – ongle Aug 21 '09 at 13:09
feedback

Was it ksymoops? It translates the oops files into human readable.

link|improve this answer
I think it's linux-specific – SaveTheRbtz Oct 24 '09 at 21:14
Your right, it is. Maybe kgdb? freebsd.org/doc/en/books/developers-handbook/… – TonyUser Oct 24 '09 at 22:20
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.