- top : The top command is used to show the active Linux processes. It provides a dynamic real-time view of the running system. Usually, this command shows the summary information of the system and the list of processes or threads which are currently managed by the Linux kernel.
- htop : a real-time process viewer and system monitor, similar to the top command, but with a more user-friendly, interactive, and visually appealing interface. It displays a comprehensive list of processes, their resource usage (CPU, memory), and other relevant information in a clear and organized format.
- ps -aux :“ps” stands for “process status”. The command will give you the name of the process alongside the process identification number (PID), the CPU time it’s taking as well as the terminal as standard. All this information is useful for you to get an overview and quickly identify problems
- netstat : It’s use to inspet netork connection. To check port is available or not to use.
- netstat -tunlp : it will tell us this are the ports having active internet connections.
- tcpdump : It’s useful when client complaining about i having some latency while accessing the application.
- tcpdump -i enXo port 80 [—- enXo : Interface Name , Port 80 : Whatever it is as per your application]
- traceroute : used to trace the route that packets take from your computer to a specified destination.
- df -h : Use to check disk utilization
- du -sh /opt : use to check utilization of perticuler folder/ Directory
- free -h : To check free memory utilization.
- journalctl : used to query and display logs from systemd-journald
- journalctl -u nginx : Check logs related to your service , Here , we have taken example about nginx service. Why were nginx service is stop like that.
- journalctl -b : Complete logs since system last boot / reboot
- lsof : To check who is using the port.
- lsof -i :8085 [– here 8085 is port number of process].
- tail / head: It’s use during to read logs from particular file.
- tail -n 10 /var/logs/auth.log [— So it will display/ read last 10 line of log file ]
- head-n 10 /var/logs/auth.log [— So it will display/ read fist 10 line of log file