During setup two jobs are scheduled to delete old data.
Deleting old EEM data
EEM data is deleted by the batch job EEM_DATA_HK. You can specifiy how long the results from EEM script executions are kept. The default value is 30 days.
Deleting E2E Traces
When system times are collected they are also persisted in the Java stack by the E2E Trace application. The batch job EEM_TRACE_HK (Report SMD_E2E_TRACE_DELETE) deletes the E2E Traces created by EEM. You can specify how long the E2E Traces are kept in two steps:
1. Deleting old traces after n hours. the default value is 168 hours (7 days).
2. Deleting traces that are not rated red. All traces that did not lead to a red execution in EEM are deleted faster. The default time for deleting these traces is 24 hours.
When many traces are collected (> 10.000 script executions per day) it makes sense to schedule the job two times per day.
It is very important to check regularly the result of the housekeeping job EEM_TRACE_HK. If you collect many system data or traces and house keeping job is not running correctly table BC_WA_TMETADATA is growing constantly and the SAP J2EE engine of the Solution manager could run into an OutOfMemory. When the job has not been running for a longer time but in parallel many traces have been collected the housekeeping job itself could run into an OutOfMemory when deleting the traces. In that case you could start the attached program Z_E2E_TRACE_DELET in background.
The parameters specify:
max_age: Live time (in hours)for E2E Traces that should be deleted.
min_age: Live time (in hours) for E2E Traces that should not be deleted
delta_t: Step size (in hours) how max_age is decreased until min_age is reached.
*&---------------------------------------------------------------------* *& Report Z_E2E_TRACE_DELETE *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* * Delete traces older than max_age (in hours) in a loop with a delta (in hours) * of delta_t until min_age is reached. REPORT z_e2e_trace_delete line-SIZE 255. DATA: return_status TYPE e2e_return_status. DATA msg TYPE msg. DATA: t1 TYPE i, t2 TYPE i. PARAMETERS: rfcdest TYPE rfcdest DEFAULT 'WEBADMIN', max_age TYPE int4 DEFAULT 2975, min_age TYPE int4 DEFAULT 168, delta_t TYPE int4 DEFAULT 8. IF rfcdest IS INITIAL. rfcdest = 'WEBADMIN'. ENDIF. max_age = max_age - delta_t. WRITE:/ 'Delete all entries older than:'. Write:/ 'Age[h]', 11 'Result', 80 'Response Time [ms]'. WHILE min_age LE max_age. GET RUN TIME FIELD t1. CALL FUNCTION 'SMD_DELETE_E2ETRACE' DESTINATION rfcdest EXPORTING age = max_age collected_traces = 'X' trace_type = 'EEM' IMPORTING return_status = return_status EXCEPTIONS system_failure = 3 MESSAGE msg communication_failure = 4 MESSAGE msg. GET RUN TIME FIELD t2. IF sy-subrc = 0. t2 = ( t2 - t1 ) div 1000. WRITE:/ max_age NO-GAP, return_status-message, 80 t2. ELSE. WRITE:/ msg. RETURN. ENDIF. max_age = max_age - delta_t. ENDWHILE.