Linux Process Priority Nice/Renice

What is process=process is a set of instruction which is loaded in memory whenever we run any program memory helps us to run it and help to give an unique process id and priority.
Terminate and killing Process in Linux

#ps=helps to show running process and command and unique id.

#ps –a=to view which command is running on which terminal with process id and terminal number

#ps –e=list all program process

#ps –ao tty.comm.pid= to view which command is running on which terminal with process id and terminal number

#pidof vim=to view 1 specific process id

Terminate and kill Process in Linux:-

#kill 25769(process id) =to stop and kill programs.

#kill -9 25789(process id)=to stop immediately program

#killall vim(any program name) to kill all programs like vim

#pkill –u testuser1= to kill all program of a specific user.

Process Priority with nice and renice:-

Whenever any program runs system give a process id and process priority number to that program to run id so here we can changes process priority to give high or less priority to run.

#ps –ao comm.tty,tty,nice= to show running programs with process priority

#to change any program priority and also in running program

#jitni (value)priority km hogi us program ko utni high priority mileygi priority can be change upto -20 to -90

#nice –n -5 vim(command name)

# ps –ao comm.tty,tty,nice,pid= to show running programs with process priority with process id.

#renice -4 27420=(to change running process priority.

Only root or super user can change priority to high any other user can only change it to up it means less priority

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s