[!TIP|label:official recommended]

troubleshooting

[!NOTE|label:references:]

tools

[!NOTE|label:tools]

  • prepare

    $ apt update
    $ apt install sudo vim netstat net-tools sysstat nfs-common
    $ sudo systemctl start sysstat
    $ sudo systemctl enable sysstat
    $ cat /etc/cron.d/sysstat
    

    [!NOTE|label:tips for sar]

    • if you wanted to check your memory usage instead, you could use the -r argument rather than -u
      $ sar -r 2 30
      
  • collectPerformanceData.sh

    $ curl -sO https://s3.amazonaws.com/cloudbees-jenkins-scripts/e206a5-linux/collectPerformanceData.sh
    $ chmod +x collectPerformanceData.sh
    
    $ sudo -u $JENKINS_USER sh collectPerformanceData.sh $JENKINS_PID 300 5
    $ or
    <jenkins> $ bash collectPerformanceData.sh $JENKINS_PID 300 5
    [INFO] Collected a threadDump for PID 8.
    [INFO] A new collection will start in 5 seconds.
    [INFO] Taking top data collection.
    [INFO] Taking TopdashH data collection.
    [INFO] Taking vmstat data collection.
    [INFO] Taking netstat collection.
    [INFO] Taking iostat data collection.
    [INFO] Taking nfsiostat data collection.
    [INFO] Taking nfsstat data collection.
    

    [!NOTE]

    • 300: "Length to run the script in seconds"
    • 5: "Intervals to execute commands in seconds"

thread dump

  • generated via monitor plugin

    generate heap dump
    1.5.2.1 -- generate heap dump
  • generated via jmap

    [!NOTE|label:references:]

    $ pid=$(ps auxfww | grep devops-jenkins | awk '{print $2}')
    $ jmap -dump:format=b,file=/opt/tmp/heapdump.bin ${pid}
    
  • analysis via

other tools

Copyright © marslo 2020-2024 all right reserved,powered by GitbookLast Modified: 2024-10-30 04:30:28

results matching ""

    No results matching ""