

You can use the ps command with PID to print their CPU and memory utilization. If you are just interested in real-time troubleshooting, then just execute atop and you should see like below. and I would strongly recommend taking a look at the man page. It supports multiple arguments like interval, samples, etc. You can schedule to write the output in a file through crontab or other, and later you can playback. Imagine there is a pattern of having an issue at a specific time window. You can install glances on CentOS 8 using DNF as below.Ī similar to the above listed but with a brilliant feature to record the output in a file so you can view them later. Running processes are sorted by their CPU utilization. Install htop on Ubuntu # Install htop on CentOS/RHEL 8.x # glances #Īs the name says, you get a system utilization view on a single screen. Htop may not be installed by default, but you can always do it as below. As you can, it got the command column, which is handy to identify the process path. Similar to the top but with more information.

Below an example of checking Docker utilization. Let’s say you know the process id (PID) you can use the below command. You can still use top command but with some argument. Once you identify the suspect, then you may want to focus on that process instead of everything like you saw above. The top is installed on almost all Linux distribution. If you look at the first one, which is MySQL is taking 11.9% of CPU and 2.5% of CPU. You may want to start by looking into top or htop result to see the processes overview.Īs you can see below, it gives an excellent idea about what all processes are utilizing. But if you don’t have one or looking for a command-based solution, then here you go. There are many monitoring software which does this out of the box. However, imagine a shared server where multiple services are running, and you need to find which one is eating all the resources. If the server host just one process, then it’s easy to find out when the process consumes all the resources. As a sysadmin, you often have to deal with an incident where the application is slow or unresponsive due to high CPU/memory/network utilization.
