安装的纯净版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,注释掉该计划任务即可。
» 本文链接地址:https://blog.mydns.vip/3516.html
最新评论
我的站目前每天120个IP,其中刷的是100个。 不知道为什么升级到4H8G5M的标准服务器还是偶尔会崩,CPU占满,但是内存一般这种时候只占50%左右,这是为什么呢?max_children我也设
麻烦发下检测工具