Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

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
share|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

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.

share|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

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

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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