三歩あるけば物も忘れる

お腹のお肉がメタボックル

ユーザ用ツール

サイト用ツール


InfrastructureConstruction:RHEL8:LogManagement-journald

53.ログ管理-journald

journaldの設定方法

#変更
vi /etc/systemd/journald.conf

#適用
systemctl restart systemd-journald

journaldの設定詳細

#OS再起動後もログが消去されないようにする
Storage=persistent

#ログ出力抑止設定(下記では30秒間に10000以上のメッセージが出力された場合破棄する。)
RateLimitIntervalSec=30s
RateLimitBurst=10000

https://qiita.com/thaim/items/5d0cc595fce4ac0858e4
https://thinkit.co.jp/story/2014/12/18/5389?page=0%2C1

journaldの確認コマンド

#他のオプションはリンク先参照
journalctl -xe
journalctl -le

https://yomon.hatenablog.com/entry/2016/05/24/192046

初期値

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.

[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitIntervalSec=30s
#RateLimitBurst=10000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#SystemMaxFiles=100
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMaxFiles=100
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
#LineMax=48K

InfrastructureConstruction/RHEL8/LogManagement-journald.txt · 最終更新: 2021/01/01 by 127.0.0.1