SFX Maintenance Tasks
Recommended SFX Maintenance Tasks
Database Maintenance
File System Maintenance
- Archive statistics – Archiving statistics is recommended whenever your offline table reaches over 200,000 records. For more information regarding statistics maintenance, refer to the SFX Statistics Module section of the SFX Advanced User's Guide.
- Clean the session and temporary files – These files are created under each instance in the <instance>/dbs/scratch/ directory. These also include files created using export tools in SFX Admin.
The number of files created varies depending on use of the different SFX tools. Do not to remove any files when someone is working in SFX Admin.
To clean this directory, log on to the SFX server as an instance user and select option 5 Clean /exlibris/sfx_ver/sfx4_1/sfxlcl41/dbs/scratch/ from the Filesystem Maintenance menu of the Server Admin Utility. (For more information, see Clean /exlibris/sfx_ver/sfx4_1/sfxlcl41/dbs/scratch/.)
- Clean the files created during the revision update – The files such as logs, downloaded packages, and backup files are created during the revision update in the /exlibris/sfx_ver/sfx4_1/tmp directory. Clean this directory every few months before running a revision update.
To clean this directory, log on to the SFX server as the sfxglb41 user and select option 1 Clean /exlibris/sfx_ver/sfx4_1/tmp/ from the Filesystem Maintenance menu of the Server Admin Utility. (For more information, see Clean /exlibris/sfx_ver/sfx4_1/tmp/.)
- Clean the reverse proxy Apache logs – These log files are located in the /exlibris/sfx_ver/sfx4_1/proxy/logs directory.
To clean this directory, log on to the SFX server as any user and select option 2 Clean Apache log from the Filesystem Maintenance menu of the Server Admin Utility. (For more information, see Clean Apache and MySQL Logs.)
- Clean the instance Apache logs – Each Apache instance also creates log files in the <instance>/logs/apache/ directory. To clean these files, log on to the SFX server as an instance user. There are two options:
- Automatically – Use the server_admin_util by selecting option 4 /exlibris/sfx_ver/sfx4_1/<instance>/logs/ from the Filesystem Maintenance menu of the Server Admin Utility. (For more information, see Clean /exlibris/sfx_ver/sfx4_1/sfxlcl41/logs/ .)
- Manually – Navigate to the <instance>/logs/apache/ directory and clean the access_log and error_log files, as follows:
- Type the following:
|
lg cd apache rm access_log rm error_log |
- Restart Apache by typing:
|
apachectl restart |
- Clean the MySQL logs – If you enabled MySQL binary logging (it is not enabled by default in SFX), binary log files are created in the /exlibris/sfx_ver/sfx4_1/data directory.
To clean this directory, log on to the SFX server as any user and select option 3 Clean MySQL log from the Filesystem Maintenance menu of the Server Admin Utility. (For more information, see Clean Apache and MySQL Logs .)
Cleaning the MySQL logs requires the MySQL root password and the UNIX password of the sfxglb41 user.
- Clean the MARCit! export files – When exporting files to MARCit!, several files are created in different locations on the SFX server, such as the <instance>/export and <instance>/home directories. Clean these files once they are no longer used.
Note that the recommended frequency of cleaning files can vary depending on the amount of usage different SFX components receive and the amount of free disk space available on the SFX server.
- Clean the SFX_REQUEST table – The SFX_REQUEST table is used to store data required to generate each SFX menu screen. This data is of requests before they get processed by the statistics module. It is not directly related to statistics tables, so cleaning it does not result in a loss of statistical data.
When you clean the SFX_REQUEST table using the Server Admin Utility, the last 24 hours of requests in the table are saved. This information is necessary for SFX_REQUEST to function so that the end users can continue to use the system.
For information on cleaning the SFX_REQUEST table immediately, see Clear SFX_REQUEST Table.
To schedule the cleaning of the SFX_REQUEST table for a later time, see Schedule Clearing of SFX_REQUEST Table.
Centralized Management of Maintenance Tasks
|
Maintenance tasks can be scheduled only by the system administrator of this SFX installation. This option is not available for local SFX instances. |
Configuring Centralized Management of Maintenance Tasks
- A switch to turn centralized management on/off
- The frequency and day of the week or month the task is run. Values can be
- every_day
- one or more weekdays (comma delimited)
- day_of_month_<two-digit number between 01‐31>>
- specific dates by setting the frequency parameter in the following format: specific_dates_<MMM-DD>. It is possible to specify more than one date (comma delimited) for example:
Section "cleanup_sfx_request_table"
active "1"
frequency "specific_dates_JAN-01,APR-015,JUL-01,OCT-15"
instances "#all#"
- A list of instances for which the job should be run. Values can be #all#, #all_except_tst#, #file#, #global# or a comma delimited list of one or more instances.
- If you entered #all# the config/instances.config list of local instances is used.
- If #all_except_tst# is entered, the config/instances.config list of local instances is used except for any instances that have tst or test in the instance name.
- If #file# is entered, the list of instances is taken from sfxglb41/config/rsi_ebook_setup.config_ in the index_build section.
- Add a new section with name of the tasks in the config/central_management.config_ file:
|
Section "indices_AZ_Journals_1" active "1" frequency "sunday,wednesday" instances "instance1,instance2" EndSection Section "indices_AZ_Journals_2" active "1" frequency "monday,thursday" instances "instance3,instance4,instance5" EndSection |
- Add the following lines in the all_jobs section:
|
indices_AZ_Journals_1 "admin/aztools/az_index_builder.pl" indices_AZ_Journals_2 "admin/aztools/az_index_builder.pl" |
|
Section "CDI_export_1" active "1" frequency "every_day" instances "A" EndSection
Section "AllJobs" CDI_export_1 "admin/kbtools/cdi_export.cron -service=getFullTxt --service=getSelectedFullTxt --original_title_format=both --object_type=JOURNAL --object_type=BOOK --mode=manual --format=CDI --institute=InstA --institute=InstB --institute=InstC" |
|
# Multiple instances - no institutes Section "CDI_export_2" active "0" frequency "every_day" instances "B,C,D" EndSection
Section "AllJobs" # Multiple instances - no institutes CDI_export_2 "admin/kbtools/cdi_export.cron --service=getFullTxt --service=getSelectedFullTxt --original_title_format=both --object_type=JOURNAL --object_type=BOOK --mode=manual --format=CDI" |
- As the root user, create a cronjob that starts the centralized maintenance script every night (for example at midnight) to check if any tasks should be run that night:
- Type crontab -e.
- Enter the following at the top of the maintenance window of the server.:
00 20 * * * /exlibris/sfx_ver/sfx4_1/sfxglb41/admin/CentralJobManagement/central_crons.cron
For more information on cron jobs, including the structure of the scheduling time/date definition, see http://en.wikipedia.org/wiki/Cron.
- Activate Central Job Management:
- In the centralized_management section of the /exlibris/sfx_ver/sfx4_1/sfxglb41/config/central_management.config_ file, set the active parameter to 1.
- Set the email parameter to a comma separated list of email addresses (no spaces) to which you to send a report of errors in jobs.
- For each maintenance task, check its frequency and the list of instances for which the task should be run.
- For the eBook Search index, the configuration file is set up to use the list of instances specified in the sfxglb41/config/rsi_ebook_setup.config_ file in the index_build section. If this configuration file does not contain the list of instances for which you want to build the index, use one of the following options to configure the relevant instances:
- List of specific instances
- #all# - not recommended
- #all_except_test#
- Validate the configuration file. As the root user, run /exlibris/sfx_ver/sfx4_1/sfxglb41/admin/CentralJobManagement/central_crons.cron --validate. The output should be Configuration is valid.
- Remove or comment out the existing crontabs entries that have been replaced by the centralized management of maintenance tasks script.
- Log on to the SFX server as each instance user and type:
crontab -e
- Remove the following crontab jobs:
- admin/stats/online2offline.pl --f
- admin/filesystem/clean_dir.pl --directory=logs --type=scheduled
- admin/filesystem/clean_dir.pl --directory=scratch --type=scheduled
- admin/filesystem/clean_dir.pl --directory=export --type=scheduled
- admin/filesystem/clean_dir.pl --directory=tmp --type=scheduled
- admin/database/clear_sfx_requests.pl --force
- admin/rsi_tools/rsi_index_builder.pl
- admin/rsi_tools/rsi_index_builder.pl --object_type=m --build_type=c
- admin/rsi_tools/rsi_index_builder.pl --object_type=m --build_type=i --no_complete_build
- admin/rsi_tools/rsi_index_builder.pl --object_type=m --build_type=i
- admin/aztools/solr_index_builder.pl --build_type=c
- admin/aztools/solr_index_builder.pl --build_type=i --no_complete_build
- admin/aztools/solr_index_builder.pl --build_type=i
admin/aztools/az_index_builder.pl
- Log on to the SFX server as each instance user and type:

