这是我的 Linux 服务器的系统日志,该服务器在一个月内会间歇性地自行重启。到现在我还是找不到原因。有人能帮我理解为什么服务器今天会重启吗,我该怎么做才能阻止它。重启对我的工作不利。提前谢谢大家。 在此处输入图片描述
root@ANTSServer02:~# last -n 10 -Fwi
root pts/0 192.168.1.17 Tue Apr 27 08:04:36 2021 still logged in
reboot system boot 0.0.0.0 Tue Apr 27 07:54:48 2021 still running
root pts/0 192.168.1.17 Mon Apr 26 07:56:04 2021 - Mon Apr 26 18:13:52 2021 (10:17)
reboot system boot 0.0.0.0 Sun Apr 25 11:09:20 2021 still running
reboot system boot 0.0.0.0 Fri Apr 23 14:21:02 2021 still running
root pts/0 192.168.1.17 Tue Apr 20 08:08:58 2021 - Tue Apr 20 14:25:18 2021 (06:16)
root pts/0 192.168.1.17 Mon Apr 19 10:57:32 2021 - Mon Apr 19 17:43:04 2021 (06:45)
root pts/0 192.168.1.17 Mon Apr 19 07:56:40 2021 - Mon Apr 19 10:47:19 2021 (02:50)
reboot system boot 0.0.0.0 Fri Apr 16 22:04:36 2021 still running
root pts/0 192.168.1.17 Mon Apr 12 13:32:33 2021 - Mon Apr 12 15:23:25 2021 (01:50)
root@ANTSServer02:~# dmesg | grep EXT4 -U3
[ 2.045615] hid-generic 0003:045E:0040.0003: input,hidraw2: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-0000:00:14.0-7/input0
[ 2.119560] fbcon: Taking over console
[ 2.119675] Console: switching to colour frame buffer device 240x67
[ 2.305443] EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.363274] systemd[1]: Inserted module 'autofs4'
[ 2.478026] systemd[1]: systemd 245.4-4ubuntu3.5 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[ 2.496174] systemd[1]: Detected architecture x86-64.
--
[ 2.650424] systemd[1]: Mounted Kernel Trace File System.
[ 2.651028] systemd[1]: Finished Create list of static device nodes for the current kernel.
[ 2.651587] systemd[1]: Finished Uncomplicated firewall.
[ 2.656413] EXT4-fs (nvme0n1p2): re-mounted. Opts: errors=remount-ro
[ 2.656676] RPC: Registered named UNIX socket transport module.
[ 2.656677] RPC: Registered udp transport module.
[ 2.656677] RPC: Registered tcp transport module.
Apr 27 07:27:01 ANTSServer02 CRON[433520]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:28:01 ANTSServer02 CRON[433629]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:28:01 ANTSServer02 CRON[433630]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:29:01 ANTSServer02 CRON[433740]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:29:01 ANTSServer02 CRON[433741]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:30:01 ANTSServer02 CRON[433851]: (root) CMD ([ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi)
Apr 27 07:30:01 ANTSServer02 CRON[433852]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:30:01 ANTSServer02 CRON[433853]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:31:01 ANTSServer02 CRON[433960]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:31:01 ANTSServer02 CRON[433961]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:32:01 ANTSServer02 CRON[434068]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:32:01 ANTSServer02 CRON[434069]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:32:40 ANTSServer02 systemd[1]: Started Run anacron jobs.
Apr 27 07:32:40 ANTSServer02 anacron[434151]: Anacron 2.3 started on 2021-04-27
Apr 27 07:32:40 ANTSServer02 anacron[434151]: Will run job `cron.daily' in 5 min.
Apr 27 07:32:40 ANTSServer02 anacron[434151]: Jobs will be executed sequentially
Apr 27 07:33:01 ANTSServer02 CRON[434182]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:33:01 ANTSServer02 CRON[434183]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:34:01 ANTSServer02 CRON[434291]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:34:01 ANTSServer02 CRON[434292]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:35:01 ANTSServer02 CRON[434409]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:35:01 ANTSServer02 CRON[434410]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:36:01 ANTSServer02 CRON[434519]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:36:01 ANTSServer02 CRON[434520]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:37:01 ANTSServer02 CRON[434629]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:37:01 ANTSServer02 CRON[434630]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:37:40 ANTSServer02 anacron[434151]: Job `cron.daily' started
Apr 27 07:37:40 ANTSServer02 anacron[434717]: Updated timestamp for job `cron.daily' to 2021-04-27
Apr 27 07:37:40 ANTSServer02 cracklib: no dictionary update necessary.
Apr 27 07:37:40 ANTSServer02 anacron[434151]: Job `cron.daily' terminated
Apr 27 07:37:40 ANTSServer02 anacron[434151]: Normal exit (1 job run)
Apr 27 07:37:40 ANTSServer02 systemd[1]: anacron.service: Succeeded.
Apr 27 07:38:01 ANTSServer02 CRON[434788]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:38:01 ANTSServer02 CRON[434789]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:39:00 ANTSServer02 systemd[1]: Starting Clean php session files...
Apr 27 07:39:00 ANTSServer02 systemd[1]: phpsessionclean.service: Succeeded.
Apr 27 07:39:00 ANTSServer02 systemd[1]: Finished Clean php session files.
Apr 27 07:39:01 ANTSServer02 CRON[434954]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 27 07:39:01 ANTSServer02 CRON[434955]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:39:01 ANTSServer02 CRON[434956]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:40:01 ANTSServer02 CRON[435070]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:40:01 ANTSServer02 CRON[435071]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:41:01 ANTSServer02 CRON[435178]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:41:01 ANTSServer02 CRON[435179]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:42:01 ANTSServer02 CRON[435295]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:42:01 ANTSServer02 CRON[435296]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:43:01 ANTSServer02 CRON[435409]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:43:01 ANTSServer02 CRON[435410]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:44:01 ANTSServer02 CRON[435519]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:44:01 ANTSServer02 CRON[435520]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:45:01 ANTSServer02 CRON[435630]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:45:01 ANTSServer02 CRON[435631]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:46:01 ANTSServer02 CRON[435740]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:46:01 ANTSServer02 CRON[435741]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:47:01 ANTSServer02 CRON[435849]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:47:01 ANTSServer02 CRON[435850]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:48:01 ANTSServer02 CRON[435964]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:48:01 ANTSServer02 CRON[435965]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:49:01 ANTSServer02 CRON[436076]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:49:01 ANTSServer02 CRON[436077]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:50:01 ANTSServer02 CRON[436187]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:50:01 ANTSServer02 CRON[436188]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:51:01 ANTSServer02 CRON[436297]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:51:01 ANTSServer02 CRON[436298]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:52:01 ANTSServer02 CRON[436414]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:52:01 ANTSServer02 CRON[436415]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:53:01 ANTSServer02 CRON[436528]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:53:01 ANTSServer02 CRON[436529]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:54:01 ANTSServer02 CRON[436639]: (www-data) CMD ($PASSBOLT_BASE_DIR/bin/cron)
Apr 27 07:54:01 ANTSServer02 CRON[436640]: (www-data) CMD (/var/www/passbolt/bin/cake EmailQueue.sender)
Apr 27 07:54:49 ANTSServer02 systemd-modules-load[320]: Inserted module 'lp'
root@ANTSServer02:~# sudo systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTIVATES
Fri 2021-04-30 09:09:00 CEST 8min left Fri 2021-04-30 08:39:01 CEST 21min ago phpsessionclean.timer phpsessionclean.service
Fri 2021-04-30 09:34:45 CEST 34min left Fri 2021-04-30 08:35:01 CEST 25min ago anacron.timer anacron.service
Fri 2021-04-30 16:46:48 CEST 7h left Thu 2021-04-29 22:59:26 CEST 10h ago motd-news.timer motd-news.service
Fri 2021-04-30 19:08:59 CEST 10h left Fri 2021-04-30 06:56:59 CEST 2h 3min ago certbot.timer certbot.service
Sat 2021-05-01 00:00:00 CEST 14h left Fri 2021-04-30 00:00:01 CEST 9h ago logrotate.timer logrotate.service
Sat 2021-05-01 00:00:00 CEST 14h left Fri 2021-04-30 00:00:01 CEST 9h ago man-db.timer man-db.service
Sat 2021-05-01 03:22:49 CEST 18h left Fri 2021-04-30 06:42:33 CEST 2h 17min ago apt-daily.timer apt-daily.service
Sat 2021-05-01 06:38:54 CEST 21h left Fri 2021-04-30 06:49:47 CEST 2h 10min ago apt-daily-upgrade.timer apt-daily-upgrade.service
Sat 2021-05-01 07:32:42 CEST 22h left Fri 2021-04-30 07:32:42 CEST 1h 27min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Sun 2021-05-02 03:10:41 CEST 1 day 18h left Sun 2021-04-25 03:10:39 CEST 5 days ago e2scrub_all.timer e2scrub_all.service
Mon 2021-05-03 00:00:00 CEST 2 days left Mon 2021-04-26 00:00:01 CEST 4 days ago fstrim.timer fstrim.service
答案1
查看 cron 作业,看看它是否每个月都可以重新启动。如果没有,请查看机器的性能和负载,这就是我一时想到的。