Required Data: High CPU On Windows

Article ID:115000721731
2 minute readKnowledge base

#Issue

A specific job or your Jenkins environment is experiencing high CPU load.

Required Data: High CPU On Windows

This article describes how to collect the minimum required information for high CPU issues in a CloudBees CI environment so that CloudBees Support can efficiently troubleshoot it.

If the required data is bigger than 50 MB, you will not be able to upload all the information directly to our support ticketing system. In 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 Firefox.

Required Data checklist

  • Support Bundle

  • Output of the script getpslist.bat

  • GC log file for review

Support Bundle

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 if you don’t know how to generate a support bundle.

Please enable at minimum the following checks: System properties, controller Log Recorders, Garbage Collection Logs, Slow Request Records, Out Of Memory Errors, controller Heap Histogram, Deadlock Records, Thread dumps of running Pipeline builds, Thread dumps and Items Content.

Output of the script getpslist.bat

Download PsTools.zip.

Download the getpslist.bat.

Download the getThreadDumps.bat

Create a folder to put the PsTools.zip in and unzip the contents to that folder.

The screenshot below uses 'C:\Users\Administrator\Downloads\PSTools' as an example. It is not required to save the script there.

psToolsFolderScreenShot.png

Copy the getpslist.bat script to the same folder.

Monitor for the next occurrence of the high CPU issue.

When the high CPU issue occurs, open two command windows (one for getpslist.bat and the other for getThreadDumps.bat).

Start the getpslist.bat script by running: getpslist.bat PID from the location where PsTools.zip was saved and unzipped.

Start the getThreadDumps.bat script by running: getThreadDumps.bat PID 1 from the directory where getThreadDumps.bat is saved. Have a look at the article Required Data: High CPU On Windows to understand how this script works.

  • PID is the process id of the Jenkins process. The PID can be determined using the Task Manager, as shown in the screenshot below. Note that you have to add the PID column by selecting View->Select Columns->clicking PID(Process Identifer)-> clicking OK

windowsTaskManagerScreenShot.png

Please note the following requirements for the getpslist.bat script to work as expected:

  • All scripts MUST be run as a user with Administrator privileges, i.e. from a command window that was opened via Run As Administrator.

Once the scripts complete, please upload the pslistlog.output.PID.zip file, the jstack.PID.zip, the Support Bundle, and verbose GC logs for review.

* The pslistlog.output.PID.zip file will be located in the same directory the getpslist.bat script is run from.

GC log file for review.

If you followed Prepare CloudBees CI for Support then the gc logs file should be at -Xlog:gc[...]:file=<some-log-file>:[...] for JDK 11+ or -Xloggc:<some-log-file> for JDK 8