Peak Cpu Reporting

by Jun 14, 2007

Recently a user asked if up.time could report on a 'peak average' for system CPU. We came up with the query below, it averages all CPU values that are over 80% to give is the average of only the peak CPU values. Putting this into Tableau and cleaning up the heatmap options gives us a nice look at peak cpu average for the past month on some local systems. This heatmap shows bigger dots for higher peak averages, places where there are no dots indicate there were no peaks over 80%. Here is the SQL we started with

select display_name, WEEK(sample_time), DAY(sample_time), count(*), avg(cpu_sys+cpu_usr) from performance_aggregate pa, performance_sample ps, entity
where pa.sample_id = ps.id and ps.sample_time and entity.entity_id = ps.uptimehost_id and sample_time like '2007-05%' and cpu_sys+cpu_usr > 80
group by display_name, WEEK(sample_time), DAY(sample_time);

here is a pic that of the heat map

[attachment=55:cpu_peak_pic.PNG]