Matthew Wall edited this page Dec 31, 2017 · 9 revisions

Monitor Computer Health

The ComputerMonitor (cmon) is a weewx service that collects CPU load, memory used/available, disk space, and network traffic to a database. You can then add plots to view the data.


daycpu dayload


How to Install

  1. Run the extension installer
wee_extension --install weewx-cmon-x.y.z.tgz
  1. Restart weewx
sudo /etc/init.d/weewx stop
sudo /etc/init.d/weewx start


cmon will save data at every archive interval. Look at the cmon report to see plots.


Add plots to other reports by modifying the ImageGenerator section of skin.conf. For example, daily plots of CPU, load, and memory would look something like this:

        data_binding = cmon_binding
        time_length = 86400
        x_label_format = %H:%M



then display in templates like this:

<img src="daycpu.png" />
<img src="dayload.png" />
<img src="daymem.png" />

Upgrading from weewx 2.6-2.7

The schema for cmon 0.7 is not backward compatible. You must either delete any existing cmon database (if you do not care to retain data), or add a column called 'interval' to the existing cmon database (if you want to keep existing data).

Upgrading from weewx 2.5

The default schema changed from cmon r789 to cmon 0.1. cmon 0.1 adds the ability to specify the schema in weewx.conf or in bin/user/ cmon r789 defaulted to using a database called computer.sdb. cmon 0.1 and later uses a database called cmon.sdb.