[PEGA 7.1.6] Determine Current Requestor Count, Heap Memory Used, and CPU Without DB Transaction
I have been researching how to get the current Requestor Count, Heap Memory Used (%), and CPU (%) for the current time.
pr_perf_stats seems the appropriate place to gather some, if not all, of this information. However, there are two drawbacks to this approach. First, this DB Table serves as a recent historical reference, rather than a current-point-in-time reference for these statistics. There will be a lot of unnecessary data to search through. Second, gathering these statistics requires a call to the DB, which we would like to avoid. I believe all of these statistics can be pulled from the application, server, and OS, without the overhead of a DB call.
I need assistance in determining where or how to gather these three key metrics without a DB call. I know Requestor Count and Memory are supplied in SMA. I am just unable to determine how they are pulled through Java. For CPU, I am a bit more uncertain where to gather the source statistic from. I know you can execute command line from Java, but am unfamiliar with the exact code to get CPU.
This provides you the maximum and currently used. A percentage can be derived from parsing those two values out of this output and performing a calculation.
Save As Embed-ListParams.RequestorsOnlineContent
Execute only Steps 1 and 2. This will provide you the list of requestors on the current server. Then add a step to filter down to only those requestors with a value for pyUserIdentifier. These are the online end user requestors. Then check the filtered list’s pxResultCount for the total number of end user requestors on the current server. Lastly, remove the temporary page storing the list of requestors.