How To: Force log files to rotate

Rupert Harwood -

ClustrixDB outputs to  several different log files, the main three being CLUSTRIX(default), QUERY, and DEBUG. By default these three logs will rollover and start a new log file when the Log file reaches 1GB in size.

By default the cluster will hold for each log type 10 uncompressed log files and 20 gzipped log files for a total of 90 files. So in the most very extreme situations the logs could take up to 35-40GB of space.

If you would like to force the log files to rollover before the 1GB size limit is met, you may invoke the memlog rollover function with the the clx cp command.

Example:

/opt/clustrix/bin/clx cp 'memlog rollover default'
/opt/clustrix/bin/clx cp 'memlog rollover query'

This will cause the clustrix.log (aka default log) and the query.log, respectively to rotate and start a new file.

The method for the legacy Clustrix Appliance is a bit different. You will need to call the script /bin/logrotate.pl with the argument of the log file to rotate.

Example:

clx cmd "/bin/logrotate.pl /var/log/sprout.log"
clx cmd "/bin/logrotate.pl /var/log/query.log"

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk