VPS Hosting users can install the htop command to easily see what processes are using excessive resources using the terminal, or command line interface (CLI). Once noticing the process(es), you’ll want to be able to fix the issue on the spot. Therefore, we’ll cover how to find and kill a process in htop.
Keep in mind, this is an advanced process. You should be sure that you select the right process. Beware there is a possibility of system instability or data corruption if you forcefully kill a process or accidentally kill the wrong process.
Warning! Again, use caution with this method as abruptly killing a process could negatively affect other important processes. In common cases, a graceful reset via WebHost Manager (WHM) – (e.g. PHP-FPM) or cPanel (e.g. Nginx Cache Manager) or dedicated app commands may be safer and more effective.
Kill Processes
- Log into SSH as root.
- Type
htop
and press Enter. - Type F5 to sort processes as a tree. This organizes child processes to its primary process ID (PID).
- Scroll the list and highlight the process to kill.
- Press F9 for kill options.
- Highlight
15 SIGTERM
(signal terminate) to gracefully request to stop the proccess(es) or9 SIGKILL
(signal kill) to forcefully shut down the process(es). - Press Enter.
Learn more Linux commands with our Linux section.