Christian Eriksson wrote:
> <snip>
> Does this require setting "WSTATS 1" in ONCONFIG?
Yes it does.
>
> /Christian
>
>>Hi everybody,
>>
>>We can have the consumed cpu time, using the script (in dbaccess):
>>
>>database sysmaster ;
>>set isolation to dirty read;>>select
>> username,hostname,--connected,
>> syssessions.sid, sysopendb.odb_dbname[1,10],
>> sum(cumtime)/1000000 cpu_time
>> from syssessions, sysopendb, sysseswts
>> where 1=1
>> and syssessions.sid= sysopendb.odb_sessionid
>> and sysopendb.odb_iscurrent = 'Y'
>> and 1=1
>> and syssessions.sid=sysseswts.sid
>> and reason='running'
>> group by syssessions.sid,username,hostname,connected,sysopendb.odb_dbname
>> having sum(cumtime)/1000000 > 1
>> order by 5 DESC;
>>
>>It may depends on how long you issued the command:
>>onstat -z>>
>>Best regards.
>>
>>R Ferronato