Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having trouble installing sysstat using a chef (v0.9.8) recipe. Any help or pointers would be greatly appreciated!

I have included my chef recipe towards the end. After running this recipe, I am unable to execute

/etc/init.d/sysstat start

I get an error something like this:

 * Starting the system activity data collector sadc
Usage: /usr/lib/sysstat/sadc [ options ] [ <interval> [ <count> ] ] [ <outfile> ]
Options are:
[ -C <comment> ] [ -F ] [ -L ] [ -V ]
[ -S { INT | DISK | IPV6 | POWER | SNMP | XDISK | ALL | XALL } ]

I am able to install sysstat by executing this command without any problems:

apt-get install -y sysstat

My recipe follows:

package "sysstat" do
   package_name "sysstat"
   action :install

#service "sysstat" do
#  service_name "sysstat"
#  enabled
#  running
#  supports :restart => true
#  action [ :enable, :restart ]

cookbook_file "/etc/cron.d/sysstat" do
  source "sysstat"
  mode 0644
  owner "root"
  group "root"

template "sysstat" do
  path "/etc/default/sysstat"
  source "sysstat.erb"
  owner "root"
  group "root"
  mode 0644
  backup 3
  #notifies :restart, resources(:service => "sysstat")
share|improve this question

The recipe was fine. The installation wasn't compatible with the sysstat version.

sysstat's configuration files which were being copied by the template and cookbook_file resources works only with sysstat v.8.1.2-2 and not with sysstat v.9.0.6-2

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.