System Administration Guide: Advanced Administration

How to Control Processes

  1. 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.

  2. 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. 

  3. Verify the process status.


    # ps -ef | grep PID
    

Example—Controlling Processes

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


# pgrep dtpad 1
2921
# pstop 2921 2
# prun 2921 3
  1. Obtains the process identification number for dtpad

  2. Stops the dtpad process

  3. Restarts the dtpad process