Important commands related to Linux processes
-----------------------------------------------------
Process Status & Monitoring -->
ps(process status):
ps -ef : for a full-format listing of all processes.
-e β Show all processes (system-wide)
-f β Show full format listing (detailed view)
Example:- To find processes with their details corresponding to java, we can use below command.
ps -ef | grep java
ps aux : to view detailed memory and CPU utilization,user,PID etc..
example:- ps aux | grep java (Processes with their details like CPU, memory, user, PID etc )corresponding to java.
top --> Used for real-time, live monitoring of processes running on the system.
we can also use command htop which has better UI, but we need to install it separately.
We can some live details like Load Average, %CPU usage, %MEM usage using top command.
pstree --> A command used to visualize the hierarchy and relationship between parent and child processes in a tree structure.
pgrep --> Find PID by name (Example:- pgrep nginx --> to get the PID of nginx process).
Process Identification & Control:
type -> Useful for determining if a command is a shell built-in (which runs within the existing shell process) or an external program that spawns a new child process.
kill -> Used to send signals to terminate specific processes.
nohup --> Used to run a process in the background while ignoring the SIGHUP signal, ensuring the process survives even if the parent terminal session is closed.
Scheduling & Utility:
crontab --> Specifically crontab -e, used to edit and manage scheduled background tasks.
I would post about process states and signals used to control those states in next post.