Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
end

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

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

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

1 Answer 1

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

 
discard

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