Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have just enabled sysstat on one of my servers (Ubuntu 12.04), I have noticed it is logging all to


How can I change the sysstat logging path to another folder on another disk?

Looked through the configs couldn't find anything :(

share|improve this question

I am not sure about ubuntu but in Fedora node,here is the scenario

[root@test ~]# cat /etc/cron.d/sysstat

Run system activity accounting tool every 10 minutes

*/10 * * * * root /usr/lib64/sa/sa1 1 1

Generate a daily summary of process accounting at 23:53

53 23 * * * root /usr/lib64/sa/sa2 -A

If you open any of these scripts

less /usr/lib64/sa/sa1


[ -r ${SYSCONFIG_DIR}/sysstat ] && . ${SYSCONFIG_DIR}/sysstat

if [ ${HISTORY} -gt 28 ]


    CURRENTDIR=`date +%Y%m`
    DATE=`date +%d`
    DDIR=/var/log/sa  <-----------------------------
    cd ${DDIR} || exit 1

Check DDIR variable,so look like its hardcoded here,so if you want to give any customize/change path you can add here.

share|improve this answer

@user1901030 provided an answer that requires you to edit the script. Workable, but if the script gets upgraded, your changes will be overwritten.

Rather, I recommend you perform a bindmount on top of /var/log/sysstat. Edits in /etc/fstab are almost never touched by package updates.

The command to do a bindmount would be:

mount -o bind /path/on/different/drive /var/log/sysstat

When it's mounted, enter the mount command to get all the fstab incantations.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.