How to clear disk space / logs

Razva

Renowned Member
Dec 3, 2013
252
10
83
Romania
cncted.com
Hello,

Currently, I have about 50 GB of logs, most of them being used by `mail.info*` and `syslog*`

I am not looking to store more than 90 days of logs. I've `logrotate` but `mail.info` remained at 15G, along with some other logs, which is huge considering that the PMG has very little traffic.

Would it be possible to clear those logs?

Thank you
 
Keep in mind that the Tracking center uses /var/log/syslog and rotated variants as source for it's data - so if you want to use the Tracking Center the syslog needs to go as far back as that.

you can configure rsyslog to not write mail.log, mail.info, etc. though that should reduce the usage quite a bit as well.

additionally make sure that logrotation works and that the files get compressed correctly.
 
> so if you want to use the Tracking Center the syslog needs to go as far back as that.

Are there any PMG specific settings that need to be done, or is the Tracking Center just displaying whatever available in the syslog? In this case, I suppose that logrotate is the deciding factor?

> you can configure rsyslog to not write mail.log, mail.info, etc. though that should reduce the usage quite a bit as well.

Can you please point me into the right direction? Is this a PMG setting, or an Debian setting?

> additionally make sure that logrotation works and that the files get compressed correctly.

Logrotate seems to work, but the file size of `syslog` remains large. I had a sudden burst of emails the last week (about 50k), but even so 15G for a logfile is enormous.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!