Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 28 Nov 2007 @ 13:19:53 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Chart CPU Utilization
 
From:   Meade, Cornelius

You don't say what sort of CPU metric you are looking for so for argument sake lets assume a CPU metric for one of the nodes is what you are looking for. That can be captured in resusage so if you have resusage turned on, you should have data in the appropriate resusage data table(s). At that point it just becomes an Excel exercise in building a query to get the data you want out of the resusage data tables in DBC assuming you have access to them on your system. You might have to modify the following depending on the version of your system but it should get you started....One caveat, this example is based on a TD system running under MPRAS. I have not had reason to look at this sort of thing for TD running on Windows. I would assume the format of the resusage data is the same regardless but that might be a bad assumption if that's what your environment is.

     SELECT (ResUsageSpma.TheDate || ' ' || ResUsageSpma.TheTime)
     MetricDatetime, ResUsageSpma.NodeId NodeId, ((EXTRACT(hour from TheTime)
     * 3600) + (EXTRACT(minute from TheTime) * 60) + EXTRACT(second from
     TheTime)) MetricSeconds, CAST(((ResUsageSpma.CPUIOWait +
     ResUsageSpma.CPUUServ +
     ResUsageSpma.CPUUExec)/NULLIFZERO(ResUsageSpma.NCPUs))/ResUsageSpma.Secs
     as INTEGER FORMAT 'zz9.9') TotalBusyPct,
     CAST((ResUsageSpma.CPUIOWait/NULLIFZERO(ResUsageSpma.NCPUs))/ResUsageSpm
     a.Secs as INTEGER FORMAT 'zz9.9') IOWaitPct,
     CAST((ResUsageSpma.CPUUServ/NULLIFZERO(ResUsageSpma.NCPUs))/ResUsageSpma
     .Secs as INTEGER FORMAT 'zz9.9') UserServPct,
     CAST((ResUsageSpma.CPUUExec/NULLIFZERO(ResUsageSpma.NCPUs))/ResUsageSpma
     .Secs as INTEGER FORMAT 'zz9.9') UserExecPct FROM DBC.ResUsageSpma WHERE
     ResUsageSpma.NodeId = 104 AND ResUsageSpma.TheDate = date -1 ORDER BY 2, 3 ;

Attached is an example of a graph developed from data that was returned from the query above run through Excel. One nice thing about this is that with a little forethought in setting up the queries in Excel, once you setup have things setup you can usually just refresh the underlying queries to update any graphics developed on top of them......


Cornelius Meade III
e US Consulting Services - DWoD
(DataWarehouse on Demand)


Admin Comment:
--------------

The attachment can be found on the TeradataForum website:

www.teradataforum.com/attach.htm



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016