아래와 같은 시스템로그가 계속 발생하는 것은 문제 없는, Info성 메시지이다. 하지만 이 부분이 거슬릴 경우 해당 메시지가 쌓이지 않도록 설정할 수 있다.

Jul 24 08:50:01 example.com systemd: Created slice user-0.slice.
Jul 24 08:50:01 example.com systemd: Starting Session 150 of user root.
Jul 24 08:50:01 example.com systemd: Started Session 150 of user root.
Jul 24 09:00:01 example.com systemd: Created slice user-0.slice.
Jul 24 09:00:02 example.com systemd: Starting Session 151 of user root.
Jul 24 09:00:02 example.com systemd: Started Session 151 of user root.

 

해당 로그 발생하지 않도록, 미발생하도록 설정할 수 있다.

 

 

 

1. 아래 커맨드 입력을 통해 해당 로그가 쌓이지 않도록 설정해주자.

echo 'if $programname == "systemd" and ($msg contains "Starting Session" or $msg contains "Started Session" or $msg contains "Created slice" or $msg contains "Starting user-" or $msg contains "Starting User Slice of" or $msg contains "Removed session" or $msg contains "Removed slice User Slice of" or $msg contains "Stopping User Slice of") then stop' >> /etc/rsyslog.d/ignore-systemd-session-slice.conf

 ( 한줄이다. )

 

 

2. 설정파일 적용을 위해 rsyslog 재시작을 해주자.

systemctl restart rsyslog

 

 

+ Recent posts