How to manage processes in linux using ps , nice, renice and kill | ps -elf | kill | nice | renice

Published: 25 July 2020
on channel: Red hat Linux Training for beginners
362
10

https://62189pxds1903s8gner72sa2c8.ho...


Process management in linux

A process is a set of instructions which executes in the memory.
It is created in the memory when a program or command is executed.
Every process is identified by a unique no. ie., PID (Process ID).
Several processes are started at boot time and which are running at background called deamons.
The Linux kernel is used to communicate with the processes by their process ID's (PID's).
Deamon is a process running in the background. These are handled by the system and process are handled by the users.
The first process in RHEL - 6 is initd and it starts at boot time. It's process ID is 1 where as in RHEL - 7 the first process is systemd and it starts at boot time.
To manage or to see the processes there are two commands.
(i) # ps and (ii) # top
ps : is just a snap shot of the current status of the processes. It gives only one terminal info. not all the terminals info.
top : Using top command we can monitor the processes continuously. By default every 3 seconds it will refresh the data


Setting up the Priority of a Process
 
When talking about processes priority is all about managing processor time.
In Linux we can set guidelines for the CPU to follow when it is looking at all the tasks it has to do. These guidelines are called niceness or nice value.
The Linux niceness scale goes from-20 to 19.
The lower the number the more priority that task gets. If the niceness value is high number like 19 the task will be set to the lowest priority and the CPU will process it whenever it gets a chance. The default nice value is zero.
There are two options to reduce/increase value of a process.
You can either do it using the
nice command or the renice command.

To kill the signal completely
• To kill the signal
• First find out the process running in the system, let’s say by a user
#ps -u user name
#ps -u yogi
#kill signal no process id
#kill -9 11591
Restart the process continue working
#fg 1


Watch video How to manage processes in linux using ps , nice, renice and kill | ps -elf | kill | nice | renice online, duration hours minute second in high quality that is uploaded to the channel Red hat Linux Training for beginners 25 July 2020. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 362 times and liked it 10 visitors.