サーバーが再起動し続ける理由はどうすればわかりますか?

サーバーが再起動し続ける理由はどうすればわかりますか?

サーバーが再起動し続けるようです。理由を知りたいです。

サーバーが最後に再起動された時期とその理由をどのように理解できますか?

root     pts/0        139.193.156.125  Thu Aug  8 21:10   still logged in
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 20:38 - 21:11  (00:33)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 20:15 - 21:11  (00:56)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 19:16 - 21:11  (01:55)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 18:56 - 21:11  (02:14)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 18:24 - 21:11  (02:47)
root     pts/1        139.193.156.125  Thu Aug  8 18:16 - crash  (00:07)
root     pts/0        195.254.135.181  Thu Aug  8 18:10 - crash  (00:13)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 17:52 - 21:11  (03:19)
root     pts/0        195.254.135.181  Thu Aug  8 17:38 - crash  (00:13)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 17:08 - 21:11  (04:02)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 16:58 - 21:11  (04:12)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 16:45 - 21:11  (04:26)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 16:35 - 21:11  (04:36)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 16:27 - 21:11  (04:44)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 15:59 - 21:11  (05:12)
reboot   system boot  2.6.32-358.11.1. Thu Aug  8 06:15 - 21:11  (14:56)
root     pts/1        208.74.121.102   Wed Aug  7 06:03 - 06:04  (00:00)
root     pts/1        208.74.121.102   Tue Aug  6 15:34 - 17:40  (02:05)
root     pts/0        139.193.156.125  Tue Aug  6 11:28 - 04:40 (1+17:11)

Linuxでシステムが再起動された理由を知る方法はありますか?特に高い負荷が原因ですか?そうでない場合はどうなりますか?

ベストアンサー1

次の2つのコマンド(wholast)を使用して、システムが最後に再起動された時期と、前のシャットダウンまたは実行レベルの変更に関するメッセージを確認できます。

最後のシステム起動時間はいつでしたか?

これを行うには、このwhoコマンドを使用できます。特に-bスイッチを使用してください。

$ who -b
         system boot  2013-08-01 17:56

これは、システムが2013年8月1日に最後に開始されたことを意味します。

過去の再起動

以前の再起動のより広範なリストを表示するには、このlastコマンドを使用できます。

$ last reboot | less
reboot   system boot  2.6.35.14-106.fc Thu Aug  1 17:56 - 02:03 (7+08:06)   
reboot   system boot  2.6.35.14-106.fc Thu Aug  1 09:41 - 17:55  (08:14)    
reboot   system boot  2.6.35.14-106.fc Thu Jul 25 15:24 - 17:55 (7+02:31)   
reboot   system boot  2.6.35.14-106.fc Thu Jul 18 18:05 - 15:23 (6+21:17)   
...

過去のシステムのシャットダウンと実行レベルの変更はありましたか?

lastこの目的でこのコマンドを使用することもできます。-xスイッチを使用する必要があります。

$ last -x | less
saml     pts/7        :pts/6:S.0       Sat Aug  3 21:30 - 21:30  (00:00)    
saml     pts/6        :0.0             Sat Aug  3 21:29 - 21:30  (00:01)    
saml     pts/4        :0.0             Fri Aug  2 21:49 - 22:16 (2+00:26)   
saml     pts/2        :0.0             Fri Aug  2 13:30 - 22:16 (2+08:45)   
saml     pts/1        :0.0             Fri Aug  2 13:05   still logged in   
saml     pts/0        :0.0             Fri Aug  2 12:37   still logged in   
saml     pts/0        :0.0             Fri Aug  2 12:35 - 12:37  (00:02)    
saml     pts/0        :0.0             Thu Aug  1 17:58 - 12:35  (18:36)    
saml     tty1         :0               Thu Aug  1 17:56   still logged in   
runlevel (to lvl 5)   2.6.35.14-106.fc Thu Aug  1 17:56 - 02:04 (7+08:08)   
reboot   system boot  2.6.35.14-106.fc Thu Aug  1 17:56 - 02:04 (7+08:08)   
shutdown system down  2.6.35.14-106.fc Thu Aug  1 17:55 - 17:56  (00:00)    
runlevel (to lvl 6)   2.6.35.14-106.fc Thu Aug  1 17:55 - 17:55  (00:00)    
saml     tty2                          Thu Aug  1 17:54 - down   (00:01)    
root     tty2                          Thu Aug  1 17:53 - 17:54  (00:00)    
...

引用する

おすすめ記事