Linux/CentOS 9
systemctl 환경에서 sysstat interval 변경
워니주니구니
2023. 8. 14. 18:13
728x90
SMALL
- 개요
sysstat sar data는 default 10분 간격이다. 그러나 1분 으로 조정하는게 훨씬 효과적이다.
CentOS 7까지는 cron.d에서 변경이 가능했으나, 8 이상 부터는 systemctl에서 변경해야 한다
- 변경 방법
>> sudo systemctl edit --full sysstat-collect.timer
## change 10 -> 1
>> systemctl daemon-reload
>> systemctl cat sysstat-collect.timer
# /etc/systemd/system/sysstat-collect.timer
# /usr/lib/systemd/system/sysstat-collect.timer
# (C) 2014 Tomasz Torcz <tomek@pipebreaker.pl>
#
# sysstat-12.5.6 systemd unit file:
# Activates activity collector every 1 minutes
[Unit]
Description=Run system activity accounting tool every 1 minutes
[Timer]
OnCalendar=*:00/1
[Install]
WantedBy=sysstat.service
>> systemctl restart sysstat.service
>> sar -q
728x90
LIST