System load statistics
1. Monthly Tracking
USE CASE:
- Retrieve the system load average value per hour for the last month
SELECT DATE_FORMAT(collection_time, "%Y-%m-%d %H:00:00") as "collection_time",
AVG(total_process_count) as "average_total_process_count"
FROM mysql_processlist_log
WHERE collection_time>NOW() - INTERVAL 30 DAY
GROUP BY 1
Click to copy