List the processes that are hogging the CPU
hogs [options] [pids ...]
- -i iter
- Limit the output to the specified number of iterations (default: no limit).
- -m [e][t][p][s]
- Specify the type of memory mappings to include in the memory total for each process:
- e — MAP_ELF mappings
- t — MAP_STACK mappings
- s — MAP_SHARED mappings
- p — MAP_PRIVATE mappings (the default)
You can concatenate these types; for example, -msp gives memory for both shared and private mappings.
- Show the names of processes (hogs always displays the process IDs).
- -p priority
- Run hogs at the given priority (default: the same as the parent process).
- -S [c|m|p]
- Sort by:
- c — CPU (the default)
- m — memory
- p — process ID
- -s sec
- Sleep this long between updates (default: 3 seconds).
- -% num [c|m]
- Show only processes that consume this percentage or more CPU (c, the default) or memory (m). You can use this option to reduce the amount of output.
The hogs utility displays a list of processes in descending order by percentage of CPU usage (i.e. it shows who's hogging the processor). It loops forever, sleeping between updates.
The format of the output is tabular, and includes:
- The ID of the process being reported.
- The name of the process (included only if you specify the -n option).
- The number of milliseconds for which this process has been running since the last iteration.
- The amount of time that the process ran in this iteration, as a percentage of the times of all the other processes running.
- The amount of time that the process ran in this iteration, as a percentage of the iteration time.
- The amount of memory that the process used. The types of mappings included depend on the -m option.
- The SYS column is incorrect on multicore systems; the numbers in this column will add up to (roughly) the number of processors times 100%.
- The numbers from hogs are approximate.
Display the processes that are using 10% or more of the CPU. Include the name of the processes:
$ hogs -n -% 10c