How to capture minimal setup information when a support bundle cannot be generated?


  • The support bundle is not working properly (eg it cannot complete bundle generation) but I still have access to the UI.



Note: this guide is specific to situations where you cannot generate a support bundle.
You should always first try to generate a bundle following Generating a support bundle,
or try to grab the latest automatically generated bundle following Generating a support bundle when Jenkins will not start

The idea of this guide is to capture a minimal set of data using only the Jenkins UI and grabbing files from the filesystem.
This will help CloudBees Support get a better understanding of your setup.

1. Logs capture

You will need to navigate to your JENKINS_HOME and capture the content of:

  • $JENKINS_HOME/logs
  • $JENKINS_HOME/slow-requests
  • $JENKINS_HOME/deadlocks

It is suggested to make an archive out of those three directories and attach it to the ticket.
If this archive is larger than 20Mb please use this service to send it to us.

2. Instance detail capture

Go to the Jenkins groovy console (under <jenkins_url>/script) and run:

println '# Overview'
Jenkins.instance.with {
    println '## Instance'
    println "*Jenkins Version*: ${getVersion()}"
    println "*Java Version*: ${System.getProperty('java.version')}"
    Runtime.getRuntime().with {
        println "*Maximum memory*: ${humanReadableSize(maxMemory())}"
        println "*Allocated memory*: ${humanReadableSize(totalMemory())}"
        println "*Free memory*: ${humanReadableSize(freeMemory())}"
    println "*Jenkins URL*: ${JenkinsLocationConfiguration.get().getUrl()}"
    println "*Instance ID*: ${getLegacyInstanceId()}"
    println '\n## Plugins'
    pluginManager.plugins.each { println("${it.getDisplayName()} (${it.getShortName()}): ${it.getVersion()}") }
println '\n\n\n# Properties'

def static humanReadableSize(long size) {
    def measure = 'B'
    if (size < 1024) {
        return "${size} ${measure}"
    def number = size
    if (number >= 1024) {
        number = number / 1024
        measure = 'KB'
        if (number >= 1024) {
            number = number / 1024
            measure = 'MB'
            if (number >= 1024) {
                number = number / 1024
                measure = 'GB'
    return "${new java.text.DecimalFormat('#0.00').format(number)} ${measure} (${size})"

Copy the output into a overview.txt file.

  1. Thread dump capture

Go to <jenkins_url>/threadDump and copy the content into a thread1.txt file.
Wait a minute, refresh the page and copy the new content into a thread2.txt file.

  1. Monitoring data capture

Note: this step depends on the JavaMelody plugin being installed.
If you don’t, then skip this step.

Go to <jenkins_url>/monitoring and take a screenshot of the page.

Have more questions?


Please sign in to leave a comment.