初期費用無料、月額990円から、高速・多機能・高安定レンタルサーバー『エックスサーバー』
taisuke@ubuntuserver:~$ sudo apt -y install sysstat
taisuke@ubuntuserver:~$ sudo systemctl enable --now sysstat
Synchronizing state of sysstat.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable sysstat
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /usr/lib/systemd/system/sysstat.service.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-collect.timer → /usr/lib/systemd/system/sysstat-collect.timer.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-summary.timer → /usr/lib/systemd/system/sysstat-summary.timer.
#デフォルトの取得間隔は以下の設定による
taisuke@ubuntuserver:~$ sudo grep -A 1 'Timer' /usr/lib/systemd/system/sysstat-collect.timer
[Timer]
OnCalendar=:00/10
#取得間隔を変更する場合は以下
taisuke@ubuntuserver:~$ sudo systemctl edit sysstat-collect.timer
#例として 5分間隔に変更する
[Timer]
OnCalendar=
OnCalendar=:00/5
taisuke@ubuntuserver:~$ sudo 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.
#ログの保管期間 (日数)
HISTORY=7
#Compress (using gzip or bzip2) sa and sar files older than (in days):
#指定日数より古いログは圧縮する
COMPRESSAFTER=10
#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
SADC_OPTIONS="-S DISK"
#*1 指定可能なオプション
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)
初期費用無料、月額990円から、高速・多機能・高安定レンタルサーバー『エックスサーバー』
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme