Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 23

Managing System Processes (Tasks)

This chapter describes the procedures for managing system processes. This is a list of the step-by-step instructions in this chapter.

Commands for Managing System Processes (Overview)

The following table describes the commands for managing system processes.

Table 23-1 Commands for Managing Processes

Command

Man Page

Description

ps, pgrep, prstat

ps(1), pgrep(1), and prstat(1M)

Checks the status of active processes on a system, as well as displays detailed information about the processes

dispadmin

dispadmin(1M)

Lists default scheduling policies

priocntl

priocntl(1)

Assigns processes to a priority class and manages process priorities

nice

nice(1)

Changes the priority of a timesharing process

psrset

psrset(1M)

Binds specific process groups to a group of processors rather than to just a single processor

The Solaris Management Console's Processes Tool enables you to manage processes with a user-friendly interface. For information on using and starting the Solaris Management Console, see "Working With the Management Console (Tasks)" in System Administration Guide: Basic Administration.

The ps Command

The ps command enables you to check the status of active processes on a system, as well as display technical information about the processes. This data is useful for such administrative tasks as determining how to set process priorities.

Depending on which options you use, the ps command reports the following information:

  • Current status of the process

  • Process ID

  • Parent process ID

  • User ID

  • Scheduling class

  • Priority

  • Address of the process

  • Memory used

  • CPU time used

The following table describes some fields that are reported by the ps command. Which fields are displayed depend on which option you choose. For a description of all available options, see ps(1).

Table 23-2 Summary of Fields in ps Reports

Field

Description

UID

The effective user ID of the process's owner.

PID

The process ID.

PPID

The parent process ID.

C

The processor utilization for scheduling. This field is not displayed when the -c option is used.

CLS

The scheduling class to which the process belongs: real-time, system, or timesharing. This field is included only with the -c option.

PRI

The kernel thread's scheduling priority. Higher numbers indicate a higher priority.

NI

The process's nice number, which contributes to its scheduling priority. Making a process "nicer" means lowering its priority.

ADDR

The address of the proc structure.

SZ

The virtual address size of the process.

WCHAN

The address of an event or lock for which the process is sleeping.

STIME

The starting time of the process (in hours, minutes, and seconds).

TTY

The terminal from which the process (or its parent) was started. A question mark indicates that there is no controlling terminal.

TIME

The total amount of CPU time used by the process since it began.

CMD

The command that generated the process.

How to List Processes

You can use the ps command to list all the processes on a system.

$ ps [-efc]

ps

Displays only the processes that are associated with your login session.

-ef

Displays full information about all the processes that are being executed on the system.

-c

Displays process scheduler information.

 
 
 
  Previous   Contents   Next