Scripts Status "Scripts Running" K1000 Report
I am attempting to create a report to show me all the machines stuck in the "Script Running" state due to the KBOT_Log not being pulled back. This can occur in our environment due to network connectivity issues. This is critical on my scheduled scripts since I do not get a list as in the Run Now Status. An article I read said to join the KBSYS.KONDUCTOR_Task KUID to ORGX.MACHINE.KUID with the completed being zeros. I was unable to find any KUID in the KONDUCTOR table that matched the ones in the Machine table. Can someone help with a query to determine scripts stuck in this state?
Answers (2)
If it helps it looks like a lot of that data is in KBOT_RUN and KBOT_RUN_MACHINE. KBOT_RUN_MACHINE does have a MACHINE_ID field that would be a better join. In the description field however I do not see and "Running". It might be different in your Kbox.
Comments:
-
There is a REQUEST_STATUS in RUN_MACHINE. All of mine currently have a value of 200. Maybe that changes if it's running? I can't test that currently without running a script. - dugullett 11 years ago
-
I figured it out. If the KBOT_LOG_ID field in the KBOT_RUN_MACHINE table is NULL then those machines never reported back to KACE with a status. - BBates 11 years ago
-
Cool. Would you mind sharing your query so if anyone in the future has the same issue they can reference it? - dugullett 11 years ago
This worked for me. Now I can tell which machines dropped network connections while the script was runnning.
SELECT
M.NAME,
M.IP,
K.NAME,
KRM.REQUEST_TIME,
KRM.KBOT_LOG_ID
FROM
ORGx.MACHINE M
JOIN ORGx.KBOT_RUN_MACHINE KRM ON KRM.MACHINE_ID=M.ID
JOIN ORGx.KBOT_RUN KR ON KRM.KBOT_RUN_ID = KR.ID
JOIN ORGx.KBOT K ON K.ID = KR.KBOT_ID
WHERE
-- Script Name --
K.NAME = ''
-- Enter Date and Time for PUSH --
AND KRM.REQUEST_TIME BETWEEN '' AND ''
-- This field is required for Reporting --
AND KRM.KBOT_LOG_ID is NULL
ORDER BY KRM.REQUEST_TIME DESC