## Question

## How do i visually interpret Java heap memory utilization and Requestor count for my PRPC node over a period of time?

How do i visually interpret Java heap memory utilization and Requestor count for my PRPC node over a period of time?

****Updated by moderator: Lochan to add Categories*** *

*****Updated by moderator: Marissa to close post*****

**This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.**

Hi Waikei,

Have tried this yesterday, Really Awesome ! just in 2 minutes - able to generate the Memory Utilization over Requestor Count of our application. Thanks for sharing.

Thanks

Hari Kumar Alampuru

Is there a Windows equivalent to this option? It looks like a great utility to have for any environment.

Thanks,

Steve

Hi Steve,

I used cygwin in Windows. But i quickly tried out the below and it seems to work.

for /f "tokens=1,2,22,25,28" %i in ('findstr "Free memory" <name of the PegaRULES.log>') do @echo %i-%j %k %l %m

=waikei

Steve,

VisualVM and Cygwin are listed in the PDN Article, https://pdn.pega.com/node/1605, cited at the top of What are your favorite, free third-party tools?

Consider adding your new favorite freebies to the discussion, What are your favorite, free third-party tools?.

Thanks!

-Mary

Salutations,

If you want a PR_PERF_STATS view of requestor counts along with a good view of a lot of important data, run this query... Easy to make pretty graphs and dig into the data... Second query gives you the details...

Best Regards,

Dean

SELECT TO_CHAR(PXSNAPSHOTTIME,'MM/DD/YYYY-HH24') as "Time",

sum(pxinteractions) as "interactions",

sum(pxtotalreqtime) as "SumTotalReqTime",

sum(pxtotalreqtime) / sum(pxinteractions) as "AvgTotReqTime" ,

max(pxtotalreqtime) as "MaxTotReqTime",

sum(PXCONNECTELAPSED) as "SumConnectElap",

sum(PXCONNECTELAPSED) / sum(pxinteractions) as "AvgConnectElap",

max(PXCONNECTELAPSED) as "MaxConnectElap",

sum(PXOTHERIOCPU) as "SumPXOTHERIOCPU",

sum(PXOTHERIOCPU) / sum(pxinteractions) as "AvgOtherIO",

max(PXOTHERIOCPU) as "MaxOtherIO",

sum(PXJAVAASSEMBLECPU) as "SumJavaAsmCPU",

sum(PXJAVAASSEMBLECPU) / sum(pxinteractions) as "AvgJavaAsmCPU",

max(PXJAVAASSEMBLECPU) as "MaxJavaASMCPU",

sum(PXJAVAASSEMBLEELAPSED) as "SumJavaAsmElapsed",

sum(PXJAVAASSEMBLEELAPSED) / sum(pxinteractions) as "AvgJavaAsmElapsed",

max(PXJAVAASSEMBLEELAPSED) as "MaxJavaASMTime",

sum(PXCOMMITELAPSED) as "SumCommitElapsed",

max(PXCOMMITELAPSED) as "MaxCommitElapsed",

sum(PXDBOUTPUTBYTES) as "SumDBOutBytes",

sum(PXDBINPUTBYTES) as "SumDBInBytes",

sum(PXACTIVITYCOUNT) as "SumActivityCount",

sum(PXALERTCOUNT) as "SumAlertCount",

sum(PXCOMMITCOUNT) as "SumCommitCount",

sum(PXCOMMITROWCOUNT) as "SumCommitRowCount",

sum(PXCONNECTCOUNT) as "SumConnectCount",

sum(PXRULECOUNT) as "SumRuleCount",

sum(PXRULEFROMCACHECOUNT) as "RuleFromCacheCount",

sum(PXRULESEXECUTED) as "RulesExecuted",

sum(PXRULESUSED) as "RulesUsed",

sum(PXOUTPUTBYTES) / sum(pxinteractions) as "AvgOutputBytes",

sum(PXOUTPUTBYTES) as "SumOutputBytes",

max(PXOUTPUTBYTES) as "MaxOutputBytes",

COUNT(DISTINCT(PXREQUESTORID)) as "Requestors",

COUNT(DISTINCT(PYUSERIDENTIFIER)) AS "USERS",

sum(PXDBINPUTBYTES) * 1.0 / sum(PXDBOUTPUTBYTES) as "DBRatio"

from pr_perf_stats

GROUP BY TO_CHAR(PXSNAPSHOTTIME,'MM/DD/YYYY-HH24')

order by TO_CHAR(PXSNAPSHOTTIME,'MM/DD/YYYY-HH24');

SELECT

TO_CHAR(PXSNAPSHOTTIME,'MM/DD/YYYY-HH24') as "Time",

PYUSERIDENTIFIER as "User",

PXREQUESTORID as "PXREQUSTORID",

sum(pxinteractions) as "interactions",

sum(pxtotalreqtime) as "SumTotalReqTime",

sum(pxtotalreqtime) / sum(pxinteractions) as "AvgTotReqTime" ,

max(pxtotalreqtime) as "MaxTotReqTime",

sum(PXCONNECTELAPSED) as "SumConnectElap",

sum(PXCONNECTELAPSED) / sum(pxinteractions) as "AvgConnectElap",

max(PXCONNECTELAPSED) as "MaxConnectElap",

sum(PXOTHERIOCPU) as "SumPXOTHERIOCPU",

sum(PXOTHERIOCPU) / sum(pxinteractions) as "AvgOtherIO",

max(PXOTHERIOCPU) as "MaxOtherIO",

sum(PXJAVAASSEMBLECPU) as "SumJavaAsmCPU",

sum(PXJAVAASSEMBLECPU) / sum(pxinteractions) as "AvgJavaAsmCPU",

max(PXJAVAASSEMBLECPU) as "MaxJavaASMCPU",

sum(PXJAVAASSEMBLEELAPSED) as "SumJavaAsmElapsed",

sum(PXJAVAASSEMBLEELAPSED) / sum(pxinteractions) as "AvgJavaAsmElapsed",

max(PXJAVAASSEMBLEELAPSED) as "MaxJavaASMTime",

sum(PXCOMMITELAPSED) as "SumCommitElapsed",

max(PXCOMMITELAPSED) as "MaxCommitElapsed",

sum(PXDBOUTPUTBYTES) as "SumDBOutBytes",

sum(PXDBINPUTBYTES) as "SumDBInBytes",

sum(PXACTIVITYCOUNT) as "SumActivityCount",

sum(PXALERTCOUNT) as "SumAlertCount",

sum(PXCOMMITCOUNT) as "SumCommitCount",

sum(PXCOMMITROWCOUNT) as "SumCommitRowCount",

sum(PXCONNECTCOUNT) as "SumConnectCount",

sum(PXRULECOUNT) as "SumRuleCount",

sum(PXRULEFROMCACHECOUNT) as "RuleFromCacheCount",

sum(PXRULESEXECUTED) as "Rules Executed",

sum(PXRULESUSED) as "Rules Used",

sum(PXOUTPUTBYTES) / sum(pxinteractions) as "AvgOutputBytes",

sum(PXOUTPUTBYTES) as "SumOutputBytes",

max(PXOUTPUTBYTES) as "MaxOutputBytes",

COUNT(DISTINCT(PXREQUESTORID)) as "Requestors",

COUNT(DISTINCT(PYUSERIDENTIFIER)) AS "USERS",

sum(PXDBINPUTBYTES) * 1.0 / sum(PXDBOUTPUTBYTES) as "DBRatio"

from pr_perf_stats

GROUP BY TO_CHAR(PXSNAPSHOTTIME,'MM/DD/YYYY-HH24'),PYUSERIDENTIFIER,PXREQUESTORID

order by TO_CHAR(PXSNAPSHOTTIME,'MM/DD/YYYY-HH24'),PYUSERIDENTIFIER,PXREQUESTORID ;

Hi Ankur,

Here are the steps that i would use,

$ grep 'Free memory' PegaRULES.log.2014-12-17 | awk '{print $1"-"$2, $22, $25, $28}' > temp.log

2. Open the newly created file from step above using Excel. Use space (‘ ‘) as a delimiter.

3. Insert a new row in the first row to include the title of each column. For example, time, total heap, used heap and requestor count.

4. In order to plot a chart, you can highlight all the columns and then try inserting a 2D line chart. A chart like below should be created,

5. In order to plot the requestor count on the second y-axis, double click on the requestor count line, and the following popup should appear.

6. Choose ‘Secondary Axis’ and click

Close. You can now see the requestor count against the second y-axis.Hope this helps.

=waikei