Monitoring Logs

Version 2
    Share This:

    Here is batch/script file for managing the arerror.log file, we can also use this for other logs too.

    This batch/script check the size of a file and if it exceeds more than 999MB then it creates a backup of the existing log file and clears the contents of original file. If you want, you can delete the backup file if not required ( I am not deleting it from the script ) You need to add this script to the scheduler, so that it runs periodically to back up your logs.


    You can also use other free tools like Logrotate to manage and archive logs.


    LogRotateWin | Free Security & Utilities software downloads at


    Manage Linux log files with Logrotate - TechRepublic