


To display process details for specific user # top –u username Tasks: 90 total, 2 running, 88 sleeping, 0 stopped, 0 zombie Just executing the top command can show you CPU utilization, process details, a number of tasks, memory utilization, a number of zombie processes, etc. The top command can be used to display system summary information and current utilization. Probably one of the most used commands on Linux would be top. The below example is to monitor every 5 seconds. If you are doing real-time troubleshooting for some process, then you can monitor the I/O in an interval. To displace I/O stats for particular PID # pidstat –p 4271 –d List I/O statistics of all the PID # pidstat –d Troubleshooting I/O related issues can be easy with this command.

Pidstat can be used to monitor tasks managed by the Linux kernel. Nginx 4271 root 7u IPv4 51307 0t0 TCP *: 443 ~]#Ĭheck out more lsof command examples. # lsof –p PIDĬount number of files & processes ~]# lsof -p 4271 | wc ~]#Ĭheck the currently opened log file # lsof –p | grep logįind out the port number used by the process lsof -i -P |grep $PID ~]# lsof -i -P |grep 4271 To list, all the files opened by a particular PID. The lsof utility can be convenient to use in some scenarios. Lsof stands for “ list open files” to help you to find all the opened files and processes along with the one who opened them.
LINUX SEE FREE MEMORY INSTALL
Note: Some of the commands listed below may not be installed by default, so you got to install them manually. Let’s go through some of the most used Linux command-line utilities to diagnose performance-related issues. If you are working as a support in a production environment then most probably you will need to deal with performance-related issues in the Linux environment. A troubleshooting performance related issue in the IT world is always challenging, and if you were not aware of the right tools, then it would be frustrating.
