MAILTO=REPL_MAILTO MAILFROM=REPL_MAILFROM PATH=/p4/common/bin:/p4/REPL_INSTANCE/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin: SHELL=/bin/bash # common tasks # Auto update the crontab */60 * * * * [ -e /p4/p4.crontab ] && crontab /p4/p4.crontab > /dev/null 2>&1 INSTANCE=REPL_INSTANCE # Master Verify - Uncomment this line if you do not have any replica servers. # 5 4 * * 6 [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/p4verify.sh ${INSTANCE} # Run the wweekly maintenance script to clean up old users, labels, workspaces and changelists. Be sure to set up the maintenance.cfg file. 0 20 * * 4 /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/sdp/Maintenance/maintenance ${INSTANCE} 0 19 * * 4 /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/sdp/Maintenance/edge_maintenance ${INSTANCE} # Run p4 unlock -x on edge servers each hour to remove exclusive locks that shouldn't be there. */60 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} p4 unlock -x > /dev/null 2>&1 */60 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} p4 unlock -x > /dev/null 2>&1 # Update the limits group to make sure all users are listed in it. */60 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/update_limits.py ${INSTANCE} # Checkpoints # Run recreate_db_checkpoint.sh on the first Saturday afternoon in Jan. and July. 5 12 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/rotate_journal.sh ${INSTANCE} 5 13 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/recreate_db_checkpoint.sh ${INSTANCE} 5 2 * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/daily_checkpoint.sh ${INSTANCE} 35 13 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/common/bin/recreate_db_checkpoint.sh ${INSTANCE} 35 2 * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/common/bin/daily_checkpoint.sh ${INSTANCE} # p4review daemon */5 * * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_master.sh ${INSTANCE} /p4/common/bin/p4review.py ${INSTANCE} # Replica Tasks # Verify # Run the replica verify quarterly. # Use the -P parameter to run a parallel verify on the replica servers. 5 21 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/p4verify.sh ${INSTANCE} -P 6 # Sync checkpoints from master 0 8 * * 0-6 [ -e /p4/common/bin ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/sync_replica.sh ${INSTANCE} # Run recreate_db_checkpoint.sh on the first Saturday afternoon in Jan. and July. 5 18 * 1,4,7,10 6 [ $(date +\%d) -le 07 ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/recreate_db_sync_replica.sh ${INSTANCE} # If you can't run the scripts above due to rsync issues, then run this one instead. # 0 5 * * 0-5 [ -e /p4/common/bin ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/replica_cleanup.sh ${INSTANCE} # Replica Status 0 8 * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/replica_status.sh ${INSTANCE} > /dev/null 0 8 * * * [ -e /p4/common/bin ] && /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/common/bin/replica_status.sh ${INSTANCE} > /dev/null # Cache Purge on Edge servers - Uncomment to run. # 0 22 * * * /p4/common/bin/run_if_edge.sh ${INSTANCE} /p4/common/bin/p4cachepurge.sh
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#26 | 29364 | Russell C. Jackson (Rusty) | Updated to be a normal crontab now that I am managing cron via Ansible. | ||
#25 | 29327 | Russell C. Jackson (Rusty) | Increased journal rotations | ||
#24 | 29145 | Russell C. Jackson (Rusty) | Updates to make sync replica run on alternate days to handle large checkpoints better. | ||
#23 | 29139 | Russell C. Jackson (Rusty) | Added check for 2GB of free space in offline db before allowing scripts to proceed. | ||
#22 | 29056 | Russell C. Jackson (Rusty) | Forgot to comment new line. | ||
#21 | 29053 | Russell C. Jackson (Rusty) | Changed crontab to UTC and fixed recreate_db_checkpoint.sh to replay journals to offline db before stopping the service to reduce the downtime. | ||
#20 | 28972 | Russell C. Jackson (Rusty) | Commented out kill_idle. | ||
#19 | 28952 | Russell C. Jackson (Rusty) | Corrected wweekly typo. | ||
#18 | 28939 | Russell C. Jackson (Rusty) | Modified unlock to only run every six hours. | ||
#17 | 28937 | Russell C. Jackson (Rusty) | Commented things out to work better with Ansible installs. | ||
#16 | 28933 | Russell C. Jackson (Rusty) | Modified crontab to better suit current environment. | ||
#15 | 28869 | Russell C. Jackson (Rusty) | Added kill_idle.sh to crontab and modified kill_idle.sh to use p4 monitor terminate and removed 1 hour ignore. | ||
#14 | 28171 | Russell C. Jackson (Rusty) | Crontab updates. | ||
#13 | 28016 | Russell C. Jackson (Rusty) | Added verify_shelves.sh to crontab since Perforce doesn't always replicate them to standby servers. | ||
#12 | 28005 | Russell C. Jackson (Rusty) | Fixed missing OFFLINECHECKPOINTNUM issue and fixed entries in template.p4.crontab. | ||
#11 | 26942 | Russell C. Jackson (Rusty) | Changed crontab to run cacheclean hourly with the new free space check. | ||
#10 | 24675 | Russell C. Jackson (Rusty) |
Fixed bugs in sdputils.py and scripts using it. Converted to standard 2 space spacing, removed copyright stuff. |
||
#9 | 24138 | Russell C. Jackson (Rusty) |
Added the line to run the p4cachepurge. Commented though so it has to be turned on to run. |
||
#8 | 24080 | Russell C. Jackson (Rusty) | Redirect unlock to dev null and autoload the crontab. | ||
#7 | 24077 | Russell C. Jackson (Rusty) | Added cron jobs to run p4 unlock -x | ||
#6 | 24075 | Russell C. Jackson (Rusty) | Added maintenance and edge_maintenance to crontab, created edge_maintenance and updated maintenance. | ||
#5 | 22836 | Russell C. Jackson (Rusty) | Added the -P flag to the verify on replica servers to run in parallel. | ||
#4 | 22812 | Russell C. Jackson (Rusty) | Added missing #. | ||
#3 | 22805 | Russell C. Jackson (Rusty) | Commented out master verify as the default, and changed replica verify to run quarterly. | ||
#2 | 22803 | Russell C. Jackson (Rusty) | Added replica status for the edge server. | ||
#1 | 22693 | Russell C. Jackson (Rusty) |
Branched a Unix only version of the SDP. Removed extra items to create a cleaner tree. Moved a few items around to make more sense without Windows in the mix. |