• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved How to get the total disk space usage of log files

Inma

Regular Pleskian
Server operating system version
Debian
Plesk version and microupdate number
18.0.52
I would like to know what command to use in debian to show the weight of the logs of the accommodations
and in case of weighing a lot a command to eliminate them at once
I have two servers with 150 accommodations each and as you will understand... it is absurd to have to do it one by one
but first know what they weigh
And so that there is no confusion, I am referring to these logs that rotate and the rotated ones can be eliminated

[Removed images upon user request.]
 
Last edited by a moderator:
The logs from the screenshot are stored in this location:
Code:
# ls -l /var/www/vhosts/system/domain.com/logs/

If you want to see the logs from all domains:
Code:
# ls -l /var/www/vhosts/system/*/logs/
 
Thank you, and know what all these logs weigh together?

I put this command and what else?

ls -l /var/www/vhosts/system/*/logs/
 
If "weigh" means "total size" to you, then the command would be du /var/www/vhosts/system/*/logs/*.
 
Thanks, I'll write down the two commands

And in case you want to delete them all at once because they occupy almost 3GB?

du -ch /var/www/vhosts/system/*/logs/* | grep ¿?¿?¿?
 
Thanks, I'll write down the two commands

And in case you want to delete them all at once because they occupy almost 3GB?

du -ch /var/www/vhosts/system/*/logs/* | grep ¿?¿?¿?

I'm not an expert, but I think it might be safer to change the rotating options. You can rotate the log files by size.
 
I'm not an expert, but I think it might be safer to change the rotating options.
That is true, because the log file handles will still be stored in the services that write the logs elsewise, so just deleting log files may leave the system in a state where new log entries cannot be written, because the file handles no longer have a corresponding file that can be used.
 
To set the log rotation for new, to-be-added subscriptions, use this guide:

For the existing subscriptions, you need to use these guides because the settings in the article mentioned above won't change the log rotations settings in the existing subscriptions:

 
Thanks guys, I thought that, put the smallest logs and that rotate 5 instead of 10 Eliminate fears hahaha Thank you
 
Back
Top