Table 62-3 describes commands for managing processes.
Table 62-3 Commands for Managing Processes
Use This Command ... |
To ... |
---|---|
ps |
Check the status of active processes on a system, as well as display detailed information about the processes |
dispadmin |
List default scheduling policies |
priocntl |
Assign processes to a priority class and manage process priorities |
nice |
Change the priority of a timesharing process |
See Chapter 63, Managing Processes (Tasks) for more information about commands for managing processes.
In addition, process tools are available in /usr/proc/bin that display highly detailed information about the processes listed in /proc, also known as the process file system (PROCFS). Images of active processes are stored here by their process ID number.
The process tools are similar to some options of the ps command, except that the output provided by the tools is more detailed. In general, the process tools:
Display more details about processes, such as fstat and fcntl information, working directories, and trees of parent and child processes
Provide control over processes, allowing users to stop or resume them
The new /usr/proc/bin utilities are summarized in Table 62-4.
Table 62-4 Process Tools
Tools That Control Processes |
What the Tools Do |
---|---|
/usr/proc/bin/pstop pid |
Stops the process |
/usr/proc/bin/prun pid |
Restarts the process |
/usr/proc/bin/ptime pid |
Times the process using microstate accounting |
/usr/proc/bin/pwait [-v] pid |
Waits for specified processes to terminate |
Tools That Display Process Details |
What the Tools Display |
/usr/proc/bin/pcred pid |
Credentials |
/usr/proc/bin/pfiles pid |
fstat and fcntl information for open files |
/usr/proc/bin/pflags pid |
/proc tracing flags, pending and held signals, and other status information for each lwp |
/usr/proc/bin/pldd pid |
Dynamic libraries linked into each process |
/usr/proc/bin/pmap pid |
Address space map |
/usr/proc/bin/psig pid |
Signal actions |
/usr/proc/bin/pstack pid |
Hex+symbolic stack trace for each lwp |
/usr/proc/bin/ptree pid |
Process trees containing specified pids |
/usr/proc/bin/pwdx pid |
Current working directory |
In these commands, pid is a process identification number. You can obtain this number by using the ps -ef command.
Chapter 63, Managing Processes (Tasks), describes how to use the process tool commands to perform selected system administration tasks, such as displaying details about processes, and starting and stopping them. A more detailed description of the process tools can be found in proc(1).
If a process becomes trapped in an endless loop, or if it takes too long to execute, you may want to stop (kill) the process. See Chapter 63, Managing Processes (Tasks), for more information about stopping processes using the kill command.