Skip to content

AEM – Thread Dumps Analysis


If you require any more information or have any questions about our site’s disclaimer, please feel free to contact us by email at

All the information on this website – – is published in good faith and for general information purpose only. SKYDEVOPS does not make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this website (skydevops), is strictly at your own risk.
SKYDEVOPS will not be liable for any losses and/or damages in connection with the use of our website.

From our website, you can visit other websites by following hyperlinks to such external sites. While we strive to provide only quality links to useful and ethical websites, we have no control over the content and nature of these sites. These links to other websites do not imply a recommendation for all the content found on these sites. Site owners and content may change without notice and may occur before we have the opportunity to remove a link which may have gone ‘bad’.

Please be also aware that when you leave our website, other sites may have different privacy policies and terms which are beyond our control. Please be sure to check the Privacy Policies of these sites as well as their “Terms of Service” before engaging in any business or uploading any information.


By using our website, you hereby consent to our disclaimer and agree to its terms.


Should we update, amend or make any changes to this document, those changes will be prominently posted here.

-== & ==-



  • A customized powershell script to download/generate the thread dumps
  • Using fastthread to analyse the dumps
  • Using fastthread API to get the response in JSON format
  • Extracting the thread dump report URL from the JSON and access the report
  • Use the Thread Dump Collection & Analysis tool [jstack] to take thread dumps from a running CQ instance for troubleshooting the following:
    • Performance
    • Lock contention.
    • Dead lock
    • other thread-related issues


  • Assuming that service name is AEM
  • cURL is already installed and configured on windows
  • Has Administrator access
  • Already have API access to fastthread, if not register at FastThread API


  • Powershell Script to generate thread dumps, upload to fastthread using cURL or API endpoint, and get JSON response.
  • Following is the report generated on Fast Thread

# stopping the job if it encounters error
$ErrorActionPreference = 'Stop'
$WarningPreference = 'SilentlyContinue'

# Parameters
$AEMSRC = (get-wmiobject win32_service | ?{$_.Name -eq 'AEM'})
$CURLEXE = "C:\tools\curl76\bin\curl.exe"
$FILENAME = "tdaem64.txt"

# Generating ThreadDumps
cmd.exe /c "jstack -l $AEMPID > $FILENAME"
# Fastthread API
$REPURL = "{xxxx-xxxx-xxxx-xxxxxx-xxxxxxxxxx}"
# ThreadDumps output file
# Generating threaddumps Report in JSON format
$REPDATA = cmd.exe /c "curl -X POST --data-binary @./$FILENAME $REPURL --header Content-Type:text" | ConvertFrom-Json
# Extracting the ThreadDump report URL from JSON output

# Email the Report URL
Write-Host "Emailing the ThreadDump Report"
Send-MailMessage -SmtpServer `
-Port 587 `
-Credential $cred `
-UseSsl `
-From '' `
-To '' `
-Subject "ThreadDump Report" `
-Body "The ThreadDump Report can be viewed at $REPORTURL"
Write-Host "Email Sent."

# Clean Up
Remove-Item -Path $FILENAME

# Open the ThreadDump Report in Chrome Browser
Start-Process "chrome.exe" $REPORTURL


Shashi View All

-== Superman ==-

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: