beautypg.com

Diskspacemonitor – Apple Mac OS X Server (Administrator’s Guide) User Manual

Page 556

background image

556

Chapter 17

m 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.

m 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 do not 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:

m the number of megabytes a log file must contain before its space is reclaimed

m 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 command-line tool to reclaim disk space.

diskspacemonitor

When you need more vigilant monitoring of disk space than the log rolling scripts provide,
you can use the diskspacemonitor command-line tool. It lets you monitor disk space and
take action more frequently than once a day when disk space is critically low, and gives you
the opportunity to provide your own action scripts.

diskspace monitor is disabled by default. You can enable diskspacemonitor by opening a
Terminal window and typing “sudo diskspacemonitor on”. You may be prompted for your
password. Type “man diskspacemonitor” for more information about the command-line
options.

When enabled, diskspacemonitor uses information in a configuration file to determine when
to execute alert and recovery scripts for reclaiming disk space:

m The configuration file is /etc/diskspacemonitor/diskspacemonitor.conf. It lets you specify

how often you want to monitor disk space and thresholds to use for determining when to
take the actions in the scripts. By default, disks are checked every 10 minutes, an alert
script executed when disks are 75% full, and a recovery script executed when disks are
85% full. To edit the configuration file, log in to the server as an administrator and use a
text editor to open the file. See the comments in the file for additional information.

This manual is related to the following products: