In an operating system, to complete a certain operation or task, the processes are required, Process is nothing but a running task or a system of users tasks. When you visit any website, lots of processes start running on the server, even though if you do not visit the website still there are lots of processes going on the server called system processes which are essential to keep the server in running condition.
Every process consumes CPU, RAM, and memory resources. We always heard the term called server load is increases or CPU consumption increases on the server which is nothing but the number of processes running on server start utilizing all or more resources. Each server has limited resources it depends on server nature, if the server is designed for the text blog sharing purpose then it might require less CPU power, small memory, and RAM. If the server is designed for file transferring or sharing purpose then it will require more RAM and CPU power. Similarly, if the server is designed for video streaming photo sharing purpose then it will require more memory and RAM as well as CPU for processing. In short, server design is based on their nature of use. To balancing a load of CPU, memory, and RAM on the server, handling and managing the process is most important. This can be done by using commands.
In this article, we are going to see what is Linux process? Also some commands for Linux processes.
Also read
Parent process and another one called a child process. For example, you want to play music on your computer in this case opening a music player is a first process called parent process, and playing your favorite music inside your that player is the second process called the child process
Every process running on the server is called a parent or also known as the primary process.
When a process creates another process then the first original process gets called a parent process and created by the parent process called a child process.
The best way to understand this term is, after finishing the boot process in the Linux machine the first process initiated by the kernel is a systemd or initthis first process is called parent process after that systemd or init relaunch multiple different processes get called as a child process.
There are several status of a process, from which it can be decided that what is the exact behavior of that process currently is.
– D —Uninterrupted sleeping.
– R —Running.
– S —Sleeping.
– T — Stop.
– Z —Zombie.
Now when you have a command-line interface on server or your local machine and you need to check and maintain the processes or load then you can access them by commands.
Let’s see some of the most important commands while performing process related tasks.
To show top 10 RAM consuming processes.
When you enter a top command on your terminal it will show you output something like this
Let see what it defines one by one.
It shows the process status
It shows you all users running processes in a standard format.
(-a ———all.
-u ———user.
-x ——— standard format)
It will show you full processes running by the user.
(-f ———full.
-u ———user.)
It will show you the tree structure of processes with PID.
Show all particular users process.
(-u ———user)
It will display PID of running processes.
To kill a particular PID process forcefully.
(-9 ———forcefully.)
To kill a particular process forcefully by its name.
(-9 ———forcefully.)
To kill a particular user all process by username.
(-u ———username.)
To change priority of running processes.
(-n ———nice value.)
To run a program with modified scheduling priority.
(-n ———-nice value.)
To show system uptime and system load.
It shows the file system disk space uses.
(-h ———human readable. -T ———filesystem type.)
To show memory size and swap partition size.
(-h ———human-readable.)
To show CPU information.
Terminate a process by process name.
It shows the process status with their with process path.
As of now, we have seen, what is a Linux process, types of process, and also basic commands to handle the Linux processes. Now you can try these commands on your local machine but be safe while using these commands on a server machine because a wrong command may affect your server badly.
I hope this article helps you in some way. If you are getting stuck at some point please feel free to forward any queries to us.
Due to growing digitalization, Email Communication has become the backbone of professional interactions. Yet, surprisingly, many professionals struggle to craft…
As the digital landscape continues to evolve, securing your website has never been more crucial. SSL, or Secure Sockets Layer,…
As a web designer and web developer your experience must have reached to new height, right? Further, you need to…
In today's digital landscape, timing is everything. Whether you're a social media manager, business owner, or content creator, the success…
Are you a website owner? Maintaining the website is the prime concern for any website owner. Yes, it’s equally important…