Changeset 8153


Ignore:
Timestamp:
05/20/20 09:52:41 (7 weeks ago)
Author:
paulf
Message:

added an DontReportEventsOlderThan? option to eqassemble to minimize log growth

Location:
trunk/src/seismic_processing/eqassemble
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/seismic_processing/eqassemble/eqassemble.c

    r7300 r8153  
    2323 * v0.1.12 2017-07-18 - paulf - minor Debug output of TYPE_EVENT_SCNL message for later capture/playback 
    2424 * v0.1.13 2017-07-20 - paulf - very minor mod to clean up eqproc in logit messages, 2 places 
     25 * v0.1.14 2020-05-20 - paulf - added a don't DontReportEventsOlderThan seconds test to minimize logging of old events 
    2526 */ 
    2627 
    27 #define VERSION "0.1.13 2017-07-18" 
     28#define VERSION "0.1.14 2020-05-20" 
    2829 
    2930#define X(lon) (facLon * ((lon) - orgLon)) 
     
    116117static int  ReportS;              /* 0 means don't send S to next process   */ 
    117118static int  UseS = 0;             /* 0 means don't use S in phase count (default) */ 
     119static int  OlderThanSecs = 0;    /* 0 means don't do this test for age of origin */ 
    118120static char NextProc[150];        /* actual command to start next program   */ 
    119121static char DataSrc[2];           /* Source of data for picks               */ 
     
    964966        if (nphs_P > 0) { 
    965967            /* don't bother logging this if binder "killed" the event */ 
    966             logit( "", 
     968             
     969            /* no clue what that comment is above, probably a TODO item reminder, below we check if the  
     970               origin is older than some time and we don't report this message any more as it can fill up the logs 
     971               if the event never sees all of the phases (dups or late or what not). 
     972             */ 
     973            if (OlderThanSecs == 0 || (OlderThanSecs > 0 && (tNow - Hyp[iq].tOrigin ) < OlderThanSecs)) { 
     974                logit( "", 
    967975                   "%s:%8ld #### %s report delayed: %3d P-phs; %3d Total phases seen, %3d picks total in report\n", 
    968976                   cdate+10, Hyp[iq].id, reportPrefix, nphs_P, nSrt, Hyp[iq].nph ); 
     977            } 
    969978        } 
    970979        return; 
     
    972981        if (nphs_P > 0) { 
    973982            /* don't bother logging this if binder "killed" the event */ 
    974             logit( "", 
    975                    "%s:%8ld #### %s report delayed: %3d P-phs; %3d picks total\n", 
     983            if (OlderThanSecs == 0 || (OlderThanSecs > 0 && (tNow - Hyp[iq].tOrigin ) < OlderThanSecs)) { 
     984              logit( "", 
     985                   "%s:%8ld #### %s report delayed: %3d P-phs; %3d Total P phases seen in report\n", 
    976986                   cdate+10, Hyp[iq].id, reportPrefix, nphs_P, Hyp[iq].nph ); 
     987            } 
    977988        } 
    978989        return; 
     
    14891500                init[7] = 1; 
    14901501            } 
     1502            /*OPTIONAL*/   else if( k_its("DontReportEventsOlderThan") ) { 
     1503                OlderThanSecs = k_int(); 
     1504            } 
    14911505            /*OPTIONAL*/    else if( k_its("UseS") ) { 
    14921506                UseS = 1; 
  • trunk/src/seismic_processing/eqassemble/eqassemble.d

    r6337 r8153  
    5454#        otherwise just P phases are used in counts  
    5555 
     56 
     57# DontReportEventsOlderThan  N     # an OPTIONAL flag not to report phase counts on each report after this number of seconds  
     58#                               this will minimize the growth of logs when an event never reaches the number of phases 
     59#                               desired for the final rule.... 
     60# 
    5661# Rules for reporting events 
    5762#--------------------------- 
Note: See TracChangeset for help on using the changeset viewer.