
Reclaiming Disk Space Using Log Rolling Scripts
Three predefined scripts are executed automatically to reclaim space used on your server for log files generated by
•Apple file service
•Windows service
•Web service
•Web performance cache
•Mail service
•Print service
The scripts use values in the following configuration files to determine whether and how to reclaim space:
•The script /etc/periodic/daily/600.daily.server runs daily. Its configuration file is /etc/diskspacemonitor/daily.server.conf.
•The script /etc/periodic/weekly/600.weekly.server is intended to run weekly, but is currently empty. Its configuration file is /etc/diskspacemonitor/weekly.server.conf.
•The script /etc/periodic/monthly/600.monthly.server is intended to run monthly, but is currently empty. Its configuration file is /etc/diskspacemonitor/monthly.server.conf.
As configured, the scripts specify actions that complement the log file management performed by the services listed above, so don’t modify them. All you need to do is log in as an administrator and use a text editor to define thresholds in the configuration files that determine when the actions are taken:
•the number of megabytes a log file must contain before its space is reclaimed
•the number of days since a log file’s last modification that need to pass before its space is reclaimed
Specify one or both thresholds. The actions are taken when either threshold is exceeded.
There are several additional parameters you can specify. Refer to comments in the configuration files for information about all the parameters and how to set them. The scripts ignore all log files except those for which at least one threshold is present in the configuration file.
To configure the scripts on a server from a remote Mac OS X computer, open a Terminal window and log in to the remote server using SSH. Then open a text editor and edit the scripts.
You can also use the diskspacemonitor
Chapter 6 Working With Disks and Volumes
49