ps
Prev | Cygwin Utilities | Next

## Name

ps — Report process status

## Synopsis

`ps` [-aeflsW] [-u `UID`] [-p `PID`]

`ps` -h | -V

## Options

     -a, --all       show processes of all users
     -e, --everyone  show processes of all users
     -f, --full      show process uids, ppids
     -h, --help      output usage information and exit
     -l, --long      show process uids, ppids, pgids, winpids
     -p, --process   show information for specified PID
     -s, --summary   show process summary
     -u, --user      list processes owned by UID
     -V, --version   output version information and exit
     -W, --windows   show windows as well as cygwin processes
    With no options, ps outputs the long format by default

## Description

The ps program gives the status of all the Cygwin processes running on the system (ps = "process status"). Due to the limitations of simulating a POSIX environment under Windows, there is little information to give.

The PID column is the process ID you need to give to the kill command. The PPID is the parent process ID, and PGID is the process group ID. The WINPID column is the process ID displayed by NT's Task Manager program. The TTY column gives which pseudo-terminal a process is running on, or a `'?'` for services. The UID column shows which user owns each process. STIME is the time the process was started, and COMMAND gives the name of the program running. Listings may also have a status flag in column zero; `S` means stopped or suspended (in other words, in the background), `I` means waiting for input or interactive (foreground), and `O` means waiting to output.

By default, ps will only show processes owned by the current user. With either the `-a` or `-e` option, all user's processes (and system processes) are listed. There are historical UNIX reasons for the synonomous options, which are functionally identical. The `-f` option outputs a "full" listing with usernames for UIDs. The `-l` option is the default display mode, showing a "long" listing with all the above columns. The other display option is `-s`, which outputs a shorter listing of just PID, TTY, STIME, and COMMAND. The `-u` option allows you to show only processes owned by a specific user. The `-p` option allows you to show information for only the process with the specified PID. The `-W` option causes ps show non-Cygwin Windows processes as well as Cygwin processes. The WINPID is also the PID, and they can be killed with the Cygwin kill command's `-f` option.

Prev | Up | Next
profiler | Home | regtool