![]() |
![]() |
| |||||||||||||||||
|
# pgrep process |
process is the name of the process you want to control.
The process identification number is in the first column of the output.
Use the appropriate process command to control the process.
# /usr/bin/pcommand pid |
pcommand | Process command you want to run. Table 23-3 lists these commands. |
pid | Identifies the process ID. |
Verify the process status.
# ps -ef | grep PID |
The following example shows how to use process tools to stop and restart dtpad.
# pgrep dtpad 1 2921 # pstop 2921 2 # prun 2921 3 |
Obtains the process identification number for dtpad
Stops the dtpad process
Restarts the dtpad process
Sometimes, you might need to stop (kill) a process. The process might be in an endless loop, or you might have started a large job that you want to stop before it is completed. You can kill any process that you own, and superuser can kill any process in the system except for those processes with process IDs of 0, 1, 2, 3, and 4. Killing these processes might crash the system.
For more information, see pgrep(1).
How to Kill a Process(Optional) To kill a process that belongs to another user, become superuser.
Obtain the of the process ID of the process you want to stop.
$ pgrep process |
process is the name of the process you want to display more information about.
The process identification number is displayed in the first column of the output.
Stop the process.
$ pkill [-9] pid |
-9 | Ensures that the process terminates promptly. |
pid | Process ID to stop. |
Verify that the process has been stopped.
$ pgrep process |
The following list identifies the process scheduling classes that can be configured on your system, and the user priority range for the timesharing class. The possible process scheduling classes are as follows:
Fair share (FSS)
Fixed (FX)
System (SYS)
Interactive (IA)
Real-time (RT)
The priority of a process is inherited from the parent process. This priority is referred to as the user-mode priority.
The system looks up the user-mode priority in the timesharing dispatch parameter table and adds in any nice or priocntl (user-supplied) priority and ensures a 0-59 range to create a global priority.
The scheduling priority of a process is the priority assigned by the process scheduler, according to scheduling policies. The dispadmin command lists the default scheduling policies.
You can use the priocntl command to assign processes to a priority class and to manage process priorities. For instructions on using the priocntl command to manage processes, see How to Designate a Process Priority (priocntl).
You can display process scheduling classes and priority ranges with the priocntl -l command.
$ priocntl -l |
The following example shows output from the priocntl -l command.
# priocntl -l
CONFIGURED CLASSES
==================
SYS (System Class)
TS (Time Sharing)
Configured TS User Priority Range: -60 through 60
FX (Fixed priority)
Configured FX User Priority Range: 0 through 60
IA (Interactive)
Configured IA User Priority Range: -60 through 60
|
Previous Contents Index Next ![]() |