|
|
Archives of the TeradataForum
Message Posted: Wed, 07 May 2003 @ 15:58:47 GMT
Subj: | | Re: CPU in Real-Time |
|
From: | | Geoffrey Rommel |
| How we can get the Average CPU in real time through SQL. | |
For session-level data, DBC.Acctg is updated in real time, but it may not have the detail you want.
Acctg will contain 1 row per AccountName and Vproc, so the detail available depends on how your account strings are set up. For
instance, &I will generate a new account name for each SQL request, but &S will generate only one per session. Here's a summary by
AccountName:
sel accountname, sum(cpu),sum(io),
avg(cpu), avg(io),
avg(cpu)/(max(cpu)+0.001) * 100 as cpu_eff, /* efficiency */
avg(io)/(max(io)+0.001) * 100 as io_eff
from dbc.acctg
group by 1
order by 1;
| |