The PlotCPU is a Rust program that reads data from a CSV file containing system monitoring information (and auto-converts to UTF-8 because HWiNFO exports in Windows-1252 🙄) and generates a line chart to visualize the usage of different system components over time.
- Reads data from a CSV file
- Parses the data into time-series records
- Generates a line chart showing the usage of RAM, CPU, and GPU over time
- Saves the chart as a PNG image
- Rust programming language (>= 1.69)
- Cargo package manager (usually comes with Rust)
- UbuntuMono Regular (included in the project directory, install pls)*
*If you don't want to use UbuntuMono, you can change the font in the FONT_FAMILY
constant in src/main.rs
.
-
Clone the repository:
git clone https://github.com/KallelGaNewk/plotcpu.git
-
Navigate to the project directory:
cd plotcpu
-
Place your CSV file containing the system monitoring data in the project directory.
-
Update the
main
function insrc/main.rs
with the correct column indexes for the time, RAM, CPU, and GPU fields in the CSV file (this should already be right). This can be done by modifying theTableIndex
struct and its usage in theread_csv_file
function. -
Run the program using Cargo:
cargo run
-
Feel free to modify whatever you want to suit your needs.
- Auto-convert CSV file to UTF-8
- Command-line arguments to specify the input and output files
- Config file to specify the column indexes for the time, RAM, CPU, and GPU fields, chart title, labels, and colors
- Add functionality to compare multiple data sets
- Support for other system components (e.g. disk, network, etc.)
This project is licensed under the MIT License.
The PlotCPU program was inspired by the need to visualize system monitoring data exported from HWiNFO64 (v7.40-5000).
Contributions to this project are welcome. If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.