A specific job or your Jenkins environment is experiencing high CPU.
Required Data: High CPU On Linux
This article describes how to collect the minimum required information for high CPU issues on a CJP environment so that it can be
If the required data is bigger than 20 MB you will not be able to use ZenDesk to upload all the information. On this case we would like
to encourage you to use our upload service in order to attach all the required information. The
upload service works best in Chrome or
CloudBees Jenkins Platform (CJP)
- Operations Center (OC)
- Client Master (CM)
Operating System: Linux
Required Data check list
[ ] Support bundle
[ ] Output of the script jenkinshangWithJstack.sh
[ ] GC log file for review
A support bundle from the problematic instance ideally when the issue is happening or in the worst case right after the issue is
exposed. Please, follow the KB below in case you don’t know how to generate a support bundle.
Output of the script jenkinshangWithJstack.sh
Download the jenkinshangWithJstack.sh.
The jenkinshangWithJstack.sh script will need to be made executable by running:
chmod +x jenkinshangWithJstack.sh .
Ideally, your environment is configured as documented in Prepare Jenkins For Support.
If you are experiencing a high cpu issue please execute the script while the issue is occurring:
jenkinshangWithJstack.sh script as the same user that starts Jenkins by running:
sudo -u jenkins sh jenkinshangWithJstack.sh $PID 300 5
(where $PID is the PID of the CloudBees Jenkins process).
For example, if the PID of the Jenkins process was 2987 then you would run:
sudo -u jenkins sh jenkinshangWithJstack.sh 2987 300 5
If CloudBees Jenkins Enterprise or CloudBees Jenkins Operations Center is running on Ubuntu
you will need to confirm the PID via the command line by running
ps -ef | grep jenkins.
This is required because the CloudBees Jenkins PID File contains the PID of the daemon process itself
not the CloudBees Jenkins PID.
jenkinshangWithJstack.sh script will collect 1 full thread dump once every 5 seconds
via jstack (jstack is included in the Java JDK only, not the JRE) along with top, vmstat, netstat, and iostat data.
The necessary packages should be installed in your environment for generating top, top dash H, vmstat, netstat, nfsiostat, nfsstat and
jenkinshangWithJstack.sh script will generate data in the current directory it is run from.
jenkinshangWithJstack.sh script does not run as expected please upload the output the script generates from the terminal
window for review.
GC log file for review
If you followed Prepare Jenkins For Support then the gc logs file should be under