System Administration Guide

Controlling Processes (/proc Tools)

You can control some aspects of processes by using some of the process tools contained in /usr/proc/bin. Table 63-3 lists these process tools. Refer to proc(1) for detailed information about process tools.

Table 63-3 /usr/proc/bin Process Tools That Provide Control

Process Tool 

What it Does 

pstop

Stops a process 

prun

Restarts a process 


Note -

To avoid typing long command names, add the process tool directory to your PATH variable. This allows you to run process tools by entering only the last part of each file name (for example, prun instead of /usr/proc/bin/prun).


How to Control Processes

  1. (Optional) Use output from the ps command to obtain the identification number of the process you want to display more information about.


    # ps -e | grep process
    

    process

    Name of the process you want to display more information about. 

    The process identification number is in the first column of the output.

  2. 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 63-3 lists these commands.

    PID

    Identification number of a process. 

  3. Verify the process status using the ps command.


    # ps | grep PID
    

Example--Controlling Processes

The following example shows how to use process tools to stop and restart Print Tool.


 [Adds the /usr/proc/bin directory to
the PATH variable.] # PATH=$PATH:/usr/proc/bin
# export PATH
 [Obtains the process identification number for Print Tool. ] # ps -e | grep print*
264 console 0:03 printtool
 [Stops the Print Tool process. ] # pstop 264
  [Restarts the Print Tool process. ] # prun 264
# ps | grep 264
264 console 0:03 printtool
#