GP - Crash Recovery Check
Generating the report if master lost connection with segments in the last 2 days
SELECT
logtime AS "Time",
substring(logmessage, 1, 100) AS "Message"
FROM gp_toolkit.gp_log_database
WHERE (logmessage like '%Lost connection to one or more segments - fault detector checking for segment failures%'
OR logmessage like '%Dispatcher encountered connection error%')
AND logtime between now() - interval '2 days' AND now()
AND logmessage not like '%gp_toolkit.gp_log_database%'
ORDER BY logtime
LIMIT 5;
In above SQL ;
am limit search interval to `2 days`, this can be increased as required.
am limit count to 5, If needed this can increased.
NOTE: This SQL will take time to execute(time depends on how big the log file size is)
SELECT
logtime AS "Time",
substring(logmessage, 1, 100) AS "Message"
FROM gp_toolkit.gp_log_database
WHERE (logmessage like '%Lost connection to one or more segments - fault detector checking for segment failures%'
OR logmessage like '%Dispatcher encountered connection error%')
AND logtime between now() - interval '2 days' AND now()
AND logmessage not like '%gp_toolkit.gp_log_database%'
ORDER BY logtime
LIMIT 5;
In above SQL ;
am limit search interval to `2 days`, this can be increased as required.
am limit count to 5, If needed this can increased.
NOTE: This SQL will take time to execute(time depends on how big the log file size is)
Comments
Post a Comment