


安装的纯净版centos 系统日志中大量出现出现 Started Session * of user root。系统启动会话
很多用户在会在centos服务器日志中中发现大量系统启动会话,有频率的出现系统日志,这个信息并不是报错信息,但是大量这个又不方便你分析日志,所以禁用掉更方便你对服务器的维护
Jun 23 09:00:01 iZu8kiphd67xs1Z systemd: Started Session 775 of user root.
Jun 23 09:00:01 iZu8kiphd67xs1Z systemd: Starting Session 775 of user root.
Jun 23 09:01:01 iZu8kiphd67xs1Z systemd: Started Session 776 of user root.
Jun 23 09:01:01 iZu8kiphd67xs1Z systemd: Starting Session 776 of user root.
Jun 23 09:10:01 iZu8kiphd67xs1Z systemd: Started Session 777 of user root.
Jun 23 09:10:01 iZu8kiphd67xs1Z systemd: Starting Session 777 of user root.
Jun 23 09:20:01 iZu8kiphd67xs1Z systemd: Started Session 778 of user root.
Jun 23 09:20:01 iZu8kiphd67xs1Z systemd: Starting Session 778 of user root.
Jun 23 09:21:54 iZu8kiphd67xs1Z systemd: Started Session 779 of user root.
Jun 23 09:21:54 iZu8kiphd67xs1Z systemd-logind: New session 779 of user root.
Jun 23 09:21:54 iZu8kiphd67xs1Z systemd: Starting Session 779 of user root.

查看到这个信息是存在相关规律的,一般这种情况都是在计划任务中定时执行。查看用户计划任务,没有查看到有相关计划任务,那就怀疑是由系统计划cron引起的。/etc/cron.d中的文件可能会给您一些线索。
在/etc/cron.d目录下查看到存在两个文件

查看第一个0hourly文件,查看执行计划的时间,完全和我们日志的记录的对不上。

查看第二个任务,很明显查看到这个计划任务就是我们要找的,导致日志中大量出现 Started Session * of user root 元凶。

查看到是在执行/usr/lib64/sa/sa1,注释掉该计划任务即可。



亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
文章评论 本文章有个评论