CONTENT
  • CHANGES
Szukaj
counter

#top renice


renice - alter priority of running processes

Powiązane:
ionice, nice, renice,

SYNOPSIS
renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]


DESCRIPTION
Renice alters the scheduling priority of one or more running processes. The following who parameters are interpreted as process ID's, process group ID's, or user names. Renice'ing a process group causes all processes in the process group to have their scheduling priority altered. Renice'ing a user causes all processes owned by the user to have their scheduling priority altered. By default, the processes to be affected are specified by their process ID's.


OPTIONS
-g
Force who parameters to be interpreted as process group ID's.

-u
Force the who parameters to be interpreted as user names.

-p
Resets the who interpretation to be (the default) process ID's.

NOTE
For example,

renice +1 987 -u daemon root -p 32

would change the priority of process ID's 987 and 32, and all processes owned by users daemon and root.

Users other than the super-user may only alter the priority of processes they own, and can only monotonically increase their "nice value" within the range 0 to PRIO_MAX (20). (This prevents overriding administrative fiats.) The super-user may alter the priority of any process and set the priority to any value in the range PRIO_MIN (-20) to PRIO_MAX. Useful priorities are: 20 (the affected processes will run only when nothing else in the system wants to), 0 (the "base" scheduling priority), anything negative (to make things go very fast).

EXAMPLES
ustawienie domyślnego priorytetu (domyślna wartość 0) dla procesu pid = 1234
renice -p 1234
rezultat bedzie zależny od podanych argumentów wywołania:
 1234: old priority 0, new priority 0

sprawdzenie rezultatu poprzez wywołanie polecenia ps wraz podanym w argumencie formatującym wynik pola nice
ps -o pid,%cpu,%mem,nice,args
rezultat polecenia ps powinien być analogiczny do poniższego:
  PID %CPU %MEM  NI COMMAND
 1234  0.0  0.0   0 /bin/bash


ustawienie priorytetu o wartości 10 dla procesu pid = 1234
renice 10 -p 1234
rezultat bedzie zależny od podanych argumentów wywołania:
1234: old priority 0, new priority 10

sprawdzenie rezultatu poprzez wywołanie polecenia ps wraz podanym w argumencie formatującym wynik pola nice
ps -o pid,%cpu,%mem,nice,args
rezultat polecenia ps powinien być analogiczny do poniższego:
  PID %CPU %MEM  NI COMMAND
 1234  0.0  0.0  10 ps -o pid,%cpu,%mem,nice,args


ustawienie pierwotnego priorytetu procesu o wartości 0 dla procesu pid = 1234
renice 0 -p 17960
rezultat bedzie zależny od podanych argumentów wywołania:
renice: 17960: setpriority: Permission denied

sprawdzenie rezultatu poprzez wywołanie polecenia ps wraz podanym w argumencie formatującym wynik pola nice
ps -o pid,%cpu,%mem,nice,args
rezultat polecenia ps powinien być analogiczny do poniższego:
  PID %CPU %MEM  NI COMMAND
 1234  0.0  0.0  10 /bin/bash


ustawienie priorytetu o wartości -19 dla procesu pid = 1234
renice -19 -p 1234
rezultat bedzie zależny od wykonanych poleceń:
renice: 1234: setpriority: Permission denied

sprawdzenie rezultatu poprzez wywołanie polecenia ps wraz podanym w argumencie formatującym wynik pola nice
ps -o pid,%cpu,%mem,nice,args
rezultat polecenia ps powinien być analogiczny do poniższego:
  PID %CPU %MEM  NI COMMAND
 1234  0.1  0.0   0 /bin/bash

Jak widać powyżej zgodnie z komentarzem w manualu dla komendy renice:
Users other than the super-user may only alter the priority of processes they own,
and can only monotonically increase their "nice value" within the range 0 to PRIO_MAX (20).
zwykły użytkownik nie może ustawić priorytetu mniejszego od zera, zwykły użytkownik nie może obniżyć wartości priorytetu dla procesu dla którego priorytet został obniżony oraz zwykły użytkownik może tylko zmieniać (zmniejszać!) priorytet tylko dla własnych procesów.


Zmodyfikowany ostatnio: 2015/05/14 21:02:54 (8 lat temu), textsize: 4,79 kB, htmlsize: 5,80 kB

Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników