cjbassi / gotop

A terminal based graphical activity monitor inspired by gtop and vtop
GNU Affero General Public License v3.0
7.39k stars 444 forks source link

output snapshot as json #180

Open zachvalenta opened 4 years ago

zachvalenta commented 4 years ago

ask

CLI arg to output snapshot of system metrics (CPU, mem, disk, et al.) as JSON

why

Diffing. For example, let's say your machine feels laggy. You open gotop and things look pretty normal, but you don't remember the metrics from the last time you opened gotop, so unless something is very obviously wrong (machine is super hot, runaway process is hogging memory) you won't have any useful comparisons to make.

Whereas, with the JSON output option, you could just gotop --json > gotop-metrics-<date>.json to establish a baseline and then, when things get laggy, compare your current situation to the baseline.