Closed davidkirwan closed 11 years ago
I've added load averages and memory usage values to the /api/v1/system/status then created a basic highcarts graph to display the values. As the image shows I've added a tab system on the front end and added this graph to the status tab. This tab system will fix #11 when its merged into dev. While the changes to the code base I've made to construct this load graph will fix #8 when merged into dev.
The graph data is currently stored clientside, so tab switching resets the graph. I don't want this data being serialised alongside the mesh network data, nor do I want something similar to a rrdtool db constantly being written to the Raspberry Pi's flash storage, so I decided to just go with the client side javascript option. I may implement something like a circular array in Ruby and store the last hours worth of data in system RAM at a later date.
/api/v1/system/status no longer requires authentication with an APIKEY. It now returns a JSON string similar to the following format which can be used for graphing or statistical purposes:
{"running":true,"cpuload":"0.0","memload":"0.0"}
Fixed on dev branch
Flesh out functionality of /api/v1/system/status to potentially also include load information from the host the system is running on.