Measure CPU Capacity over time

General

Measure CPU Capacity over time

We are in "developement stage" for creating monthly capacity reports for CPU utilization by querying ResUsageSPMA table for the follwoing metrics for CPU over last 30 days,exporting the output to excel to produce the fllowing graph. Are we on the right "path" ? Is this the correct methodology? This is our first experience producing capacity information for Teradata.

((sum(CPUUExec)) / (sum(CPUIoWait+CPUUExec+CPUUServ+CPUIdle)) )  *100 as CPU_USR,

((sum(CPUUServ)) / (sum(CPUIoWait+CPUUExec+CPUUServ+CPUIdle)) )  *100 as CPU_SYS,

((sum(CPUIoWait)) / (sum(CPUIoWait+CPUUExec+CPUUServ+CPUIdle)) ) *100 as CPU_WIO,

((sum(CPUIdle))    / (sum(CPUIoWait+CPUUExec+CPUUServ+CPUIdle)) )   *100 as CPU_IDLE

1 REPLY
Enthusiast

Re: Measure CPU Capacity over time

Yes, you are correct.

I used the following query to calculate CPU utilization:

SELECT TheDate AS Resusage_Date ,

 TheTime(FORMAT '99:99:99')AS Resusage_Time,

 ((SUM(CPUUExec)) / (SUM(CPUIoWait+CPUUExec+CPUUServ+CPUIdle)) ) *100 AS CPU_USR,

 ((SUM(CPUUServ)) / (SUM(CPUIoWait+CPUUExec+CPUUServ+CPUIdle)) ) *100 AS CPU_SYS,

 ((SUM(CPUIoWait)) / (SUM(CPUIoWait+CPUUExec+CPUUServ+CPUIdle)) ) *100 AS CPU_WIO,

 ((SUM(CPUIdle)) / (SUM(CPUIoWait+CPUUExec+CPUUServ+CPUIdle)) ) *100 AS CPU_IDLE,

 ((SUM(cpuuserv+cpuuexec))/(SUM(cpuiowait+cpuuexec+cpuuserv+cpuidle))*100) AS CPU_USAGE_TOTAL

FROM dbc.resusagespma r, sys_calendar.CALENDAR c

WHERE r.thedate = c.calendar_date

AND TheDate BETWEEN date-30 AND date

GROUP BY 1,2

ORDER BY 1,2;

Thanks,

Harsha.