process_investigation
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| process_investigation [2016/01/28 09:25] – luke7858 | process_investigation [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| === processes investigation === | === processes investigation === | ||
| + | Please see [[top5_cpu_processes|top CPU consumers]] or [[ram_diagnostics|top RAM consumers]] for commands to find the offending processes | ||
| + | \\ | ||
| + | Example Process: | ||
| + | <sxh bash> | ||
| + | USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | ||
| + | apache | ||
| + | </ | ||
| + | \\ | ||
| + | === Investigating a PID === | ||
| + | First we need to find out if the process is an Established connection (replace 1234 with the PID): | ||
| + | <sxh bash> | ||
| + | netstat -pant | grep 1234 | ||
| + | </ | ||
| + | \\ | ||
| + | === Process ' | ||
| + | An important column to look into is the ' | ||
| + | \\ | ||
| ^ State ^ Definition ^ | ^ State ^ Definition ^ | ||
| | D | uninterruptible sleep (usually IO) | | | D | uninterruptible sleep (usually IO) | | ||
| Line 25: | Line 41: | ||
| The command below runs strace for 3 seconds and then terminates the command. Replace 1234 with the PID number you are investigating: | The command below runs strace for 3 seconds and then terminates the command. Replace 1234 with the PID number you are investigating: | ||
| <sxh bash> | <sxh bash> | ||
| - | timeout | + | timeout |
| </ | </ | ||
| - | + | If there is some for out output on the screen, this means the process is active. | |
| - | <sxh bash> | + | \\ |
| - | + | If there is nothing on the screen except something similar to the following then the process is not currently active: | |
| - | </ | + | |
| <sxh bash> | <sxh bash> | ||
| + | Process 1 attached | ||
| + | < | ||
| </ | </ | ||
| + | If the process is not active and the output from the netstat command does not return anything then the process could be dead. | ||
process_investigation.1453973157.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
