Debian 12 bookworm
Sponsored Link

SysStat : Install2023/07/12

Install SysStat to enable system monitoring like CPU usage or Network statics.
[1] Install SysStat.
apt -y install sysstat
systemctl enable --now sysstat

Synchronizing state of sysstat.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable sysstat
Created symlink /etc/systemd/system/ → /lib/systemd/system/sysstat.service.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-collect.timer → /lib/systemd/system/sysstat-collect.timer.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-summary.timer → /lib/systemd/system/sysstat-summary.timer.
[2] System resource data are recorded every 10 minutes by default.
If you'd like to change the interval, it's possible to edit like follows.
# default setting is like follows

grep -A 1 'Timer' /usr/lib/systemd/system/sysstat-collect.timer

# to change the default interval, configure like follows

systemctl edit sysstat-collect.timer
# add setting to override the default
# for example, set 5 minutes interval
[3] If you'd like to change some settings of SysStat, the configuration file is located like follows.
vi /etc/sysstat/sysstat
# sysstat configuration file. See sysstat(5) manual page.

# How long to keep log files (in days).
# Used by sa2(8) script
# If value is greater than 28, then log files are kept in
# multiple directories, one for each month.

# Compress (using gzip or bzip2) sa and sar files older than (in days):

# Parameters for the system activity data collector (see sadc(8) manual page)
# which are used for the generation of log files.
# By default contains the `-S DISK' option responsible for generating disk
# statisitcs. Use `-S XALL' to collect all available statistics.
# *1 note

INT     ⇒  System Interrupts
DISK    ⇒  Block Devices
SNMP    ⇒  SNMP statistics
IPV6    ⇒  IPv6 statistics
POWER   ⇒  Power Management statistics
ALL     ⇒  All of the above
XDISK   ⇒  DISK + Partition statistics
XALL    ⇒  All of the above (ALL + XDISK)
Matched Content