#655 sysstat - Monitor disk usage
Closed: Fixed None Opened 15 years ago by mmcgrath.

I'd like to enable disk monitoring via sysstat (its disabled by default)

It basically will mean deploying adding a -d to /usr/lib64/sa/sa1 so it looks like this:
{{{

!/bin/sh

/usr/lib64/sa/sa1.sh

(C) 1999-2006 Sebastien Godard (sysstat <at> wanadoo.fr)

umask 0022
ENDIR=/usr/lib64/sa
cd ${ENDIR}
if [ $# = 0 ]
then

Note: Stats are written at the end of previous file and at the

beginning of the new one (when there is a file rotation) only if

outfile has been specified as '-' on the command line...

    exec ${ENDIR}/sadc -d -F -L 1 1 -

else
exec ${ENDIR}/sadc -d -F -L $* -
fi
}}}

From its default. Initially I only wanted this on the buildsys but I think we should do it everywhere.


Sorry bout that, this ended up being a more complex problem then I thought needing the following manifest:

{{{
case $architecture {
'i386' : {
templatefile { '/usr/lib/sa/sa1':
content => template('/var/lib/puppet/config/system/sa1.sh.erb'),
mode => '0755',
}
}
'x86_64' : {
templatefile { '/usr/lib64/sa/sa1':
content => template('/var/lib/puppet/config/system/sa1.sh.erb'),
mode => '0755',
}
}
'ppc64' : {
templatefile { '/usr/lib/sa/sa1':
content => template('/var/lib/puppet/config/system/sa1.sh.erb'),
mode => '0755',
}
}
}
}}}

and the following config:

{{{

!/bin/sh

/usr/lib64/sa/sa1.sh

(C) 1999-2006 Sebastien Godard (sysstat <at> wanadoo.fr)

umask 0022
<% if architecture == "x86_64" %>
ENDIR=/usr/lib64/sa
<% else %>
ENDIR=/usr/lib/sa
<% end %>

cd ${ENDIR}
if [ $# = 0 ]
then

Note: Stats are written at the end of previous file and at the

beginning of the new one (when there is a file rotation) only if

outfile has been specified as '-' on the command line...

    exec ${ENDIR}/sadc -d -F -L 1 1 -

else
exec ${ENDIR}/sadc -d -F -L $* -
fi
}}}

Login to comment on this ticket.

Metadata