08-09-2015 07:36 PM
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.
Solved! Go to Solution.
08-11-2015 02:17 AM
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
08-11-2015 02:17 AM
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
08-11-2015 08:43 PM
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 :)
08-11-2015 11:06 PM
Cool,
If you figure out how to change the seconds in to hh:mm:ss then let me know. Still learning sql.
08-21-2015 11:59 AM
"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.
08-21-2015 12:05 PM
LOL yeah. Glad to help.
Download the opscenter schema document, its quite handy. The rest is just googling....