Thanks for having look into this.
But is there any other files that we can empty in order to get some disk space free ?
What size is the drive or partition for "/var"? I ask because you may need to consider using a larger drive and or larger partition size when considering future growth and accounting for the natural increase of data being stored.
Use the following commands as an example to obtain the disk usage for directories within the path "/var":
Code:
# du -ax --max-depth 1 /var | sort -n | tail
# du -ax --max-depth 1 /var/lib | sort -n | tail
# du -ax --max-depth 1 /var/log | sort -n | tail
To show the disk usage in a human-readable format then you may also try the following examples (that will report files with sizes in Megabytes or Gigabytes, excluding files with sizes in Kilobytes):
Code:
# du -ahx --max-depth 1 /var | sort -k2 | egrep "[0-9](M|G)"
# du -ahx --max-depth 1 /var/lib | sort -k2 | egrep "[0-9](M|G)"
# du -ahx --max-depth 1 /var/log | sort -k2 | egrep "[0-9](M|G)"
Using the disk usage information obtained you may consider whether or not to remove certain files; extreme caution should be practiced to ensure that required files are retained and not inadvertently deleted.
I would also consider ensuring that your logrotate configuration has compression enabled, as seen by the following command and desired output:
Code:
# egrep "compress$" /etc/logrotate.conf
compress
If the directive "compress" is commented, that is, with an extra character in front of the directive to disable it, then you will want to edit the logrotate configuration file (at a path of "/etc/logrotate.conf") to remove the extra character.
Code:
# uncomment this if you want your log files compressed
#compress
You may also edit the same configuration file ("/etc/logrotate.conf") to reduce the number of older logs that are archived:
Code:
# keep 4 weeks worth of backlogs
rotate 4