Symptom
FME Server log files can accumulate rapidly and take up significant space on your file system. The KML network link service or other real-time services in particular create a large number of log files.
Cause
Every workspace run by FME Server created a log file and every component of FME Server created a log file when it is restarted.
Resolution
FME Server 2016 and Newer
In FME Server 2015, under the Admin section on the side bar, there is a System Cleanup option. In here you will find tools to automatically clean up files or manually select files to remove. For more information please see the documentation: Cleaning up FME Server Log Files and Other Directories
FME Server 2015
In FME Server 2015, a set of system maintenance tools are provided in the Administration section. These provide more options for cleaning out old log files from the system. Please see the documentation for more information: Cleaning up FME Server Log Files and Other Directories
FME Server 2012 through 2014
In FME Server 2012 a sample workspace is provided in the Utilities repository to delete outdated log files. There is a scheduled task for this workspace that can be enabled to clean up the logs on a regular interval. To locate this scheduled task to go to the Web Admin User Interface (http://<host>:<port>/fmeserver-admin/ and click on the Schedules tab. Double-click on the scheduled task entitled Purge_Logs. Here you can set the task to happen at any interval you wish and "Enable" it.
FME Server 2011 and Older
Alternatively and in older versions of FME you may need to create your own script to delete the log files. It is recommended that you leave the directory structure in tact but remove individual log files from the FME Server logs directory here:
<FMEServerDir>\Logs\
Here is a sample shell script you can use to help clean up the log files on Linux.
- Ensure FME Server is shutdown so the log files are not locked. You will also need to shutdown the servlet engine (i.e. Tomcat) since the services logs, i.e. datadownload_1234567890.log, are created by the services which are run by the servlet engine, not FME Server.
- Create the following shell script:
#---------------------------------------------------------- # Purge FME application logs #---------------------------------------------------------- #---------------- # Stop FME Server #---------------- /<install>/FMEServer/Server/stopServer.sh sleep 120 #---------------- # Backup FME Logs #---------------- cd /<install>/FMEServer/Logs if [ -e fmelogs.tar.z ]; then rm fmelogs.tar.z fi find . -name '*.log' -print > fmelogs.lst cat fmelogs.lst|xargs tar cvf fmelogs.tar gzip fmelogs.tar #---------------- # Purge FME Logs #---------------- find . -name '*.log' -exec rm -f {} \; #----------------- # Start FME Server #----------------- /<install>/FMEServer/Server/startServer.sh &
Comments
0 comments
Please sign in to leave a comment.