summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-22Merge branch 'improve-statusfile-read'HEADmasterAaron Ball
2022-06-22Improve status file reading durabilityAaron Ball
This improves the durability of reading the statusfile. Previously, the read process expected the file fields to be ordered in exactly the right way or the read process would fail. Now it reads the file line by line, selecting the correct string scan based on the field the line starts with. Not that for efficiency, this also checks to see if the value has already been read in and skips all subsequent references to it.
2022-06-22Merge branch 'diskstats'Aaron Ball
2022-06-22Implement disk statsAaron Ball
This adds the `diskreadkb` and `diskwritekb` values to the status file and updates relevant main code to pull this data. Note that the default disk to pull metrics for is `sda`, but this can be overridden at runtime with the environment variable `CMON_DISKDEV`. Another useful value might be `nvme0n1`. For available options, check `/sys/block/`.
2022-06-21Update meminfo values to include totalAaron Ball
This renames `memmax` to `memusedmax`, and `memavg` to `memusedavg` and adds an additional data point `memtotal`.
2022-06-21Support overriding net device nameAaron Ball
The default net device was `wlan0`, and it was not previously overrideable. Now it can be overridden by the `CMON_NETDEV` environment variable.
2022-06-21Makefile:Add valgrind targetAaron Ball
This is set up to check for memory leaks verbosely, as well as notify of leaked file descriptors.
2022-06-21Close leaked file descriptor in meminfo constructorAaron Ball
2022-06-21Remove unecesswary includes from mainAaron Ball
2022-06-21Move status struct from heap to stackAaron Ball
This updates the relevant code to move the status struct from the heap into the stack. This simplifies memory management and code.
2022-06-21Stop using heap for meminfo structAaron Ball
This rewrites the meminfo constructor to take the struct as an input argument so it can be allocated in the stack.
2022-06-21Initial commit of all code under GPLv3Aaron Ball
Currently monitors average and max values for cpu load and memory usage, as well as network bytes transmitted and received, uptime, and overall measurement counts. Stores state file at /tmp/cmon.status.

Generated by cgit