cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a report showing the average time of queue job before start.

Aris56
Level 4

 

Hi,

 

Does anyone know of it is possible to generate a report on the duration of a job stays on queue before it start?

 

Your cooperation are highly appreciated.

 

Regards,

Aris.

1 ACCEPTED SOLUTION

Accepted Solutions

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi,

Here you go. I've only added the columns for Id, queued time, start time, end time, and time in queue. You can add what else you require.

 

select
nom_nbjob.jobid "Job ID",
UTCBigIntToNomTime(nom_nbjob.starttime) "Queued Time",
UTCBigIntToNomTime(nom_nbjob.activestarttime) as "Start Time",
UTCBigIntToNomTime(nom_nbjob.endtime) "End Time",
DATEDIFF(second,UTCBigIntToNomTime(nom_nbjob.starttime),UTCBigIntToNomTime(nom_nbjob.activestarttime)) as "Time Que"
from
nom_nbjob

 

 

View solution in original post

5 REPLIES 5

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi,

Here you go. I've only added the columns for Id, queued time, start time, end time, and time in queue. You can add what else you require.

 

select
nom_nbjob.jobid "Job ID",
UTCBigIntToNomTime(nom_nbjob.starttime) "Queued Time",
UTCBigIntToNomTime(nom_nbjob.activestarttime) as "Start Time",
UTCBigIntToNomTime(nom_nbjob.endtime) "End Time",
DATEDIFF(second,UTCBigIntToNomTime(nom_nbjob.starttime),UTCBigIntToNomTime(nom_nbjob.activestarttime)) as "Time Que"
from
nom_nbjob

 

 

Aris56
Level 4

Hi Riaan,

 

You're the man bro.

It works like a charm.

I made some changes to get the information i need for the past 1 month.

Thanks a lot!

cheers :)

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Cool,

 

If you figure out how to change the seconds in to hh:mm:ss then let me know. Still learning sql.

KDob
Level 3
Partner Accredited

"Still learning SQL" - Really?  Impressive SQL scripts so far :)

Keep learning because I like what I see!

I currenlty have 7 of your Custom Scripts running in my OpsCenter Analytics Servers.

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

LOL yeah. Glad to help.

 

Download the opscenter schema document, its quite handy. The rest is just googling....