c8ebe4b0f0
PHASE 2 ENHANCEMENTS (5 new features):
1. LOAD TREND DIRECTION ANALYSIS
- Analyzes 1min vs 5min vs 15min load averages
- Detects RISING (problem worsening), FALLING (resolving), or STABLE
- Provides snapshot counts for each trend type
- Critical for understanding if issue is active or resolving
2. CONNECTION STATE BREAKDOWN
- Parses network connection states from logs
- Aggregates by state (ESTABLISHED, SYN_RECV, CLOSE_WAIT, TIME_WAIT, etc)
- Shows average and total counts per state
- Detects:
* SYN flood attacks (high SYN_RECV)
* Connection leaks (high CLOSE_WAIT)
* Excessive TIME_WAIT (may need tuning)
3. MEMORY GROWTH VELOCITY TRACKING
- Calculates rate of memory consumption change
- Tracks MiB/hour growth or decline
- Predicts time until OOM if memory is declining
- Proactive alert: "Memory declining - OOM predicted in X hours"
- Shows whether memory is stable, increasing, or declining
4. R-STATE PROCESS COUNT
- Counts runnable (R-state) processes waiting for CPU
- Better CPU pressure metric than load average alone
- R-state > CPU cores = CPU contention
- Detects:
* Severe CPU pressure (R-state > 10)
* Moderate contention (R-state > 5)
* Normal range (R-state <= 5)
5. MYSQL THREAD ANOMALY DETECTION
- Parses summary line mysql[current/expected] format
- Alerts when current > 3x expected threads
- Shows anomaly delta (extra threads)
- Detects connection storms and thread explosions
- Tracks httpd process count for correlation
REPORT SECTIONS ADDED:
- MySQL Thread Anomaly alerts in Critical Alerts section
- Memory Growth Velocity in Memory Analysis section
- Load Trend Direction in CPU & Load Analysis section
- CPU Pressure Analysis (R-state) - new dedicated section
- Network Connection Analysis - new dedicated section
PARSING ENHANCEMENTS:
- Enhanced summary line parsing for mysql[X/Y] format
- R-state process counting from top output
- Network state aggregation from network stats section
- Httpd count tracking for trending
ANALYSIS IMPROVEMENTS:
- Predictive OOM warnings based on memory velocity
- Trend-based load analysis (not just absolute values)
- State-specific network connection warnings
- CPU pressure quantification via R-state
IMPACT:
- Shifts from reactive (what happened) to predictive (what will happen)
- Provides trend analysis for problem resolution tracking
- Detects attacks and leaks from connection state patterns
- Better CPU pressure understanding via R-state metrics
- MySQL connection storm early warning system
All features tested and validated on production logs.