How to debug high CPU usage?

Discussion in 'ISPConfig 3 Priority Support' started by curiousadmin, Nov 13, 2019.

  1. curiousadmin

    curiousadmin New Member HowtoForge Supporter

    Hello everyone,
    I was wondering if there is any way to debug a high CPU usage after a reboot has occurred. The issue was that I was unable to SSH (or even ping the server) and I forced a reboot from provider's web interface.

    Ex-post is there any way to check what was causing the high CPU usage? What to look for in logs? Is there any way to narrow it down to certain user or process?

    I personally suspect that it was either something that sent the mail antivirus into a loop or that one of the websites is infected with something and was running a crypto miner or something...

    Thank you all for any input.

    Btw the server is running Debian 8 with ISPConfig.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess there is no easy way to find the reason for the high load after the server has been rebooted. You can take a look at the syslog file if you find anything unusal though.
     
  3. curiousadmin

    curiousadmin New Member HowtoForge Supporter

    Hmm - do you have any tips on how to log the CPU load/memory load to a file so if I do the reboot next time there is a file I can check?

    Thank you.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    There must be umpteen ways to do that. Internet Search Engines ought to be useful here.
    This is example I just cooked up. Install dstat if not already installed.
    Code:
    dstat -t --top-cpu --output /tmp/foo.csv 10 
     
  5. webguyz

    webguyz Active Member HowtoForge Supporter

    Install htop and run it and then sort the fields by Time and it should give you the process thats consuming CPU.
     

Share This Page