no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | htop [2012/08/09 15:44] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== htop ====== | ||
| + | * [[Linux Memory and Processes]] | ||
| + | |||
| + | htop is an alternative display for top, showing system processes. | ||
| + | |||
| + | By default, htop will order the processes by PID. | ||
| + | |||
| + | === FreeBSD === | ||
| + | |||
| + | < | ||
| + | echo linproc / | ||
| + | mkdir -p / | ||
| + | ln -s /usr/compat /compat | ||
| + | mount linproc | ||
| + | </ | ||
| + | |||
| + | === Examples === | ||
| + | |||
| + | Show processes being run by user mysql: | ||
| + | |||
| + | < | ||
| + | htop -u mysql | ||
| + | </ | ||
| + | |||
| + | Display threads for user apache, sorted by how long they have been running: | ||
| + | |||
| + | < | ||
| + | htop -u apache --sort-key TIME | ||
| + | </ | ||
| + | |||
| + | See how much memory apache threads are really using, highest values first: | ||
| + | |||
| + | < | ||
| + | htop -u apache --sort-key M_RESIDENT | ||
| + | </ | ||
| + | |||
| + | Watching the system to see what programs are using the most memory, the highest percentage of CPU, the highest percentage of memory, and then running the longest time: | ||
| + | |||
| + | < | ||
| + | htop -u apache --sort-key M_RESIDENT | ||
| + | htop -u apache --sort-key PERCENT_CPU | ||
| + | htop -u apache --sort-key PERCENT_MEM | ||
| + | htop -u apache --sort-key TIME | ||
| + | </ | ||
| + | |||
| + | === Display Values === | ||
| + | |||
| + | The default values displayed are: | ||
| + | |||
| + | * PID | ||
| + | * USER | ||
| + | * PRIORITY | ||
| + | * NICE | ||
| + | * M_SIZE | ||
| + | * M_RESIDENT | ||
| + | * M_SHARE | ||
| + | * STATE | ||
| + | * PERCENT_CPU | ||
| + | * PERCENT_MEM | ||
| + | * TIME | ||
| + | * Command | ||
| + | |||
| + | === Gotchas === | ||
| + | |||
| + | htop's argument for sorting by keys is not consistent across versions, despite what the --help output may say. To sort by a key, use '' | ||