How to get the status of Backfill /Recalculate when the Analysis runs successfully via C# code?

 


image.png.png
There are around 25- 28 Analysis I am running in a loop on a single PI AF server, so once the first loop gets executed, I have to check the status if is completed or have error and also to log how many events processed. After logging the current loop results, it should run another analysis. How can I achieve this functionality with C# code?

Parents
  • I don't think there is a query per se that will provide details whether a given analysis is still in the backfill queue or not.

    I created a PowerShell script to 'automate' backfilling on analysis; my analysis all have categories and need to be executed in a defined order.

    So, here is the gist of it:

    Submit the analysis.

    Wait 30 seconds for the PerfMon queued analysis counter to get set.

    Repeat the wait until the counter is > 0 (something in the queue) or 10 iterations have passed (it was a VERY fast analysis)

    While the queued analysis count is NOT zero

    Wait 30 seconds

    Get queued count

    End while

     

    It isn't pretty, but it does work. At month end, if I have to do recalcs for a month do to whatever... I can use this script with a list of analyses to run in the background; I don't have to consistently monitor it, just wait until it is done.

     

    Hope this helps.

     

     

Reply
  • I don't think there is a query per se that will provide details whether a given analysis is still in the backfill queue or not.

    I created a PowerShell script to 'automate' backfilling on analysis; my analysis all have categories and need to be executed in a defined order.

    So, here is the gist of it:

    Submit the analysis.

    Wait 30 seconds for the PerfMon queued analysis counter to get set.

    Repeat the wait until the counter is > 0 (something in the queue) or 10 iterations have passed (it was a VERY fast analysis)

    While the queued analysis count is NOT zero

    Wait 30 seconds

    Get queued count

    End while

     

    It isn't pretty, but it does work. At month end, if I have to do recalcs for a month do to whatever... I can use this script with a list of analyses to run in the background; I don't have to consistently monitor it, just wait until it is done.

     

    Hope this helps.

     

     

Children
No Data