본문 바로가기

OS/Linux

[Linux] 리눅스 CentOS7, RHEL 7 systemd : start session of user root 해결방법

반응형

# tail /var/log/message

 

Apr 6 04:01:01 localhost systemd: Created slice user-0.slice.

Apr 6 04:01:01 localhost systemd: Starting Session 63 of user root.

Apr 6 04:01:01 localhost systemd: Started Session 63 of user root.

Apr 6 05:01:01 localhost systemd: Created slice user-0.slice.

Apr 6 05:01:01 localhost systemd: Starting Session 64 of user root.

Apr 6 05:01:01 localhost systemd: Started Session 64 of user root.

Apr 6 06:01:01 localhost systemd: Created slice user-0.slice.

Apr 6 06:01:01 localhost systemd: Starting Session 65 of user root.

 

해당 로그는 systemd의 session_start_scope () 함수에 의해 생성됩니다.

이 함수는 cgroup을 만드는 데 사용되며 무시 가능합니다.

 

# 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 "Removed slice user-" or $msg contains "Stopping user-") then stop' >/etc/rsyslog.d/ignore-systemd-session-slice.conf

 

그후 아래 폴더위치에 새로운 파일이 생성됩니다.

# cd /etc/rsyslog.d/     
# ls -al

ignore-systemd-session-slice.conf

 

# systemctl restart rsyslog

 

 

반응형