-1

When my system reboot. I want to know the cause of the reboot especially when the reboot cause is a kernel crash.

Are there a way to know if the reboot cause is linux kernel crash? like read something from /proc?

ewwhite
  • 197,159
  • 92
  • 443
  • 809
MOHAMED
  • 151
  • 7
  • I can't imagine any other reason your server would be randomly rebooting without user intervention or knowledge, or are your reboots expected? – pete Mar 13 '16 at 13:11

1 Answers1

2

Type last reboot to see recent reboot reasons and times between reboots.

If the system crashed, you may see "crash" in one of the time fields.

(root) kppro[1]:~# last reboot
reboot   system boot  2.6.18-408.el5   Wed Mar  9 09:13         (4+00:36)
reboot   system boot  2.6.18-408.el5   Tue Mar  1 09:14         (12+00:35)
reboot   system boot  2.6.18-408.el5   Fri Feb 26 07:30         (16+02:18)
reboot   system boot  2.6.18-408.el5   Sat Feb 20 23:52         (21+09:57)
reboot   system boot  2.6.18-407.el5   Thu Dec 24 09:24         (80+00:25)
reboot   system boot  2.6.18-404.el5   Thu May 28 10:11         (290+00:38)
reboot   system boot  2.6.18-404.el5   Sat May 23 07:00         (5+03:03)
reboot   system boot  2.6.18-400.1.1.e Tue Feb 10 15:09         (101+14:42)
reboot   system boot  2.6.18-348.12.1. Sun Aug 11 00:46         (548+15:15)
ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • Is it possibe to get these info from proc. because I m using ucLinux – MOHAMED Mar 13 '16 at 15:52
  • I don't know what ucLinux is. – ewwhite Mar 13 '16 at 15:53
  • 1
    @ewwhite From http://www.uclinux.org/ "The Embedded Linux/Microcontroller project is a port of Linux to systems without a Memory Management Unit (MMU)." Looks like [the most recent release was in mid-2008 (kernel 2.6.26-uc0)](http://www.uclinux.org/pub/uClinux/) and [the project status page](http://www.uclinux.org/status/) hasn't been updated since April 2004. I'm not sure whether or not that makes the question fall under "unsupported hardware or software platforms or unmaintained environments", given that the question itself mentions no such constraints. – user Mar 13 '16 at 18:18