ClementTsang / bottom

Yet another cross-platform graphical process/system monitor.
https://clementtsang.github.io/bottom
MIT License
10.29k stars 247 forks source link

Output metrics for later plotting and analysis #1389

Open LamprosPitsillos opened 10 months ago

LamprosPitsillos commented 10 months ago

I'd like to propose a feature that allows users to export metrics to individual files, each with a timestamp preferably.

This would improve the ease of analysis, as users could then easily track changes over time at a later date with any DataAnalysis tools they prefer ,or even provide for a way for the data to be fed back to Bottom to view it in there with its beautiful TUI ? .

With an --export-to-files ? option, each monitored value (e.g., battery, CPU, processes) would be exported to a separate file, labeled with a timestamp.

Having individual files for each metric, along with timestamps, would streamline the analysis process, making it more convenient for users to track system performance changes. This enhancement would be particularly beneficial for users like me who want to gain deeper insights into battery consumption, CPU usage, and running processes over extended periods.

Example usages:


Discussed in https://github.com/ClementTsang/bottom/discussions/1384

Originally posted by **LamprosPitsillos** January 14, 2024 Is there a way to have `bottom` export its metrics in a file/log for later checking? My reason for this is that i would like to have an idea of how my battery is being drained , how fast , which process is running at that point and what not. I don't know of a better tool than `bottom` for monitoring system , and thank you for that, and i thought if it could output somewhere and i could collect any data i want from the generated dataset! example: ```console bottom --monitor "battery,cpu,processes" > monitor-output.'extension' ```
theelderbeever commented 9 months ago

Also very interested in this. jsonl or ndjson could be could options for file formats since they allow for streaming writes pretty easily and can be read by a lot of data analysis tools.