ps

ps [-fhsl] [-o]...

The ps command lists the details all the processes running on a system. By default, the following details are displayed for each process:

  • Process ID

  • Total execution time

  • Process name

Notes:

  • Whenever data is not accessible to the ps command, a ? symbol is displayed.

  • The total execution time is not listed on a Hardware Reference Platform (HRP) or a production device as the monitoring mechanism is optimised out of production ROMs.

The ps command supports the following options:

Option Description

-f

Lists the details all the processes along with the following information for each process:

  • Process ID

  • Total execution time

  • Complete path of the executable used by the process

-h

Displays help information for the ps command.

-s

Lists the names of the servers.

-l

Lists the details all the processes along with the following information for each process:

  • Status of the process

  • Process ID

  • Priority of the process

  • Address of the process

  • Size of the process

  • Total execution time

  • Name of the process

-o

This option enables you to customise the column headers displayed when the details of all the processes are listed. The default column headers are TIME , PID , COMMAND (command arguments for the process), and COMMAND (complete path of the executable used by the process). You can customise these column headers by assigning a value for the following variables:

  • time (TIME): Total execution time.

  • pid (PID): Process ID.

  • args (COMMAND): Command arguments for the process. The Symbian version of the ps command does not list any command arguments for a process, instead the complete path of the executable used by the process is displayed within square brackets under the comm column.

  • comm (COMMAND): Complete path of the executable used by the process.

Examples:

  • To assign Total Execution Time as column header instead of TIME (the default value), use the following command:

    ps -o "time=Total Execution Time"

    Note: You can use a comma (,) to specify multiple values using the -o option.

  • To view the details of the processes with their default column headers, use the following command:

    ps -o comm,time,args,pid

  • To view the details of the processes with their complete path and assign Exec Time as column header for TIME , use the following command:

    ps -o comm, time=Exec Time

The following table describes the default column headers used be the ps command:

Column Header Description

S

Describes the state of the process. The only state supported by Symbian is Running .

PID

Indicates the process ID of the process.

PRI

Indicates the priority of the process. When the state of the process is suffixed by < it indicates that the process is of high priority. Otherwise, when the status is suffixed by N it indicates that the process is of low priority.

ADDR

Indicates the memory address of the process.

SZ

The size in blocks of the core image of the process. (1 block = 512 bytes).

TIME

The total execution time for the process. This is displayed in the following format:

[dd-]hh:mm:ss

  • dd: Days

  • hh: Hours

  • mm: Minutes

  • ss: Seconds

CMD

Indicates the command name (complete path of the executable used by the process). The complete path is displayed when you use the -f option.