Add temp_graph.py to py-scripts #148
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Temp_graph is a small script that parses the output from journalctl -t heatmon into a series of CSVs (separated by timeframe and device type (radio/core)). It then can produce a report page with a series of graphs for each of these tables. This makes it easier to visually report temperature stats when testing systems. I originally wrote this script independently a few months before coming to CT, but have rewritten most of it in the last week to be more useful and visually appealing.
Design Notes:
-This script uses the matplotlib library to create its graphs. This library is used in other places in the lanforge codebase, but may not be the most robust option in the long run.
-The regex used to parse lines from journalctl -t heatmon is pretty specific and will break (but will be easy to fix) if there is a change to the formatting of heatmon. There is currently no option to directly pass in CSV files or to specify a pattern.
-The script creates CSV files, PNG files, and HTML files. These outputs are stored in a directory named Temp_Graphing_MON_D_H. I don't know how well this fits with our design standards.