> For the complete documentation index, see [llms.txt](https://lauradang.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lauradang.gitbook.io/notes/shell/linux/processes.md).

# Processes

## See threads in a process

```bash
pstree -halp <pid>
```

## Monitoring Processes

This commands allows you to see the CPU usage of each core on your machine:

```bash
watch -n 0.5 ps -ur
```

### `htop`

<https://unix.stackexchange.com/questions/10362/why-does-htop-show-more-process-than-ps> TLDR: Turn off threads as procceses by pressing 'H' in `htop`.
