miércoles, 21 de septiembre de 2016

Linux and Unix renice command

About renice

renice alters the priority of running processes. It is similar to the nice command, but is used for processes that are already running.

Description

renice alters the scheduling priority of one or more running processes.
A higher value of priority actually makes the process lower priority; it means that the process will demand fewer system resources (and therefore is a "nicer" process). A lowerpriority value means that the process will demand more resources, possibly denying those resources to processes that are "nicer".
The priority value of any given process can vary from -20 (highest priority, least "nice") to 20 (lowest priority, "nicest"). The default priority of new processes, by default, is 0.
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.

renice syntax

renice [-n] priority [[-p] pid who...] [[-g] pgrp who...] [[-u] user who...]
renice -h | -v

Options

-n--priorityThe scheduling priority of the process, process group, or user.
-g--pgrpForce who parameters to be interpreted as process group ID's.
-u--userForce the who parameters to be interpreted as user names.
-p--pidResets the who interpretation to be (the default) process ID's.
-v--versionDisplay version information, and exit.
-h--helpDisplay a help message, and exit.

About priority

Users other than the superuser 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). The superuser may alter the priority of any process and set the priority to any value in the range PRIO_MIN (-20) to PRIO_MAX.
Useful settings for priority are:
  • 20: the affected processes will run only when nothing else in the system needs the resources.
  • 0: the default.
  • any negative value: will make things go very fast, at the expense of other processes.

renice examples

renice +1 987 -u daemon root -p 32
Change the priority of process IDs 987 and 32, and all processes owned by usersdaemon and root, to be one greater (+1, one increment "nicer") than its current value.
kill — Send a signal to a process, affecting its behavior or killing it.
nice — Invoke a command with an altered scheduling priority.
ps — Report the status of a process or processes.
top — Display a sortable, continually-updated list of processes.

No hay comentarios:

Publicar un comentario