Официален блог на WebEKM EKM очаквайте сайта онлайн скоро.

Download Free Templates http://bigtheme.net/ free full Wordpress, Joomla, Mgento - premium themes.

Linux – Signals, Processes and theirs prioritization with Nice Levels

penguin-using-a-laptop-computer-93033306-5a1f85c64e4f7d003793a806PID stands for “process ID” that have got every process in the system and thanks to this can be easily identified. This identification is necessary when we are going to send “signals” to a given process.

The list of the most common signals that we may want to send to the process is:

signals terms
The syntax of use consists of : kill [number] [process ID]

SIGTERM 15 is by default

KILL – command to sending signals.

kill -15 1234 – terminating process ID 1234 

kill -9 1234 – killing process ID 1234

ps -aux -processes list
ps -ef the list with running programs

Killall (signal) name- (exact name) – if we have more users logged to the same server, that use the same process all of them will be rejected

pgrep – prints a list of matching processes based on the part of the name (alike search function). 

pkill (signal) name – (the part of the process name or exact)

pgrep -a slee

pgrep -af slee – switch -f says “don’t search only for the process name but for entire command line”

Let’s have a look on the example.

I used pgrep command to list all processes with “smb” in the name:


next I used pkill command with entire name “smbd”, I could use only “smb”

3 pkill

and both processes 1521 and 1535 have been killed

Process Priorites (Nice Levels)

Each process consume server CPU. Thanks to prioritizing we are able to give some processes that are crucial the higher level, in Linux it is called Nice Levels

Default priority is equal 0. Let’s have a look on below chart

chart nice.jpg

As we may conclude -20 is the highest level that we may assign to the process and
the lowest priority is 19.

nice – 10 medium low
nice – -15 very high
nice – 19 lowest priority
nice – -20 highest priority

no nice level = 0 – middle

How do we grant nice levels ?

ps -alf – the list of processes with nice levels

nice [number with dash] [name_of_process]


I’ve created some processes “sleep” and put them to the background “&”, I also set up the nice levels for them

4. nice sleep

Renicechanging levels for processes that are being in used already

renice (number) -p PID –

renice 19 -p 1234
renice -13 -p 1234

I’ve changed the “nice level” for PID 21380 from 10 to -19 so I increased its priority!

5 renice

Onlain bookmaker bet365.com - the best bokie