Adds the /usr/proc/bin directory to the PATH variable
Obtains the process identification number for lpsched
Displays the current working directory for lpsched
Displays the process tree that containslpsched
Displays fstat and fcntl information
How to Control Processes
Obtain the process ID of the process you want to control.
# 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 /usr/proc/bin command to control the process.
# /usr/proc/bin/pcommand pid
pcommand
Process tool command you want to run. Table 23-3 lists these commands.
pid
Identifies the process ID.
Verify the process status.
# pgrep PID
Example--Controlling Processes
The following example shows how to use process tools to stop and restart dtpad.
# PATH=$PATH:/usr/proc/bin # export PATH 1 # pgrep dtpad 2 2921 # pstop 2921 3 # prun 2921 4 |
Adds the /usr/proc/bin directory to the PATH variable
Obtains the process identification number for dtpad
Stops the dtpad process
Restarts the dtpad process
Killing a Process (pkill)
Sometimes, it is necessary 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 pid
Managing Process Class Information
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.