cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating Bot Idle time

Athiban_Mathi
Level 3
Hello All,

is there a way to generate bot idle time report for a week/month in Blue prism. 

Regards,
Athiban


------------------------------
Athiban Mathi
------------------------------
8 REPLIES 8

PabloSarabia
Level 11
Hi @Athiban Mathi

I don't know if exists a way to get the info directly.

But, you can use the tabla "BPASession" from the BluePrism's database. Here you have the start ​time (startdatetime) and the end time (enddatetime), and the Resources id (runningresourceid)

You can create a query  to extract all the time that is idle, something like this:

SELECT A.name
, A.ExecuteDate
, 1440 - SUM(diff)
FROM (
SELECT RES.name
, CAST(startdatetime AS date) AS ExecuteDate
, DATEDIFF(MINUTE, startdatetime, ISNULL(enddatetime, GETDATE())) as Diff
FROM BPASession SES
INNER JOIN BPAResource RES ON SES.runningresourceid = RES.resourceid
WHERE RES.name = 'CA00WVPRSW01'
) AS A
GROUP BY name, ExecuteDate

This gives you the idle time in minutes. Review it and let us know if this works for you


Hope this helps you, and if this solves your question, remember mark as the best answer 🙂

See you in the community, bye 😄

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------

ManpreetKaur1
Level 8
Hi @Athiban Mahamathi,

You can calculate the bot's idle time based on the scheduler. Just verify how much is the utilization of the bot during the whole day/week either by pulling out the report from the control room or it can also be fetched from the backend database, provided proper accesses are available for accessing the database.​

------------------------------
Manpreet Kaur
Manager
Deloitte
------------------------------

what does it mean when the results on this are in negative numbers? for example i have machine 1 saying

bot1 2021-12-21 1272
and bot 2 saying 
bot2 2021-12-22 -10630

these coincidentally are also only happening in debug mode, are they by any chance something running in debug thats running overnight or something?


------------------------------
Dexter Whelan
------------------------------

@Dexter Whelan  - your negative numbers are a result of the ISNULL(enddatetime, GETDATE()) part of Pablo's query, which is saying 'if the session has no end, substitute the current time'. But if the session start was more than 1 day ago, or it's an old pending session, then the '1440 minus session minutes'​ calculation will yield a negative number.

The principle of the query is correct, but the 'end date substitution' bit needs to be improved. Adding a 'where session is not pending' or 'where session is complete' clause will probably do the trick.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

ah John, you are absolutely correct. There are sessions that are getting started(or something i'm not sure what the entry here is) so if something doesnt have an entry that means the session never started I guess or rather never ....ended? Possibly just a defect of debug states and they shouldnt be included in the listing really?

------------------------------
Dexter Whelan
------------------------------

Yeah a null end date means pending, debugging or still running. If you're certain no session will run past midnight or for more than 24 hours, then the '1440-session minutes' in combination with 'status = complete or terminated' should do the job.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Hi, Could you please tell me how to fetch the data from the backend database. I need to know each machines run time and ideal time for the day.



------------------------------
Dinesh Kumar
------------------------------

Hello,
Check this guide (check the integrity of requests to avoid overload) https://youtu.be/UqbJbsw7l-o
 
Helper thread in case of errors:
Regards,



------------------------------
Leonardo Soares
RPA Developer Tech Leader
América/Brazil
------------------------------

Leonardo Soares RPA Developer América/Brazil