2010/06/09

Res Usage

SELECT
TheDate (FORMAT'yy/mm/dd', TITLE 'Date'),
TheTime (FORMAT'99:99:99', TITLE 'Time'),
/* Percent of time the CPUs were busy doing work */
SUM(CPUBusy) / SUM(Secs) (FORMAT 'ZZ9', TITLE 'CPU使用率(%)'),
/* Parallel efficiency of total pct of time CPUs were busy */
(AVG(CPUBusy)*100)/NULLIFZERO(MAX(CPUBusy)) (FORMAT 'ZZ9', TITLE 'CPUの並列効率(%)'),
/* Percent of time spent waiting for I/O */
SUM(CPUWaitIO)/SUM(Secs) (FORMAT 'ZZ9', TITLE 'I/O待ち(%)'),
/* Pct logical device I/Os done for paging */
SUM(PageOrSwapIO)*100/NULLIFZERO(SUM(LogicalDeviceIO)) (FORMAT 'ZZ9', TITLE 'I/Oに占めるページング・スワップの割合(%)'),
/* Percent of memory that is unused */
SUM(MemFreeKB)*100/NULLIFZERO(SUM(MemSize(FLOAT))*1024) (FORMAT 'ZZ9', TITLE '空きメモリ(%)'),
/* Percent of memory allocation attempts that failed */
SUM(MemFails)*100/NULLIFZERO(SUM(MemFails+MemTextAllocs+MemVprAllocs)) (FORMAT 'ZZ9', TITLE 'メモリ割り当て失敗(%)')
FROM DBC.ResGeneralInfoView
WHERE TheDate BETWEEN '2009-11-13' AND '2009-11-13'
/* and SUBSTR( cast(TheTime AS VARCHAR(8) ), 4, 2 ) in ('00', '15', '30', '45') */
/* and SUBSTR( cast(TheTime AS VARCHAR(8) ), 5, 1 ) in ('0', '5') */
GROUP BY TheDate, TheTime
ORDER BY TheDate, TheTime ;

No comments:

Post a Comment