Oracle Linux – How to Change data collection interval for sysstat service
in Linux
Applies To:
Linux OS – Version Oracle Linux 8.0 to Oracle Linux 9.0 [Release OL8 to OL9]
Linux x86_64 on Oracle Public Cloud
Goal:
This document describes how to change default interval of data collection for sysstat service for Oracle Linux version 8 onwards.
Solution:
By default SAR will collect data every 10 minutes. In order to collect data every minute follow below steps.
$ sudo systemctl cat sysstat-collect.timer # /usr/lib/systemd/system/sysstat-collect.timer # /usr/lib/systemd/system/sysstat-collect.timer # (C) 2014 Tomasz Torcz <tomek@pipebreaker.pl> # # sysstat-11.7.3 systemd unit file: # Activates activity collector every 10 minutes [Unit] Description=Run system activity accounting tool every 10 minutes [Timer] OnCalendar=*:00/10 [Install] WantedBy=sysstat.service $ $ sudo systemctl edit sysstat-collect.timer [Unit] Description=Run system activity accounting tool every 1 minutes [Timer] OnCalendar=*:00/1 [Install] WantedBy=sysstat.service $ $ sudo systemctl daemon-reload $ $ sudo systemctl restart sysstat.service $ $ sudo systemctl status sysstat-collect.timer ● sysstat-collect.timer - Run system activity accounting tool every 1 minutes Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/sysstat-collect.timer.d └─override.conf Active: active (waiting) since Thu 2023-04-13 19:39:13 AEST; 27s ago Trigger: Thu 2023-04-13 19:40:00 AEST; 19s left Apr 13 19:39:13 vm01 systemd[1]: Started
Tagged:
0