1

I've been getting messages saying that I've been running out of diskspace on my machine, and my /var/log folder is 33 GB large. Looking closer it all seems to come from one file pm-powersave.log. Is it supposed to be this large? If not how do I proceed on reducing the size of this behemoth.

Thanks in advance.

1 Answer 1

0

You could have logrotate rotate the log every day and only keep 1 or 2 days of logs. You can accomplish this by editing /etc/logrotate.d/pm-utils to something like this:

/var/log/pm-suspend.log {
       weekly
       rotate 4
       delaycompress
       compress
       notifempty
       missingok
}

/var/log/pm-powersave.log {
       daily
       rotate 2
       delaycompress
       compress
       notifempty
       missingok
}

This retains the default logrotate settings for pm-suspend.log, and makes two changes to the settings for pm-powersave.log:

  1. Rotation frequency has been decreased from weekly to daily
  2. The number of logs to keep in rotation has been decreased from 4 to 2

Now, you will have 2 pm-powersave.log files for just the last 2 days, each of which should be a more manageable size. If you find you need the logs, you can increase it to 5-7, if you don't use them, you can safely decrease it to 1.

This is just a workaround. I am in the process of looking into disabling pm-powersave logging, or at least changing the log level to something less verbose. I will report back if I find anything promising.

1
  • You can run: tail -n 1000 /var/log/pm-powersave.log > /tmp/pm-powersave.log; cat /tmp/pm-powersave.log | sudo tee /var/log/pm-powersave.log > /dev/null Jul 22, 2016 at 15:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .