Controlling logging space
You can control the amount of disk space that the logging directory can consume. This allows the system to operate smoothly within a specified space window for a long period of time.
After you establish a space limit, Content Gateway continues to monitor the space in the logging directory. When the free space dwindles to the headroom limit (see Setting log file management options), Content Gateway enters a low space state and takes the following actions:
- If the autodelete option (discussed in Rolling event log files) is enabled, Content Gateway identifies previously rolled log files (log files with a .old extension) and starts deleting files one by one—beginning with the oldest file— until it emerges from the low state. Content Gateway logs a record of all files it deletes in the system error log.
- If the autodelete option is disabled or there are not enough old log files to delete for the system to emerge from its low space state, Content Gateway issues a warning and continues logging until space is exhausted. Content Gateway resumes event logging when enough space becomes available for it to exit its low space state. You can make space available by removing files from the logging directory or by increasing the logging space limit.
You can run a cron script in conjunction with Content Gateway to automatically remove old log files from the logging directory (before Content Gateway enters the low space state) and relocate them to a temporary partition. Once the files are relocated, you can run log analysis scripts on them, and then you can compress the logs and move them to an archive location or delete them.