This query will show each step an agent performs during a patch automatic update and the time it took to complete.  We use this to diagnose exactly what is causing a particular agent or site to not patch correctly.  I hope someone finds this useful.  


Change %agentname% to whatever agent you want to report on.  Change DATEADD(day, - 7, GETDATE())) to however many days you want to look at.  I saved this as a view and then used "with OrderedResults" to add a duration field to automatically calculate the time a step took

WHEN scriptdesc LIKE 'Script Patch Rescan was successfully scheduled to run on%' THEN 'Patch Scan Scheduled'
WHEN scriptdesc LIKE 'Script%$inst$%successfully schduled%' THEN 'Patch Installation Script Scheduled'
WHEN scriptdesc LIKE 'Script%reboot%' THEN 'Patch Reboot Scheduled'
WHEN ScriptName LIKE '%$inst$%' AND ScriptDesc LIKE '%request to the user to apply selected patches was declined%' THEN 'Patch Declined or Timed Out'
WHEN ScriptName LIKE '%$inst$%' AND ScriptDesc LIKE '%Executed Patch (%' THEN 'Patch Installation Script - ' + REPLACE(RIGHT(LEFT(scriptdesc, 34), 10), '/', '')
WHEN ScriptName LIKE '%$inst$%' THEN 'Patch Installation'
WHEN ScriptName LIKE '%$get$%' THEN 'Patch Download Script'
WHEN ScriptName LIKE '%$ver$lancache%' THEN 'LAN Cache Test'
WHEN ScriptName LIKE '%$ver$cred%' THEN 'Patch Credential Test'
ELSE ScriptName END as [PatchProcess]
FROM dbo.vScriptLog
WHERE (ScriptName LIKE '%$get$%' OR
ScriptName LIKE '%$inst$%' OR
ScriptName LIKE '%$ver$cred%' OR
ScriptName LIKE '%$ver$lancache%')
AND (ScriptDesc NOT LIKE '%Script Summary%')
AND (EventTime > DATEADD(day, - 7, GETDATE()))
and machName like '%agentname%'