Changes between Initial Version and Version 1 of drmsSumRm


Ignore:
Timestamp:
02/10/14 12:22:38 (11 years ago)
Author:
niles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • drmsSumRm

    v1 v1  
     1= Managing disk use with sum_rm = 
     2 
     3sum_rm is the program that ages data off disk in the NetDRMS system. The configuration file for sum_rm resides in the same directory 
     4as the log files for the program. A highly commented configuration file for sum_rm is included here, as it pre-dates the wiki and documents most of 
     5the relevant points. 
     6 
     7The configuration file is below : 
     8 
     9{{{ 
     10#                                                          
     11# Configuration file for sum_rm program                    
     12#                                                          
     13# The sum_rm program does disk data age off (ie. deletes old data) to stop 
     14# disk partitions from filling up. It is started as                        
     15# a service along with the rest of sums. It works as follows.              
     16#                                                                          
     17# In the sum_partn_alloc table of the DRMS database,                       
     18# there is an 'effective_date' column. After the                           
     19# effective_date, the data product may be deleted by sum_rm.               
     20#                                                                          
     21# sum_rm runs repeatedly. For each run, sum_rm does the following :        
     22#                                                                          
     23# [1] It reads this configuration file (allowing                           
     24#     dynamic adjustment of these parameters, ie. you do not               
     25#     need to restart the sum_rm program for a config change               
     26#     to take effect, which is very handy).                                
     27# [2] Accesses the database and orders results by effective_date.          
     28# [3] Starts deleting products from disk if the effective_date is in the past, 
     29#     until one of three conditions is met :                                   
     30#      (a) The disk has at least PART_PERCENT_FREE percent                     
     31#          of free space on it (see below), or                                 
     32#      (b) There are no more cases in which effective_date is in the past, or  
     33#      (c) At least 600 deletions have taken place (this is defined in         
     34#          the LIMIT statement in the file SUMLIB_RmDoX.pgc). 
     35# [4] Sleeps for the time defined by the SLEEP parameter (see below) before the next run, 
     36#     then goes back to [1] for the next run. 
     37# 
     38############# sum_rm parameters ########################## 
     39# 
     40# Number of seconds to sleep between runs of sum_rm 
     41SLEEP=60 
     42# 
     43# Integer percent of each disk partition to be kept free. Applies to all partitions. 
     44# Defaults to 3 if not specified. Setting PART_PERCENT_FREE=5 will allow 
     45# partitions to fill to 95%. Note that the math the 'df' command uses 
     46# tends to round up, but dividing the number of used blocks by the total 
     47# number of blocks should give the result specified by PART_PERCENT_FREE. 
     48# 
     49# NOTE : This parameter used to be specified as MAX_FREE_0, MAX_FREE_1... 
     50#        ...MAX_FREE_n, which specified the number of free MB on different partitions, 
     51#        but this is no longer the case and specifying 
     52#        MAX_FREE_{n} will have no effect as of NetDRMS 7.0. If 
     53#        MAX_FREE_{n} is specified and PART_PERCENT_FREE is not, 
     54#        then the default PART_PERCENT_FREE=3 will be used and 
     55#        disk partitions will fill to 97%. 
     56PART_PERCENT_FREE=4 
     57# 
     58# Log file (only opened at startup and pid gets appended to this name) 
     59LOG=/usr/local/logs/SUM/sum_rm.log 
     60# 
     61# Who to email when there's a notable problem 
     62MAIL=oien@nso.edu 
     63# 
     64# To prevent sum_rm from doing anything set NOOP to non-0. 
     65NOOP=0 
     66# 
     67# sum_rm can only be enabled for a single user as defined by USER. 
     68USER=production 
     69# 
     70# Don't run sum_rm between these NORUN hours of the day (0-23). 
     71# Comment out to ignore, or set them both to the same hour. 
     72# The NORUN_STOP must be >= NORUN_START. 
     73# 
     74# Don't run when the hour first hits NORUN_START 
     75NORUN_START=7 
     76# 
     77# Start running again when the hour first hits NORUN_STOP 
     78NORUN_STOP=7 
     79}}}