我有一台运行带有 Gui 的 CentOS 7 的服务器。
它应该全天候运行,但它在几天不活动后就会自行挂起。
“自动暂停”已设置为“关闭”
计算机仅连接到本地网络。
我正在运行的唯一第三方进程是许可证服务器。
我检查了日志,发现有东西请求暂停,我该如何找到它?
或者我该如何防止任何东西暂停我的服务器?
可疑的系统日志:
Oct 27 22:33:37 xxxx dbus-daemon: dbus[684]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Oct 27 22:33:37 xxxx dbus[684]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
Oct 27 22:33:37 xxxx systemd: Starting Fingerprint Authentication Daemon...
Oct 27 22:33:37 xxxx dbus-daemon: dbus[684]: [system] Successfully activated service 'net.reactivated.Fprint'
Oct 27 22:33:37 xxxx dbus[684]: [system] Successfully activated service 'net.reactivated.Fprint'
Oct 27 22:33:37 xxxx systemd: Started Fingerprint Authentication Daemon.
Oct 27 22:33:37 xxxx fprintd: Launching FprintObject
Oct 27 22:33:37 xxxx fprintd: ** Message: D-Bus service launched with name: net.reactivated.Fprint
Oct 27 22:33:37 xxxx fprintd: ** Message: entering main loop
Oct 27 22:33:39 xxxx NetworkManager[739]: <info> [1572186818.9235] manager: sleep requested (sleeping: no enabled: yes)
Oct 27 22:33:39 xxxx NetworkManager[739]: <info> [1572186819.3313] manager: sleeping...
Oct 27 22:33:39 xxxx NetworkManager[739]: <info> [1572186819.8106] manager: NetworkManager state is now ASLEEP
Oct 27 22:33:40 xxxx dbus-daemon: dbus[684]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Oct 27 22:33:40 xxxx dbus[684]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Oct 27 22:33:40 xxxx systemd: Starting Network Manager Script Dispatcher Service...
Oct 27 22:33:42 xxxx systemd-logind: Delay lock is active (UID 0/root, PID 3029/gnome-shell) but inhibitor timeout is reached.
Oct 27 22:33:42 xxxx dbus-daemon: dbus[684]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Oct 27 22:33:42 xxxx dbus[684]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Oct 27 22:33:43 xxxx nm-dispatcher: req:1 'connectivity-change': new request (4 scripts)
Oct 27 22:33:43 xxxx nm-dispatcher: req:1 'connectivity-change': start running ordered scripts...
Oct 27 22:33:43 xxxx systemd: Started Network Manager Script Dispatcher Service.
Oct 27 22:33:43 xxxx systemd: Reached target Sleep.
Oct 27 22:33:43 xxxx systemd: Starting Sleep.
Oct 27 22:33:43 xxxx systemd: Starting Suspend...
Oct 27 22:33:43 xxxx systemd-sleep: Suspending system...
Oct 27 22:33:44 xxxx kernel: PM: Syncing filesystems ... done.
Oct 28 14:14:33 xxxx kernel: Freezing user space processes ... (elapsed 0.020 seconds) done.
Oct 28 14:14:33 xxxx kernel: Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
Oct 28 14:14:33 xxxx kernel: Suspending console(s) (use no_console_suspend to debug)
Oct 28 14:14:33 xxxx kernel: sd 2:0:0:0: [sda] Synchronizing SCSI cache
Oct 28 14:14:33 xxxx kernel: sd 2:0:0:0: [sda] Stopping disk
Oct 28 14:14:33 xxxx kernel: serial 00:09: disabled
Oct 28 14:14:33 xxxx kernel: serial 00:09: System wakeup disabled by ACPI
答案1
答案2
编辑/etc/systemd/logind.conf
文件,取消注释您想要从默认值更改的行,并用 替换变量ignore
。
我遵循了这一点:https://www.freedesktop.org/software/systemd/man/logind.conf.html