| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | 
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 
| 30 | 
- Chrome
 - 파이썬
 - GNOME
 - bash
 - docker
 - Python
 - 디렉토리
 - GPU
 - 빅데이터
 - C
 - Elasticsearch
 - Linux
 - Shell
 - Audit Log
 - PostgreSQL
 - rsyslog
 - Kubernetes
 - CentOS
 - Elk
 - RHEL
 - zabbix
 - log
 - audit
 - JSON
 - syslog
 - K8S
 - yum
 - centos 7.5
 - 서울시민카드
 - 크롬
 
- Today
 
- Total
 
Sysops Notepad
[Linux] 에서 출력되는 systemd 로그 제거하는 방법 본문
Centos 7 / RHEL 7 에서 반복되는 로그 제거하는 방법
해당로그는 systemd의 session_start_scope () 함수에 의해 인쇄됩니다.
이 함수는 cgroup을 만드는 데 사용되며 무시 가능합니다.
# tail /var/log/message
Dec 6 04:01:01 localhost systemd: Created slice user-0.slice.
Dec 6 04:01:01 localhost systemd: Starting Session 63 of user root.
Dec 6 04:01:01 localhost systemd: Started Session 63 of user root.
Dec 6 05:01:01 localhost systemd: Created slice user-0.slice.
Dec 6 05:01:01 localhost systemd: Starting Session 64 of user root.
Dec 6 05:01:01 localhost systemd: Started Session 64 of user root.
Dec 6 06:01:01 localhost systemd: Created slice user-0.slice.
Dec 6 06:01:01 localhost systemd: Starting Session 65 of user root.
# 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
# systemctl restart rsyslog
'업무 > sys' 카테고리의 다른 글
| [Linux] kickstart server install (0) | 2018.11.28 | 
|---|---|
| GlusterFS을 이용한 파일 공유 및 클러스터링 (0) | 2018.11.27 | 
| 리눅스 파일시스템 감시 알림 inotify 사용법 (0) | 2018.11.26 | 
| Slurm command 정리 (0) | 2018.11.20 | 
| Zabbix Hostname to Visible name auto registration (0) | 2018.11.05 |