Monday, April 8, 2013

SOASTA CloudTest Lite VM - Switching to graphics mode

Today, I downloaded CloudTest Lite VM from SOASTA website so I could have a look. After starting it up with VMWare Player, I got the following screen.

To switch to graphic mode, which is what we want, you need to hit
CTRL+ALT+F7

After hitting the keys, you will see the Welcome CloudTest Lite Screen.

Sunday, April 7, 2013

How to compare two heap dumps and view result using jhat

The jhat is a Java Heap Analysis Tool that comes as a part of the JDK. This tool can be found in the JDK bin directory. For more information on jhat refer to Java SE documentation.













Following is the step to compare two heap files using jhat:

jhat -baseline baseline.hprof newbaseline.hprof

If successful, jhat will start an http server on default 7000 port. To view the result, navigate to
http://localhost:7000/ 


















Classes
Some of the classes you might see
http://localhost:7000/allClassesWithPlatform/
http://localhost:7000/showRoots/
http://localhost:7000/showInstanceCounts/includePlatform/
http://localhost:7000/showInstanceCounts/
http://localhost:7000/histo/
http://localhost:7000/finalizerSummary/
http://localhost:7000/oql/


Tuesday, April 2, 2013

Generating Websphere verboseGC Graph in LoadRunner Analysis tool

Few weeks ago, I was working for a client and I wanted to analyze Websphere Application server verboseGC logs. I could have used tools such as IBM PMAT but what I really wanted was to merge verboseGC graph with response time graph in Load Runner and this required a lot of manual work. Therefore, I modified existing Silkperformer vbscript to Websphere verboseGC vbscript.

For the blogging purpose, this script saves only handful of verboseGC attributes into CSV file. You can then import the csv file as an external monitor in Load Runner Analysis tool.

NOTE: You can modify this script to suit your requirements. Also make sure everything is contained within verbosegc tag in your verboseGC log file. See the example below.

Please read the following blog on how to generate the CSV file.

Websphere verboseGC Vbscript
Option Explicit
 
Dim xmlDoc
Dim af, gc, timestamp, gcIntervalms, DateTimeArray, afDate, afTime, afIntervalms,minimum,requestedBytes,Totalms,gcTotalms,gcTotal,Time
Dim reportFile, outputFile
Dim myFSO, fileHandle
 

'Murray Wardle code
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
 
Const ForReading = 1, ForWriting = 2, ForAppending = 8
 
If Wscript.Arguments.Count = 0 Then
    msgbox "Please specify the overview Report file to process"
Else
 
 ' Get report file name & set output filename
    reportFile = Wscript.Arguments(0)
 outputFile = Left(reportFile, Len(reportFile)-3) + "csv"
 
 xmlDoc.async = false
 xmlDoc.SetProperty "SelectionLanguage", "XPath"
 xmlDoc.SetProperty "ServerHTTPRequest", True
 xmlDoc.validateOnParse = False
 xmlDoc.resolveExternals = False
 
 'load overview report
 xmlDoc.load(reportFile)
 xmlDoc.setProperty "SelectionLanguage", "XPath"
 
 'open csv file to dump results into
 Set myFSO = CreateObject("Scripting.FileSystemObject")
 Set fileHandle = myFSO.OpenTextFile(outputFile, ForWriting, True)

'Modified code for verboseGC
fileHandle.WriteLine("date,time,afIntervalms,requestedBytes,gcIntervalms,gcTotalms,Totalms")
 
For Each af In xmlDoc.SelectNodes("//af")
  timestamp = af.getAttribute("timestamp")'get af timestamp attribute value
  DateTimeArray=Split(timestamp," ",-1,1) 'split the date time into array
  afDate=FormatDateTime(DateTimeArray(1)+"/"+DateTimeArray(0)+"/"++DateTimeArray(3),vbShortDate) 'format into date
  afTime=FormatDateTime(DateTimeArray(2),vbLongTime) 'format into time
 
  afIntervalms=af.getAttribute("intervalms") 'get af intervalms attribute value
 
  For Each minimum In af.SelectNodes("./minimum") 'get minimum requested bytes value
    requestedBytes = minimum.getAttribute("requested_bytes")
  Next
  For Each gc In af.SelectNodes("./gc") 'get gc intervalms value
    gcIntervalms = gc.getAttribute("intervalms")
  Next
  For Each gcTotal In af.SelectNodes("./gc/time") 'get total gc time value
    gcTotalms = gcTotal.getAttribute("totalms")
 Next
 For Each Time In af.SelectNodes("./time")
    Totalms = Time.getAttribute("totalms") 'get total time value
 Next   
 fileHandle.WriteLine(afDate+","+afTime+","+afIntervalms+","+ requestedBytes+","+ gcIntervalms+","+gcTotalms+","+Totalms)
Next
fileHandle.Close
end if
Websphere Application verboseGC log Example


  
  


  
  

CSV Output



VerboseGC graph in LoadRunner