This tool leverages top
and ps
to get a rough idea of what applications are using excessive memory or CPU.
brew install deno
deno run --allow-run=top,ps --check https://deno.land/x/hog/hog.ts
deno install --allow-run=top,ps https://deno.land/x/hog/hog.ts
hog
to show PIDs for top level processes that were collapsed by name:
hog -p
to see CPU usage
hog cpu
note that this will take a few seconds as the default is to take 4 samples. To get CPU usage over more samples:
hog cpu -s 20