3

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?

3 Answers 3

1

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.

1
  • 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. Sep 15, 2009 at 22:41
1

You can use last(1). It's output looks like this:

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

If crashdumps were enabled you can also see timestamps of files in /var/crash directory.

Also you can see recent panics using command:

(cat /var/log/messages; bzcat /var/log/messages.*.bz2) | fgrep panic
1
  • Thanks for the reply. What you answered is useful but I would have remembered if it was a piped grep or awk command. Aug 21, 2009 at 13:09
0

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

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .