Report to show currently running tasks.


Article ID: 171824


Updated On:


Management Platform (Formerly known as Notification Server)


While troubleshooting performance issues or problems with tasks being delayed or not starting/running correctly, it may be helpful to view the currently running tasks. The following SQL query will show the currently running task reports. There is also an attached XML that can be imported as a report.



declare @taskType as nvarchar (10)
 set @taskType = '%taskType%'
 i.Guid AS '_ItemGuid'
 ,'Task Name' = coalesce(i.Name, '[Data not available]')
 , as "Run Instance Name"
 ,tiis.ExecutedBy as "Executed By"
 ,'Start Time' = coalesce (CAST(s.StartTime AS VARCHAR), '[Data has been Purged]')
 ,'Target Device' = coalesce (vci.Name, '[Could not retrieve]')
 ,'InstanceType' = 
 case ti.[InstanceType]
 when 0 then 'Server Task'
 else 'Client Task'
 ,'Status' =
 CASE CAST(tis.[InstanceStatus] AS varchar)
 WHEN '1' THEN 'Running'
 WHEN '2' THEN 'Completed'
 WHEN '3' THEN 'Failed'
 WHEN '4' THEN 'Stop Requested'
 from [TaskInstances] ti 
 left outer join [TaskInstancesStarted] s on s.[TaskInstanceGuid] = ti.[TaskInstanceGuid] 
 left outer join [TaskInstanceStatus] tis on tis.[TaskInstanceGuid] = ti.[TaskInstanceGuid] 
 left outer join [TaskInstanceResults] tir on tir.[TaskInstanceGuid] = ti.[TaskInstanceGuid] 
 --left outer join [TaskInstanceExecutionInfo] tiei on tiei.[TaskInstanceGuid] = ti.[TaskInstanceGuid]
 left outer join [TaskInstanceSummaries] tiis on tiis.TaskInstanceGuid = ti.TaskInstanceGuid
 LEFT OUTER JOIN vRM_Computer_Item vci ON vci.Guid = ti.ResourceGuid
 LEFT JOIN ItemVersions iv ON iv.VersionGuid = ti.TaskVersionGuid
 LEFT JOIN Item i ON i.Guid = iv.ItemGuid
 WHERE (tis.InstanceStatus = 1 OR tis.InstanceStatus = 4)
 AND ti.InstanceType like @taskType
 ORDER BY [InstanceType] DESC, [Target Device] DESC, tiis.[StartTime] DESC


Currently Running Known Tasks.xml get_app