LoginSignup
1
1

More than 3 years have passed since last update.

Dockerでsar実行する際につまづいたこと

Posted at

結論、cronをinstallしたら解決した

dockerにsarコマンドをinstallして、計測間隔を設定、"vi /etc/default/sysstat"でfalseをtrueに変更しても動かなかったが、cronがそもそもinstallされていなかったことが原因でした。

設定フロー

apt-get のupdate

apt-get update

cronのinstall

apt-get -y install cron

sysstat(sar)のinstall

apt-get install sysstat -y

計測を許可

vim /etc/default/sysstat

ENABLED="false"
  ↓
ENABLED="true"

10分間隔を1分間隔にした。

vim /etc/cron.d/sysstat

サービス起動

service cron start
/etc/init.d/sysstat start

サービス起動確認

service cron status
service sysstat status

計測されていること確認

image.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1