weewx service to monitor cpu, memory, disk, and network

1,545 views
Skip to first unread message

mwall

unread,
Oct 22, 2013, 11:09:58 PM10/22/13
to weewx...@googlegroups.com
folks,

here is another weewx service to track cpu load, memory use, disk use, and network traffic.

https://sourceforge.net/p/weewx/wiki/monitor/

william phelps already wrote one of these as described in this thread:

https://groups.google.com/forum/#!topic/weewx-user/sk7kenddddQ

however, this service is a bit more generic - it should work on any linux with kernel 2.2 or later (not just the raspberry pi), and it saves data to a separate database instead of extending the weewx archive schema.

m

Derek Sedunary

unread,
Oct 25, 2013, 10:09:48 PM10/25/13
to weewx...@googlegroups.com
As I have not managed to break weewx for a few days I thought I might have a go at this (I am already using William's monitor that I have modified for my cpu temp as I am not using a Raspberry Pi).

I followed the instructions in the wiki down to item 5, restart weewx, where things started to go wrong. There appears to be some conflict between cmon and other services I have running.

I can see that cmon has detected my equipment and created the db but then things start going wrong. I have removed  user.cmon.ComputerMonitor from the service_list and weewx is running without error.

I have included the sylog output from the restart until the error caused weewx to stop.

I supposed it should be noted that I am using weewx-2.5.0b3, rapid-fire, William Phelps CPU monitor and your Forecast service.

Oct 26 11:06:13 debian weewx[13158]: wxengine: Initializing weewx version 2.5.0b3
Oct 26 11:06:13 debian weewx[13158]: wxengine: Using Python 2.7.3 (default, Jan  2 2013, 16:53:07) #012[GCC 4.7.2]
Oct 26 11:06:13 debian weewx[13158]: wxengine: pid file is /var/run/weewx.pid
Oct 26 11:06:13 debian weewx[13160]: wxengine: Using configuration file /home/weewx/weewx.conf
Oct 26 11:06:13 debian weewx[13160]: wxengine: Loading station type Vantage (weewx.drivers.vantage)
Oct 26 11:06:13 debian weewx[13160]: VantagePro: Opened up ethernet host 192.168.178.52 on port 22222
Oct 26 11:06:16 debian weewx[13160]: VantagePro: successfully woke up console
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service rapidfire.StdRapidFire
Oct 26 11:06:22 debian weewx[13160]: rapidfire: Started RapidFire thread.
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service rapidfire.StdRapidFire
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service user.cpustats.CpuStats
Oct 26 11:06:22 debian weewx[13160]: cpustats: started log at 235216
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service user.cpustats.CpuStats
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service weewx.wxengine.StdConvert
Oct 26 11:06:22 debian weewx[13160]: wxengine: StdConvert target unit is 0x10
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service weewx.wxengine.StdConvert
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service weewx.wxengine.StdCalibrate
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service weewx.wxengine.StdCalibrate
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service weewx.wxengine.StdQC
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service weewx.wxengine.StdQC
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service weewx.wxengine.StdArchive
Oct 26 11:06:22 debian weewx[13160]: wxengine: Using station hardware archive interval of 300
Oct 26 11:06:22 debian weewx[13160]: wxengine: Record generation will be attempted in 'hardware'
Oct 26 11:06:22 debian weewx[13160]: wxengine: Use LOOP data in hi/low calculations: 1
Oct 26 11:06:22 debian weewx[13160]: wxengine: Using archive database: archive_sqlite
Oct 26 11:06:22 debian weewx[13160]: stats: Schema exists with 16 elements
Oct 26 11:06:22 debian weewx[13160]: stats: Backfilling stats database.
Oct 26 11:06:22 debian weewx[13160]: stats: stats database up to date.
Oct 26 11:06:22 debian weewx[13160]: wxengine: Using stats database: stats_sqlite
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service weewx.wxengine.StdArchive
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service weewx.wxengine.StdTimeSynch
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service weewx.wxengine.StdTimeSynch
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service weewx.wxengine.StdPrint
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service weewx.wxengine.StdPrint
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service weewx.wxengine.StdRESTful
Oct 26 11:06:22 debian weewx[13160]: wxengine: Data will be posted to Wunderground
Oct 26 11:06:22 debian weewx[13160]: wxengine: Data will not be posted to PWSweather
Oct 26 11:06:22 debian weewx[13160]:     **** required parameter ''station'' is not specified
Oct 26 11:06:22 debian weewx[13160]: wxengine: Data will not be posted to CWOP
Oct 26 11:06:22 debian weewx[13160]:     **** required parameter ''station'' is not specified
Oct 26 11:06:22 debian weewx[13160]: restful: station will register with http://weewx.com/register/register.cgi
Oct 26 11:06:22 debian weewx[13160]: wxengine: Data will be posted to StationRegistry
Oct 26 11:06:22 debian weewx[13160]: wxengine: Started thread for RESTful upload sites.
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service weewx.wxengine.StdRESTful
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service weewx.wxengine.StdReport
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service weewx.wxengine.StdReport
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service examples.lowBattery.BatteryAlarm
Oct 26 11:06:22 debian weewx[13160]: lowBattery: LowBattery alarm turned on. Count threshold is 50
Oct 26 11:06:22 debian weewx[13160]: wxengine: Finished loading service examples.lowBattery.BatteryAlarm
Oct 26 11:06:22 debian weewx[13160]: wxengine: Loading service user.forecast.WUForecast
Oct 26 11:06:22 debian weewx[13160]: forecast: MainThread: WU: using table 'archive' in database 'forecast_sqlite'
Oct 26 11:06:23 debian weewx[13160]: forecast: MainThread: WU: last forecast issued 2013-10-26 09:50:38 CST (1382746838), requested 2013-10-26 09:50:38 CST (1382746838)
Oct 26 11:06:23 debian weewx[13160]: forecast: MainThread: WU: interval=10800 max_age=604800 api_key=cb9aa0c35a8ea4ad location=pws:INORTHER26 fc=hourly10day
Oct 26 11:06:23 debian weewx[13160]: wxengine: Finished loading service user.forecast.WUForecast
Oct 26 11:06:23 debian weewx[13160]: wxengine: Loading service user.cmon.ComputerMonitor
Oct 26 11:06:23 debian weewx[13160]: archive: Created and initialized database table 'archive'.
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: bogomips: 1595.96
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: hlt_bug: no
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: fpu_exception: yes
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: stepping: 0
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: cache_alignment: 64
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: clflush size: 64
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: coma_bug: no
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: cache size: 128 KB
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: cpuid level: 1
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: fpu: yes
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: model name: VIA Eden Processor  800MHz
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: address sizes: 36 bits physical, 32 bits virtual
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: f00f_bug: no
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: cpu family: 6
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: vendor_id: CentaurHauls
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: wp: yes
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: fdiv_bug: no
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: power management:
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge cmov pat clflush acpi mmx fxsr sse sse2 tm nx up pni est tm2 xtpr rng rng_en ace ace_en ace2 ace2_en phe phe_en pmm pmm_en
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: model: 13
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: processor: 0
Oct 26 11:06:23 debian weewx[13160]: cmon: cpuinfo: cpu MHz: 797.984
Oct 26 11:06:23 debian weewx[13160]: wxengine: Finished loading service user.cmon.ComputerMonitor
Oct 26 11:06:23 debian weewx[13160]: wxengine: Starting up weewx version 2.5.0b3
Oct 26 11:06:23 debian weewx[13160]: VantagePro: Getting archive packets since 2013-10-26 10:55:00 CST (1382750700)
Oct 26 11:06:25 debian weewx[13160]: VantagePro: successfully woke up console
Oct 26 11:06:27 debian weewx[13160]: VantagePro: Retrieving 1 page(s); starting index= 1
Oct 26 11:06:29 debian weewx[13160]: Archive: added archive record 2013-10-26 11:00:00 CST (1382751000)
Oct 26 11:06:29 debian weewx[13160]: forecast: MainThread: WU: starting thread
Oct 26 11:06:29 debian weewx[13160]: forecast: WUThread: WU: not yet time to do the forecast
Oct 26 11:06:29 debian weewx[13160]: forecast: WUThread: WU: terminating thread
Oct 26 11:06:29 debian weewx[13160]: Archive: added archive record 2013-10-26 11:06:30 CST (1382751390)
Oct 26 11:06:30 debian weewx[13160]: restful: Published record 2013-10-26 11:00:00 CST (1382751000) to Wunderground station INORTHER26
Oct 26 11:06:30 debian weewx[13160]: restful: Attempting to register using 'http://weewx.com/register/register.cgi?python_info=2.7.3&weewx_info=2.5.0b3&station_type=Vantage&longitude=130.888471305&station_url=http%3A%2F%2Fwww.ninedragons.org%2Fweewx%2F&latitude=-12.3861795033&platform_info=Linux-3.2.0-4-686-pae-i686-with-debian-7.1&description=Glorious+one+day+-+bloody+hot+the+next'
Oct 26 11:06:31 debian weewx[13160]: restful: Registration successful
Oct 26 11:06:31 debian weewx[13160]: restful: Published record 2013-10-26 11:00:00 CST (1382751000) to StationRegistry station http://www.ninedragons.org/weewx/
Oct 26 11:06:31 debian weewx[13160]: wxengine: Shut down StdRESTful thread.
Oct 26 11:06:31 debian weewx[13160]: rapidfire: Shut down RapidFire thread.
Oct 26 11:06:34 debian weewx[13160]: VantagePro: successfully woke up console
Oct 26 11:06:34 debian weewx[13160]: wxengine: Caught unrecoverable exception in wxengine:
Oct 26 11:06:34 debian weewx[13160]:     ****  unsupported operand type(s) for -: 'int' and 'str'
Oct 26 11:06:34 debian weewx[13160]:     ****  Traceback (most recent call last):
Oct 26 11:06:34 debian weewx[13160]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 889, in main
Oct 26 11:06:34 debian weewx[13160]:     ****      engine.run()
Oct 26 11:06:34 debian weewx[13160]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 142, in run
Oct 26 11:06:34 debian weewx[13160]:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
Oct 26 11:06:34 debian weewx[13160]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 192, in dispatchEvent
Oct 26 11:06:34 debian weewx[13160]:     ****      callback(event)
Oct 26 11:06:34 debian weewx[13160]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 447, in startup
Oct 26 11:06:34 debian weewx[13160]:     ****      self._catchup()
Oct 26 11:06:34 debian weewx[13160]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 564, in _catchup
Oct 26 11:06:34 debian weewx[13160]:     ****      self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, record=record, origin='hardware'))
Oct 26 11:06:34 debian weewx[13160]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 192, in dispatchEvent
Oct 26 11:06:34 debian weewx[13160]:     ****      callback(event)
Oct 26 11:06:34 debian weewx[13160]:     ****    File "/home/weewx/bin/user/cmon.py", line 199, in newArchiveRecordCallback
Oct 26 11:06:34 debian weewx[13160]:     ****      self.prune_data(now - self.max_age)
Oct 26 11:06:34 debian weewx[13160]:     ****  TypeError: unsupported operand type(s) for -: 'int' and 'str'
Oct 26 11:06:34 debian weewx[13160]:     ****  Exiting.


Derek...

Derek Sedunary

unread,
Oct 26, 2013, 12:41:12 AM10/26/13
to weewx...@googlegroups.com
The problem appears to be that I also read the instructions in cmon,py so I added:

[ComputerMonitor]
    database = computer_sqlite
    max_age = 2592000 # 30 days


hashing out the line max_age = 2592000 # 30 days and re-starting weewx removes the error.

I read line 199 in cmon.py and decided that the problem probably was that cmon was trying to check the age of the records on the first run and failing.

I will let it run for a while then un-hash max_age = 2592000 # 30 days and see what happens.

Derek...

mwall

unread,
Oct 28, 2013, 9:42:12 PM10/28/13
to weewx...@googlegroups.com
On Saturday, October 26, 2013 12:41:12 AM UTC-4, Derek Sedunary wrote:
The problem appears to be that I also read the instructions in cmon,py so I added:

[ComputerMonitor]
    database = computer_sqlite
    max_age = 2592000 # 30 days


hashing out the line max_age = 2592000 # 30 days and re-starting weewx removes the error.

hi derek,

sorry about that.  i forgot to convert the config option from string to int.  i have updated cmon.py with the fix:

http://lancet.mit.edu/mwall/projects/weather/releases/weewx-cmon-r691.py

if you set max_age = None then data will be stored indefinitely.

m

Derek Sedunary

unread,
Oct 30, 2013, 9:09:13 AM10/30/13
to weewx...@googlegroups.com
Thanks for that Matt

I was puzzled about None or none. In cmon.py to my uneducated eye it appeared to be looking for none and setting the value to None but I copied your example and weewx restarted with out errors.

Something else I have notice and are also a little puzzled by is the the cmon plots are update on the 10 minuites (e.g. 18:10, 18:20, 18:30 etc) but all my other day plots update on the 5 minuites (18:05, 18:10, 18:15, 18:20 etc). See my server page and check back 5 minutes latter to see Williams plots have updated but the cmon plots do not.

Is that how it is meant to work? In the instruction wiki it states "cmon will save data to the computer database at every archive interval" which is set at 300 seconds. I have all the day plots together in skin.conf and cannot see any setting I have missed.

Not a big deal but does seem unusual.

I have also had a scalling issue with the values on the Y axis. My solution has been to go through cmon.py adding a few "/ 1024" and "/ 1048576" change the scale into kB and MB where I required it.

Derek...

mwall

unread,
Oct 30, 2013, 9:30:58 AM10/30/13
to weewx...@googlegroups.com
On Wednesday, October 30, 2013 9:09:13 AM UTC-4, Derek Sedunary wrote:
I was puzzled about None or none. In cmon.py to my uneducated eye it appeared to be looking for none and setting the value to None but I copied your example and weewx restarted with out errors.

in weewx.conf you can specify 'None' or 'none' - cmon does a case-insensitive comparision.
 

Something else I have notice and are also a little puzzled by is the the cmon plots are update on the 10 minuites (e.g. 18:10, 18:20, 18:30 etc) but all my other day plots update on the 5 minuites (18:05, 18:10, 18:15, 18:20 etc). See my server page and check back 5 minutes latter to see Williams plots have updated but the cmon plots do not.

Is that how it is meant to work? In the instruction wiki it states "cmon will save data to the computer database at every archive interval" which is set at 300 seconds. I have all the day plots together in skin.conf and cannot see any setting I have missed.

i'm not sure what is happening here.  cmon is bound to each NEW_ARCHIVE_RECORD event, so it *should* add a data point every archive interval.  perhaps the data aggregation parameters you use are different for displaying data from the cmon database?  take a look at your cmon database to see whether the timestamps correspond to the archive record timestamps.

 
I have also had a scalling issue with the values on the Y axis. My solution has been to go through cmon.py adding a few "/ 1024" and "/ 1048576" change the scale into kB and MB where I required it.

i'll have to do some thinking on this.  scaling should happen in the graphing layer, not the data capture layer, so the 'right' fix will probably mean changes to the weewx graphing code...

m

Jim Woodruff

unread,
Oct 30, 2013, 6:16:01 PM10/30/13
to weewx...@googlegroups.com
Matt, on my system my network interface is thru eth1. When I replace eth0 with eth1 in the cmon.py and skin.conf files I receive the following errors in my syslog:

Oct 30 08:15:32 freyr weewx[19205]: reportengine: Caught unrecoverable exception in generator weewx.imagegenerator.ImageGenerator
Oct 30 08:15:32 freyr weewx[19205]:         ****  no such column: net_eth1_rbytes
Oct 30 08:15:32 freyr weewx[19205]:         ****  Traceback (most recent call last):
Oct 30 08:15:32 freyr weewx[19205]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 131, in run
Oct 30 08:15:32 freyr weewx[19205]:         ****      obj.start()
Oct 30 08:15:32 freyr weewx[19205]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 294, in start
Oct 30 08:15:32 freyr weewx[19205]:         ****      self.run()
Oct 30 08:15:32 freyr weewx[19205]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 38, in run
Oct 30 08:15:32 freyr weewx[19205]:         ****      self.genImages(self.gen_ts)
Oct 30 08:15:32 freyr weewx[19205]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 202, in genImages
Oct 30 08:15:32 freyr weewx[19205]:         ****      aggregate_interval, aggregate_type)
Oct 30 08:15:32 freyr weewx[19205]:         ****    File "/usr/share/weewx/weewx/archive.py", line 409, in getSqlVectorsExtended
Oct 30 08:15:32 freyr weewx[19205]:         ****      return self.getSqlVectors(ext_type, startstamp, stopstamp, aggregate_interval, aggregate_type)
Oct 30 08:15:32 freyr weewx[19205]:         ****    File "/usr/share/weewx/weewx/archive.py", line 350, in getSqlVectors
Oct 30 08:15:32 freyr weewx[19205]:         ****      for _rec in _cursor.execute(sql_str, (startstamp, stopstamp)):
Oct 30 08:15:32 freyr weewx[19205]:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 120, in execute
Oct 30 08:15:32 freyr weewx[19205]:         ****      raise weedb.OperationalError(e)
Oct 30 08:15:32 freyr weewx[19205]:         ****  OperationalError: no such column: net_eth1_rbytes
Oct 30 08:15:32 freyr weewx[19205]:         ****  Generator terminated...

What else needs to be changed?

mwall

unread,
Oct 30, 2013, 9:05:33 PM10/30/13
to weewx...@googlegroups.com


On Wednesday, October 30, 2013 6:16:01 PM UTC-4, Jim Woodruff wrote:
Matt, on my system my network interface is thru eth1. When I replace eth0 with eth1 in the cmon.py and skin.conf files I receive the following errors in my syslog:


jim,

around line 115 there is a variable called defaultSchema.  this defines the database schema.  around line 138 you will see ('net_eth0_rbytes','INTEGER'), followed by more net_eth0_XXX variables.

change eth0 to eth1 in each of these (there are 8 of them)

then delete the database

then start weewx

i'll try to figure out a way to make the schema adapt automatically.  for example, on my machine i have eth0 and tun0 (tun0 is for a vpn tunnel).

m

Jim Woodruff

unread,
Oct 30, 2013, 11:49:45 PM10/30/13
to weewx...@googlegroups.com
I had previously changed those eight occurrences but hadn't deleted any database. I changed them again but obviously deleted the wrong database (schema.pyc) as I now receive these errors:

Oct 30 20:40:22 freyr weewx[30455]: wxengine: Caught unrecoverable exception in wxengine:
Oct 30 20:40:22 freyr weewx[30455]:     ****  schema mismatch: ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth0_rbytes', 'net_eth0_rpackets', 'net_eth0_rerrs', 'net_eth0_rdrop', 'net_eth0_tbytes', 'net_eth0_tpackets', 'net_eth0_terrs', 'net_eth0_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used'] != ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth1_rbytes', 'net_eth1_rpackets', 'net_eth1_rerrs', 'net_eth1_rdrop', 'net_eth1_tbytes', 'net_eth1_tpackets', 'net_eth1_terrs', 'net_eth1_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used']
Oct 30 20:40:22 freyr weewx[30455]:     ****  Traceback (most recent call last):
Oct 30 20:40:22 freyr weewx[30455]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 886, in main
Oct 30 20:40:22 freyr weewx[30455]:     ****      engine = EngineClass(config_dict)
Oct 30 20:40:22 freyr weewx[30455]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 70, in __init__
Oct 30 20:40:22 freyr weewx[30455]:     ****      self.loadServices(config_dict)
Oct 30 20:40:22 freyr weewx[30455]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 124, in loadServices
Oct 30 20:40:22 freyr weewx[30455]:     ****      self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Oct 30 20:40:22 freyr weewx[30455]:     ****    File "/usr/share/weewx/user/cmon.py", line 191, in __init__
Oct 30 20:40:22 freyr weewx[30455]:     ****      raise Exception('schema mismatch: %s != %s' % (dbcol, memcol))
Oct 30 20:40:22 freyr weewx[30455]:     ****  Exception: schema mismatch: ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth0_rbytes', 'net_eth0_rpackets', 'net_eth0_rerrs', 'net_eth0_rdrop', 'net_eth0_tbytes', 'net_eth0_tpackets', 'net_eth0_terrs', 'net_eth0_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used'] != ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth1_rbytes', 'net_eth1_rpackets', 'net_eth1_rerrs', 'net_eth1_rdrop', 'net_eth1_tbytes', 'net_eth1_tpackets', 'net_eth1_terrs', 'net_eth1_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used']
Oct 30 20:40:22 freyr weewx[30455]:     ****  Exiting.

Jim

mwall

unread,
Oct 31, 2013, 6:55:44 AM10/31/13
to weewx...@googlegroups.com
jim,

schema.pyc is a compiled python file, not the database.  if you are using sqlite, databases typically have a filename extension of .sdb.

for a default weewx configuration installed with setup.py, the file you need to delete is /home/weewx/archive/computer.sdb

for a default weewx configuration installed from the .deb package, the file you need to delete is /var/lib/weewx/computer.sdb

1) change the variable names in cmon.py
2) stop weewx
3) delete computer.sdb
4) start weewx

m

Derek Sedunary

unread,
Oct 31, 2013, 7:50:52 AM10/31/13
to weewx...@googlegroups.com

take a look at your cmon database to see whether the timestamps correspond to the archive record timestamps

I had to install a graphic desktop and SQLBrowser to do this as I could not figure out how to view computer.sdb from the command line (I could not get sqlite3 commands to work).

Anyway the last 4 entries (after converting from epoc time) were 21:40:40, 21:45:40, 21:50:38, 21:55:37 which are near enough to 5 minutes apart.

Here is the section from skin.conf that creats the sever plots:
    [[server_images]]
        x_label_format =  %H:%M
        bottom_label_format = %d/%m/%y %H:%M
        time_length = 97200    # == 4 days
        aggregate_type = avg
        aggregate_interval = 300 # 5 minuite average
        image_width = 600


        [[[servercpupercent]]]
            chart_line_colors = 0xce02020, 0x2020e0, 0x20a020
            y_label = %
            aggregate_type = avg
            aggregate_interval = 300  # 5 minute average
            [[[[cpuUsagePercent]]]]
            [[[[cpuWaitPercent]]]]

        [[[servercpuload]]]
            [[[[cpuLoadFactor]]]]
                aggregate_type = avg
                aggregate_interval = 300  # 5 minute average


        [[[servercputemperature]]]
            y_label =   °C
            chart_line_colors = 0x2020c0, 0x20a020, 0xc02020
            yscale = 20, 50, 5
            [[[[cpuTemperature]]]]
#                aggregate_type = avg
#                aggregate_interval = 300  # 5 minute average
#                line_type = none
#                marker_size = 2
#                marker_type = "box"

        [[[serverlogerrors]]]
            chart_line_colors = 0x2020c0, 0x20a020, 0xc02020, 0xc0c020
#            plot_type = bar (broken, don't use)
             yscale = None, None, 1
            [[[[logErrors]]]]
            [[[[logIOErrors]]]]
            [[[[logFTPErrors]]]]
            [[[[logRFErrors]]]]

       [[[daycpu]]]
            archive_database = computer_sqlite
            [[[[cpu_user]]]]
            [[[[cpu_idle]]]]
            [[[[cpu_nice]]]]
            [[[[cpu_system]]]]
            [[[[cpu_iowait]]]]
            [[[[cpu_irq]]]]

       [[[dayload]]]
            archive_database = computer_sqlite
            yscale = 0, 1, 0.25
            [[[[load1]]]]
            [[[[load5]]]]
            [[[[load15]]]]

       [[[daydisk]]]
            archive_database = computer_sqlite
            y_label = Mb
            yscale = 0, None, None
            [[[[disk_root_total]]]]
            [[[[disk_root_used]]]]

       [[[daymem]]]
            archive_database = computer_sqlite
#            yscale = 0, None, None
            y_label = Mb
            [[[[mem_total]]]]
            [[[[mem_used]]]]

       [[[daynet]]]
            archive_database = computer_sqlite
#            y_label_format = "%e"
            y_label = kb
            [[[[net_eth0_rbytes]]]]
            label = rx kilobytes
            [[[[net_eth0_tbytes]]]]
            label = tx kilobytes

I cannot see anything there that should cause cmon plots only updating every 10 minutes.

Derek...

 

Jim Woodruff

unread,
Oct 31, 2013, 9:15:55 AM10/31/13
to weewx...@googlegroups.com
Thank you for your help and education. Works great. FYI, I found the computer.sdb in /archive.

Jim

Derek Sedunary

unread,
Nov 1, 2013, 4:26:34 AM11/1/13
to weewx...@googlegroups.com
I have been looking at the syslog trying to find a difference between the weewx update with fresh cmon plots and updates without fresh cmon plots.

The only difference is the line genimages: Generated 20  images for StandardReport in 6.46 seconds which switches between 15 and 20 images on alternate updates but I cannot see anything that would cause it skip 5 plots on alternate updates.

Derek...

Florian B

unread,
Jan 15, 2014, 11:11:17 AM1/15/14
to weewx...@googlegroups.com
Hi,

I've done everything mentioned here in the posts.

But I still have the following errors:

Jan 15 17:10:50 raspberrypi weewx[2628]: reportengine: Caught unrecoverable exception in generator weewx.imagegenerator.ImageGenerator
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****  unhashable type: 'list'
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****  Traceback (most recent call last):
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 131, in run
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****      obj.start()
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 294, in start
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****      self.run()
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 38, in run
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****      self.genImages(self.gen_ts)
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 71, in genImages
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****      archivedb = self._getArchive(plot_options['archive_database'])
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 312, in _getArchive
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****      if archive_name not in self.archive_cache:
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****  TypeError: unhashable type: 'list'
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****  Generator terminated...


Any idea?

Regards

Florian

mwall

unread,
Jan 15, 2014, 12:38:40 PM1/15/14
to weewx...@googlegroups.com
On Wednesday, January 15, 2014 11:11:17 AM UTC-5, Florian B wrote:
Hi,

I've done everything mentioned here in the posts.

But I still have the following errors:
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 312, in _getArchive
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****      if archive_name not in self.archive_cache:
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****  TypeError: unhashable type: 'list'
Jan 15 17:10:50 raspberrypi weewx[2628]:         ****  Generator terminated...

Any idea?

florian,

please post your weewx.conf file.

m

Florian B

unread,
Jan 15, 2014, 2:10:42 PM1/15/14
to weewx...@googlegroups.com
Here we go. In this config I commented the lines which refer to cymon and the engine is missing.

##############################################################################
#                                                                            #
#                        WEEWX CONFIGURATION FILE                            #
#                                                                            #
# Copyright (c) 2009-2013 Tom Keffer <tke...@gmail.com>                     #
# $Id: weewx.conf 1823 2013-12-30 23:48:21Z mwall $
##############################################################################

# This section is for general configuration information

# Set to 1 for extra debug info, otherwise comment it out or set to zero.
debug
= 0

# Root directory of the weewx data file hierarchy for this station.
WEEWX_ROOT
= /etc/weewx

# How long to wait before timing out a socket (FTP, HTTP) connection:
socket_timeout
= 20

# Do not modify this - it is used by setup.py when installing and updating.
version
= 2.5.1

##############################################################################

[Station]
   
# This section is for information about your station

   
# Description of the station location.  If there is a comma in the
   
# description, then put the description in quotes.
    location
= "Juelich-Mersch, Germany"

   
# Latitude, longitude in decimal degrees
    latitude
= 50.960
    longitude
= 6.378

   
# Altitude of the station, with unit it is in. This is downloaded from
   
# from the station if the hardware supports it.
    altitude
= 99,  meter

   
# The start of the rain year (1=January; 10=October, etc.). This is
   
# downloaded from the station if the hardware supports it.
    rain_year_start
= 1

   
# Start of week (0=Monday, 6=Sunday)
    week_start
= 0

   
# Set to type of station hardware.  Supported stations include:
   
#  Vantage
   
#  WMR100
   
#  WMR200
   
#  WMR9x8
   
#  FineOffsetUSB
   
#  WS28xx
   
#  WS23xx
   
#  TE923
   
#  Simulator
    station_type
= WMR100

   
# If you have a website, you may optionally specify an URL for
   
# its HTML server.
    station_url
= http://www.wetternet.org

##############################################################################

[Vantage]
   
# This section is for configuration info for a Davis VantagePro2,
   
# VantageVue or WeatherLinkIP

   
# Connection type: serial or ethernet
   
#  serial (the classic VantagePro)
   
#  ethernet (the WeatherLinkIP)
    type
= serial

   
# If the connection type is serial, a port must be specified:
   
#   Debian, Ubuntu, Redhat, Fedora, and SuSE:
   
#     /dev/ttyUSB0 is a common USB port name
   
#     /dev/ttyS0   is a common serial port name
   
#   BSD:
   
#     /dev/cuaU0   is a common serial port name
    port
= /dev/ttyUSB0

   
# If the connection type is ethernet, an IP Address/hostname is required:
    host
= 1.2.3.4

   
######################################################
   
# The rest of this section rarely needs any attention.
   
# You can safely leave it "as is."
   
######################################################

   
# Serial baud rate (usually 19200)
    baudrate
= 19200

   
# TCP port (when using the WeatherLinkIP)
    tcp_port
= 22222

   
# TCP send delay (when using the WeatherLinkIP):
    tcp_send_delay
= 1

   
# The id of your ISS station (usually 1)
    iss_id
= 1

   
# How long to wait for a response from the station before giving up (in
   
# seconds; must be greater than 2)
    timeout
= 5

   
# How long to wait before trying again (in seconds)
    wait_before_retry
= 1.2

   
# How many times to try before giving up:
    max_tries
= 4

   
# The driver to use:
    driver
= weewx.drivers.vantage

##############################################################################

[WMR100]
   
# This section is for the Oregon Scientific WMR100

   
# How long a wind record can be used to calculate wind chill (in seconds)
    stale_wind
= 30

   
# The driver to use
    driver
= weewx.drivers.wmr100

##############################################################################

[WMR200]
   
# This section is for the Oregon Scientific WMR200

   
# The driver to use
    driver
= weewx.drivers.wmr200

##############################################################################

[WMR9x8]
   
# This section is for the Oregon Scientific WMR918/968

   
# Connection type. For now, 'serial' is the only option.
    type
= serial

   
# Serial port such as /dev/ttyS0, /dev/ttyUSB0, or /dev/cuaU0
    port
= /dev/ttyUSB0

   
# The driver to use
    driver
= weewx.drivers.wmr9x8

##############################################################################

[FineOffsetUSB]
   
# This section is for the Fine Offset series of weather stations.

   
# The station model, e.g., WH1080, WS1090, WS2080, WH3081
    model
= WS2080

   
# The polling mode can be PERIODIC or ADAPTIVE
    polling_mode
= PERIODIC

   
# How often to poll the station for data, in seconds
    polling_interval
= 60

   
# The pressure calibration offset, in hPa (millibars)
    pressure_offset
= 0

   
# The driver to use
    driver
= weewx.drivers.fousb

##############################################################################

[WS23xx]
   
# This section is for the La Crosse WS-2300 series of weather stations.

   
# Serial port such as /dev/ttyS0, /dev/ttyUSB0, or /dev/cuaU0
    port
= /dev/ttyUSB0

   
# The WS23xx is branded by various vendors.  Use the model parameter to
   
# indicate the brand, e.g., 'LaCrosse WS2317' or 'TFA Primus'
    model
= LaCrosse WS23xx

   
# The pressure calibration offset, in hPa (millibars)
    pressure_offset
= 0

   
# The driver to use
    driver
= weewx.drivers.ws23xx

##############################################################################

[WS28xx]
   
# This section is for the La Crosse WS-2800 series of weather stations.

   
# Radio frequency to use between USB transceiver and console: US or EU
   
# US uses 915 MHz, EU uses 868.3 MHz.  Default is US.
    transceiver_frequency
= US

   
# The WS28xx is branded by various vendors.  Use the model parameter to
   
# indicate the brand, e.g., 'LaCrosse C86234' or 'TFA Primus'
    model
= LaCrosse WS28xx

   
# The pressure calibration offset, in hPa (millibars)
    pressure_offset
= 0

   
# The driver to use
    driver
= weewx.drivers.ws28xx

##############################################################################

[TE923]
   
# This section is for the Hideki TE923 series of weather stations.

   
# The TE923 is branded by various vendors.  Use the model parameter to
   
# indicate the brand, e.g., 'Meade TE923W' or 'TFA Nexus'
    model
= TE923

   
# The driver to use
    driver
= weewx.drivers.te923

   
# The default configuration associates the channel 1 sensor with outTemp
   
# and outHumidity.  To change this, or to associate other channels with
   
# specific columns in the database schema, use the following maps.
   
[[sensor_map]]
       
# Map the remote sensors to columns in the database schema.
        outTemp
=     t_1
        outHumidity
= h_1
        extraTemp1
=  t_2
        extraHumid1
= h_2
        extraTemp2
=  t_3
        extraHumid2
= h_3
        extraTemp3
=  t_4
       
# WARNING: the following are not in the default schema
        extraHumid3
= h_4
        extraTemp4
=  t_5
        extraHumid4
= h_5

   
[[battery_map]]
        txBatteryStatus
=      batteryUV
        windBatteryStatus
=    batteryWind
        rainBatteryStatus
=    batteryRain
        outTempBatteryStatus
= battery1
       
# WARNING: the following are not in the default schema
        extraBatteryStatus1
=  battery2
        extraBatteryStatus2
=  battery3
        extraBatteryStatus3
=  battery4
        extraBatteryStatus4
=  battery5

##############################################################################

[Simulator]
   
# This section for the weewx weather station simulator

   
# The time (in seconds) between LOOP packets.
    loop_interval
= 2.5

   
# The simulator mode can be either 'simulator' or 'generator'.
   
# Real-time simulator. Sleep between each LOOP packet.
    mode
= simulator
   
# Generator.  Emit LOOP packets as fast as possible (useful for testing).
   
#mode = generator

   
# The start time. If not specified, the default is to use the present time.
   
#start = 2011-01-01 00:00

    driver
= weewx.drivers.simulator

##############################################################################

[StdRESTful]
   
# This section is for uploading data to sites using RESTful protocols.

   
[[Wunderground]]
       
# This section is for configuring posts to the Weather Underground

       
# If you wish to do this, uncomment the following station and password
       
# lines and fill them with your station and password:
       
#station  = your Weather Underground station ID (eg, KORHOODR3)
       
#password = your Weather Underground password

        driver
= weewx.restful.Ambient

   
[[PWSweather]]
       
# This section is for configuring posts to PWSweather.com

       
# If you wish to do this, uncomment the following station and password
       
# lines and fill them with your station and password:
       
#station  = your PWSweather station ID (eg, KORHOODR3)
       
#password = your PWSweather password

        driver
= weewx.restful.Ambient

   
[[CWOP]]
       
# This section is for configuring posts to CWOP

       
# If you wish to do this, make sure the following line is uncommented
       
# and filled out with your station ID:
       
#station = CW1234
 
       
# If you are an APRS (radio amateur) station, you will need a passcode
       
# as well:
       
#passcode = your passcode here eg, 12345 (APRS stations only)
 
       
# Comma separated list of server:ports to try:
        server
= cwop.aprs.net:14580, cwop.aprs.net:23

       
# How often we should post in seconds. 0=with every archive record
        interval
= 600  

        driver
= weewx.restful.CWOP

   
[[StationRegistry]]
       
# Uncomment the following line to register this weather station.
       
#register_this_station = True

       
# Specify a station URL, otherwise the station_url from [Station]
       
# will be used.
       
#station_url = http://example.com/weather/

       
# Specify a description of the station, otherwise the location from
       
# [Station] will be used.
       
#description = The greatest station on earth

        driver
= weewx.restful.StationRegistry

##############################################################################

[StdReport]
   
# This section specifies what reports, using which skins, to generate.

   
# Where the skins reside, relative to WEEWX_ROOT:
    SKIN_ROOT
= /etc/weewx/skins
   
   
# Where the generated reports should go, relative to WEEWX_ROOT:
    HTML_ROOT
= /var/www/

   
# Each subsection represents a report you wish to run:
   
[[StandardReport]]
   
       
# What skin this report should be based on:
        skin
= Alf_normal

 
[[AlfNormalReport]]
       
# What skin this report should be based on:
        skin
= Alf_normal
        HTML_ROOT
= public_html/alf_normal
       
# You can override values in the skin configuration file.

       
# You can override values in the skin configuration file here.  For
       
# example, uncomment the following lines to display metric units
       
# throughout the report, regardless of what is defined in the skin.
       
#
       
#[[[Units]]]
       
#    [[[[Groups]]]]
       
#        group_altitude = 99,  meter
       
#        group_degree_day   = degree_C_day
       
#        group_pressure     = mbar
       
#        group_radiation    = watt_per_meter_squared
       
#        group_rain         = mm
       
#        group_rainrate     = mm_per_hour
       
#        group_speed        = meter_per_second
       
#        group_speed2       = meter_per_second2
       
#        group_temperature  = degree_C
   
   
# Here is an example where we create a custom report, still using the
   
# standard skin, but where the image size is overridden, and the results
   
# are put in a separate subdirectory 'public_html/big'
   
#
   
#[[BigReport]]
   
#    skin = Standard
   
#    HTML_ROOT = /var/www/weewx
   
#    [[[Images]]]
   
#        image_width = 600
   
#        image_height = 360

   
[[FTP]]
        skin
= Ftp

       
# FTP'ing the results to a webserver is treated as just another report,
       
# albeit one with an unusual report generator!
       
#
       
# If you wish to use FTP, uncomment and fill out the next four lines:
       
#    user = replace with your username
       
#    password = replace with your password
       
#    server = replace with your server name, e.g, www.threefools.org
       
#    path = replace with the destination directory (e.g., /weather)

       
# Set to 1 to use passive mode, zero for active mode:
        passive
= 1

       
# How many times to try to transfer a file before giving up:
        max_tries
= 3

       
# If you wish to upload files from something other than what HTML_ROOT
       
# is set to above, then reset it here:
       
# HTML_ROOT = /var/www/weewx

   
[[RSYNC]]
        skin
= Rsync

       
# rsync'ing the results to a webserver is treated as just another
       
# report, much like the FTP report.
       
#
       
# The following configure what system and remote path the files are
       
# sent to:
       
#    server = replace with your server name, e.g, www.threefools.org
       
#    path = replace with the destination directory (e.g., /weather)
       
# If you wish to use rsync, you must configure passwordless ssh using
       
# public/private key authentication from the user account that weewx
       
# runs as to the user account on the remote machine where the files
       
# will be copied.
       
#    user = replace with your username
       
# Rsync can be configured to remove files from the remote server if
       
# they don't exist under HTML_ROOT locally.  USE WITH CAUTION: if you
       
# make a mistake in the remote path, you could could unintentionally
       
# cause unrelated files to be deleted. Set to 1 to enable remote file
       
# deletion, zero to allow files to accumulate remotely.
       
#    delete = 1

##############################################################################

[StdConvert]

   
# This service acts as a filter, converting the unit system coming from
   
# the hardware to a target output unit system.
   
#
   
# The target_unit affects only the unit system in the database.  Once
   
# chosen it cannot be changed without converting the entire database.
   
# Modification of target_unit after starting weewx will result in
   
# corrupt data - the database will contain a mix of US and METRIC data.
   
#
   
# The value of target_unit does not affect the unit system for
   
# reporting - reports can display US, Metric, or any combination of
   
# units.
   
#
   
# In most cases, target_unit should be left as the default: US
   
#
   
# In particular, those migrating from a standard wview installation
   
# should use US since that is what the wview database contains.

   
# DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
    target_unit
= US  # Choices are 'US' or 'METRIC'

##############################################################################

[StdCalibrate]
   
# This section can adjust data using calibration expressions.

   
[[Corrections]]
       
# For each type, an arbitrary calibration expression can be given.
       
# It should be in the native units of the weather station hardware.
       
# For example:
       
# outTemp = outTemp - 0.2

##############################################################################

[StdQC]
   
# This section is for quality control checks.
   
# Values must be in the units defined in the StdConvert section.

   
[[MinMax]]
        outTemp
= -40, 120
        barometer
= 28, 32.5
        outHumidity
= 0, 100

##############################################################################

[StdArchive]
   
# This section is for configuring the archive databases.

   
# The database to be used for archive data.
   
# This should match a section given in section [Databases] below.
    archive_database
= archive_sqlite

   
# The database to be used for stats data.
   
# This should match a section given in section [Databases] below.
    stats_database
= stats_sqlite

   
# If your station hardware supports data logging then the archive interval
   
# will be downloaded from the station.
   
# Otherwise, you must specify it below (in seconds):
    archive_interval
= 120

   
# How long to wait (in seconds) before processing new archive data. Must
   
# be greater than zero.
    archive_delay
= 15

   
# Generally, if possible, new records are downloaded from the console
   
# hardware. If the console does not support this, then software record
   
# generation is done.
   
# Set the following to "software" to force software record generation:
    record_generation
= hardware
   
   
# Whether to include LOOP data in hi/low statistics.
    loop_hilo
= True

   
# The schema to be used for the archive database. This is used only when
   
# it is initialized.
   
# Thereafter, the types are retrieved from the database.
    archive_schema
= user.schemas.defaultArchiveSchema

   
# The schema to be used for the stats database. This is used only when
   
# it is initialized.
   
# Thereafter, the types are retrieved from the database.
    stats_schema
= user.schemas.defaultStatsSchema

##############################################################################

[StdTimeSynch]

   
# How often to check the weather station clock for drift (in seconds)
    clock_check
= 14400

   
# How much it can drift before we will correct it (in seconds):
    max_drift
= 5

##############################################################################

[Databases]
   
# This section lists possible databases.

   
[[archive_sqlite]]
        root
= %(WEEWX_ROOT)s
        database
= /var/lib/weewx/weewx.sdb
        driver
= weedb.sqlite

   
[[stats_sqlite]]
        root
= %(WEEWX_ROOT)s
        database
= /var/lib/weewx/stats.sdb
        driver
= weedb.sqlite

   
# MySQL databases require setting an appropriate 'user' and 'password'
   
[[archive_mysql]]
        host
= localhost
        user
= weewx
        password
= weewx
        database
= weewx
        driver
= weedb.mysql

   
[[stats_mysql]]
        host
= localhost
        user
= weewx
        password
= weewx
        database
= stats
        driver
= weedb.mysql

 
#  [[computer_sqlite]]
 
#      root = %(WEEWX_ROOT)s
 
#      database = archive/computer.sdb
 
#      driver = weedb.sqlite

##############################################################################

[ComputerMonitor]
    database
= computer_sqlite
    max_age
= 2592000 # 30 days; None to store indefinitely

##############################################################################

[Engines]
   
# This section configures the internal weewx engines.
   
# It is for advanced customization.

   
[[WxEngine]]
       
# The list of services the main weewx engine should run:
        service_list
= weewx.wxengine.StdTimeSynch, weewx.wxengine.StdConvert, weewx.wxengine.StdCalibrate, weewx.wxengine.StdQC, weewx.wxengine.StdArchive, weewx.wxengine.StdPrint, weewx.wxengine.StdRESTful, weewx.wxengine.StdReport



mwall

unread,
Jan 15, 2014, 3:05:51 PM1/15/14
to weewx...@googlegroups.com
On Wednesday, January 15, 2014 2:10:42 PM UTC-5, Florian B wrote:
Here we go. In this config I commented the lines which refer to cymon and the engine is missing.

sorry, i should have been more specific.  the stack trace you posted looks like a configuration problem, probably having to do with your database.  in this case, the part of weewx.conf that matters is the [Databases] section.  so first of all, since your weewx.sdb and stats.sdb are located in /var/lib, i would suggest that you put the computer.sdb there as well:

[[computer_sqlite]]
    root = %(WEEWX_ROOT)s
    database = /var/lib/weewx/computer.sdb
    driver = weedb.sqlite

if you leave the computer_sqlite section commented then the cmon service will definitely fail.

the other missing piece of the puzzle is your skin configuration.  we'll need to see your skin.conf, specifically the ImageGenerator section.

m

Florian B

unread,
Jan 15, 2014, 4:24:27 PM1/15/14
to weewx...@googlegroups.com

Well, I made the changes you mentioned above. It wasn't commented when I tried that. I commented it now because I want to have the data archieved and running.

Here is my skin.conf: (The sections are commented too. Only to leave all running)

F

############################################################################################
#                                                                                          #
#                                                                                          #
#                          ALF_NORMAL SKIN CONFIGURATION FILE                              #
#                                                                                          #
#                                                                                          #
############################################################################################
#                                                                                          #
#                    Copyright (c) 2010 Alf Hogemark <a...@i100.no>                         #
#                                                                                          #
#                      See the file LICENSE.txt for your full rights.                      #
#                                                                                          #
############################################################################################
#
#    $Revision: $
#    $Author: $
#    $Date: $
#
############################################################################################

############################################################################################
[Extras]
   
# Your Google Analytics id, comment out if you do not have one
   
#googleAnalyticsId=yourid
   
# The name to use as value for the publisher element in the RSS feed
   
#rssPublisherName=your name

   
# Display Google Map showing where your station is. Comment out this if you do not want the map to appear
    googleMapsDisplay
=true

   
# If you want to include links to the closes city / village. Look at geonames.org to find the closest, and its' id
   
# Comment out all of these if you do not want it to appear
   
[[Geonames]]
        geonames_url
=http://www.geonames.org
        closest_city_village_name
=Juelich
        closest_city_village_id
=2871753

############################################################################################

[Units]

   
#
   
# This section is for managing the selection and formatting of units.
   
#
   
   
[[Groups]]
       
#
       
# For each group of measurements, this section sets what units to use for it.
       
# NB: The unit is always in the singular. I.e., 'mile_per_hour', NOT 'miles_per_hour'
       
#
        group_altitude    
= meter                 # Options are 'foot' or 'meter'
        group_direction    
= degree_compass
        group_moisture    
= centibar
        group_percent      
= percent
        group_pressure    
= mbar                # Options are 'inHg', 'mbar', or 'hPa'
        group_radiation    
= watt_per_meter_squared
        group_rain        
= mm                 # Options are 'inch', 'cm', or 'mm'
        group_rainrate    
= mm_per_hour        # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
        group_speed        
= km_per_hour        # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
        group_speed2      
= meter_per_second2       # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
        group_temperature  
= degree_C             # Options are 'degree_F' or 'degree_C'
        group_volt        
= volt

   
[[StringFormats]]
       
#
       
# This section sets the string formatting for each type of unit.
       
#
        centibar          
= %.0f
        cm                
= %.2f
        cm_per_hour        
= %.2f
        degree_C          
= %.1f
        degree_compass    
= %.0f
        degree_F          
= %.1f
        foot              
= %.0f
        hPa                
= %.1f
        inHg              
= %.3f
        inch              
= %.2f
        inch_per_hour      
= %.2f
        km_per_hour        
= %.0f
        km_per_hour2      
= %.1f
        knot              
= %.0f
        knot2              
= %.1f
        mbar              
= %.0f
        meter              
= %.0f
        meter_per_second  
= %.0f
        meter_per_second2  
= %.1f
        mile_per_hour      
= %.0f
        mile_per_hour2    
= %.1f
        mm                
= %.1f
        mm_per_hour        
= %.1f
        percent            
= %.0f
        volt              
= %.1f
        watt_per_meter_squared
= %.0f

   
[[Labels]]
       
#
       
# This section sets a label to be used for each type of unit.
       
#
        centibar          
= " cb"
        cm                
= " cm"
        cm_per_hour      
= " cm/hr"
        degree_C          
=   °C
        degree_compass    
=   °
        degree_F          
=   °F
        foot              
= " feet"
        hPa              
= " hPa"
        inHg              
= " inHg"
        inch              
= " in"
        inch_per_hour    
= " in/hr"
        km_per_hour      
= " kph"
        km_per_hour2      
= " kph"
        knot              
= " knots"
        knot2            
= " knots"
        mbar              
= " mbar"
        meter            
= " meters"
        meter_per_second  
= " m/s"
        meter_per_second2
= " m/s"
        mile_per_hour    
= " mph"
        mile_per_hour2    
= " mph"
        mm                
= " mm"
        mm_per_hour      
= " mm/hr"
        percent          
=   %
        volt              
= " V"
        watt_per_meter_squared
= " W/m²"

   
[[TimeFormats]]
       
#
       
# This section sets the string format to be used
       
# each time scale.
       
#
        day      
= %H:%M
        week    
= %H:%M on %A
        month    
= %d-%b-%Y %H:%M
        year    
= %d-%b-%Y %H:%M
        rainyear
= %d-%b-%Y %H:%M
        current  
= %d-%b-%Y %H:%M

   
[[DegreeDays]]
       
#
       
# This section sets the base temperatures used for the calculation
       
# of heating and cooling degree-days.
       
#
       
       
# Base temperature for heating days, with unit:
        heating_base
= 65, degree_F
       
# Base temperature for cooling days, with unit:
        cooling_base
= 65, degree_F
       
############################################################################################

[Labels]
   
   
#
   
# Generic labels
   
#
   
   
# Set to hemisphere abbreviations suitable for your location:
    hemispheres
= N, S, E, W

   
[[Generic]]
       
#
       
# Generic labels, keyed by an observation type.
       
#
        inTemp      
= Inside Temperature
        outTemp    
= Outside Temperature
        inHumidity  
= Inside Humidity
        outHumidity
= Outside Humidity
        windSpeed  
= Wind Speed
        windDir    
= Wind Direction
        windGust    
= Gust Speed
        windGustDir
= Gust Direction
        windvec    
= Wind Vector
        windgustvec
= Gust Vector
        rainRate    
= Rain Rate
        rain        
= Rain
        dewpoint    
= Dew Point
        windchill  
= Wind Chill
        heatindex  
= Heat Index
       
#radiation   = Radiation
       
#extraTemp1  = Pond Temperature
   
############################################################################################

[Almanac]
   
   
# The labels to be used for the phases of the moon:
    moon_phases
= New, Waxing crescent, First quarter, Waxing gibbous, Full, Waning gibbous, Last quarter, Waning crescent

############################################################################################

[FileGenerator]

   
#
   
# This section is used by the generator FileGenerator, and specifies which
   
# files are to be generated from which template.
   
#

    encoding
= html_entities    # Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'

 
[[SummaryByMonth]]
       
# Reports that summarize "by month"
       
[[[NOAA_month]]]
            encoding
= strict_ascii
           
template = NOAA/NOAA-YYYY-MM.txt.tmpl

   
[[SummaryByYear]]
       
# Reports that summarize "by year"
       
[[[NOAA_year]]]
            encoding
= strict_ascii
           
template = NOAA/NOAA-YYYY.txt.tmpl
       
   
[[ToDate]]
       
#
       
# Reports that show statistics "to date", such as day-to-date,
       
# week-to-date, month-to-date, etc.
       
#
       
[[[day]]]
           
template = index.html.tmpl

       
[[[dayrss]]]
           
template = rss.xml.tmpl
       
       
[[[week]]]
           
template = week.html.tmpl
       
       
[[[month]]]
           
template = month.html.tmpl
       
       
[[[year]]]
           
template = year.html.tmpl

   
[[[XML]]]
       
template = xml/weewx_pws.xml.tmpl
           
############################################################################################

[CopyGenerator]
   
   
#
   
# This section is used by the generator CopyGenerator
   
#

   
# List of files that are to be copied at the first invocation of the generator only
    copy_once
= javascript/fancybox/*, javascript/jquery/*, alf_normal.css
   
    # List of files to be copied every time:
    # copy_always =
       

############################################################################################

[ImageGenerator]
   
    #
    # This section lists all the images to be generated, what SQL types are to
    # be included in them, along with many plotting options, such as color or
    # font. There's a default for almost everything, if not specified
    # below. Nevertheless, I've explicitly put in values, to make it easy to see
    # and understand the options.
    #
    # Fonts can be anything accepted by the Python Imaging Library (PIL), which
    # is currently truetype (.ttf), or PIL's own font format (.pil). See
    # http://www.pythonware.com/library/pil/handbook/imagefont.htm for more
    # details.  Note that "font size" is only used with truetype (.ttf)
    # fonts. For others, font size is determined by the bit-mapped size, usually
    # encoded in the file name (e.g., courB010.pil). If a font can't be found,
    # then a default font will be used.
    #
   
    image_width = 300
    image_height = 180
    image_background_color = 0xf5f5f5
   
    chart_background_color = 0xd8d8d8
    chart_gridline_color = 0xa0a0a0
   
    top_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
    top_label_font_size = 10
   
    unit_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
    unit_label_font_size = 10
    unit_label_font_color = 0x000000
   
    bottom_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
    bottom_label_font_size = 12
    bottom_label_font_color = 0x000000
   
    axis_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
    axis_label_font_size = 10
    axis_label_font_color = 0x000000
   
    # Options for the compass rose, used for progressive vector plots
    rose_label = N
    rose_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
    rose_label_font_size  = 10
    rose_label_font_color = 0x000000
   
   
    # Default colors for the plot lines. These can be overridden for
    # individual lines using option 'color'
    chart_line_colors = 0xb48242, 0x4242b4, 0x42b442
   
    ##
    ## What follows is a list of subsections, each specifying a time span, such
    ## as a day, week, month, or year. There's nothing special about them or
    ## their names: it's just a convenient way to group plots with a time span
    ## in common. You could add a time span [[biweek_images]] and add the
    ## appropriate time length, aggregation strategy, etc., without changing any
    ## code.
    ##
    ## Within each time span, each sub-subsection is the name of a plot to be
    ## generated for that time span. The generated plot will be stored using
    ## that name, in whatever directory was specified by option 'HTML_ROOT'
    ## in weewx.conf.
    ##
    ## With one final nesting (four brackets!) is the sql type of each line to
    ## be included within that plot.
    ##
    ## Unless overridden, leaf nodes inherit options from their parent
    ##
   
    # Default plot and aggregation. Can get overridden at any level.
    plot_type = line
    aggregate_type = none
    width = 1
    time_length = 86400    # == 24 hours

    # This defines what fraction of the difference between maximum and minimum
    # horizontal chart bounds is considered a gap in the samples and should not
    # be plotted.
    line_gap_fraction = 0.9
    bar_gap_fraction  = 0.9


    # The following option merits an explanation. The y-axis scale used for plotting
    # can be controlled using option 'yscale'. It is a 3-way tuple, with
    # values (ylow, yhigh, min_interval). If set to "None", a parameter is
    # set automatically, otherwise the value is used. However, in the case of
    # min_interval, what is set is the *minimum* y-axis tick interval.
    yscale = None, None, 0.02

    # For progressive vector plots, you can choose to rotate the vectors.
    # Positive is clockwise.
    # For my area, westerlies overwhelmingly predominate, so by rotating
    # positive 90 degrees, the average vector will point straight up.
    vector_rotate = 90

    [[day_images]]
        x_label_format = %H:%M
        bottom_label_format = %m/%d/%y %H:%M
        time_length = 86400    # == 24 hours
       
        [[[daybarometer]]]
            [[[[barometer]]]]

        [[[daybarometer_highres]]]
            image_width = 1060
            image_height = 640
            [[[[barometer]]]]
       
        [[[daytempdew]]]
     line_gap_fraction = 0.1

            [[[[outTemp]]]]
            [[[[dewpoint]]]]

        [[[daytempdew_highres]]]
            image_width = 1060
            image_height = 640
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
       

       
        [[[daytempchill]]]
            [[[[windchill]]]]
            [[[[heatindex]]]]

        [[[daytempchill_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windchill]]]]
            [[[[heatindex]]]]
       
        [[[dayrain]]]
            # Make sure the y-axis increment is at least 0.02 for the rain plot:
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                aggregate_interval = 3600
                label = Rain (hourly avg)
               
        [[[dayrain_highres]]]
            image_width = 1060
            image_height = 640
            # Make sure the y-axis increment is at least 0.02 for the rain plot:
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                aggregate_interval = 3600
                label = Rain (hourly avg)
       
       
       [[[daywind]]]
            [[[[windSpeed]]]]
            [[[[windGust]]]]

        [[[daywind_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windSpeed]]]]
            [[[[windGust]]]]
       
        [[[dayinside]]]
       yscale = 12.0, 28.0, 1
            [[[[inTemp]]]]

        [[[dayinside_highres]]]
    yscale = 12.0, 28.0, 1
            image_width = 1060
            image_height = 640
            [[[[inTemp]]]]
       
        [[[daywinddir]]]
            # Hardwire in the y-axis scale for wind direction:
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]

        [[[daywinddir_highres]]]
            image_width = 1060
            image_height = 640
            # Hardwire in the y-axis scale for wind direction:
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]
   
        [[[daywindvec]]]
            [[[[windvec]]]]
                plot_type = vector

        [[[daywindvec_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windvec]]]]
                plot_type = vector

    [[[dayinHumidity]]]
        [[[[inHumidity]]]]
       
    [[[dayinHumidity_highres]]]
        image_width = 1060
            image_height = 640
            [[[[inHumidity]]]]

        [[[dayoutHumidity]]]
            [[[[outHumidity]]]]

        [[[dayoutHumidity_highres]]]
            image_width = 1060
            image_height = 640
            [[[[outHumidity]]]]

    [[week_images]]
        x_label_format = %d
        bottom_label_format = %m/%d/%y %H:%M
        time_length = 604800    # == 7 days
        aggregate_type = avg
        aggregate_interval = 3600
       
        [[[weekbarometer]]]
            [[[[barometer]]]]
       
        [[[weekbarometer_highres]]]
            image_width = 1060
            image_height = 640
            [[[[barometer]]]]

        [[[weektempdew]]]
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
       
        [[[weektempdew_highres]]]
            image_width = 1060
            image_height = 640
            [[[[outTemp]]]]
            [[[[dewpoint]]]]

        [[[weektempchill]]]
            [[[[windchill]]]]
            [[[[heatindex]]]]
       
        [[[weektempchill_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windchill]]]]
            [[[[heatindex]]]]

        [[[weekrain]]]
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                aggregate_interval = 86400
                label = Rain (daily avg)

        [[[weekrain_highres]]]
            image_width = 1060
            image_height = 640
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                aggregate_interval = 86400
                label = Rain (daily avg)
       
        [[[weekwind]]]
            [[[[windSpeed]]]]
            [[[[windGust]]]]
                aggregate_type = max
       
        [[[weekwind_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windSpeed]]]]
            [[[[windGust]]]]
                aggregate_type = max

        [[[weekinside]]]
            [[[[inTemp]]]]

        [[[weekinside_highres]]]
            image_width = 1060
            image_height = 640
            [[[[inTemp]]]]
       
        [[[weekwinddir]]]
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]

        [[[weekwinddir_highres]]]
            image_width = 1060
            image_height = 640
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]

#        [[[weekradiation]]]
#            [[[[radiation]]]]

#        [[[weekradiation_highres]]]
#            image_width = 1060
#            image_height = 640
#            [[[[radiation]]]]

#     [[[daycpu]]]
#        archive_database = computer_sqlite
#        [[[[cpu_user]]]]
#           [[[[cpu_idle]]]]
#          [[[[cpu_nice]]]]
#            [[[[cpu_system]]]]
#            [[[[cpu_iowait]]]]
#            [[[[cpu_irq]]]]
#            [[[[cpu_softirq]]]]#
##
#     [[[dayload]]]
#        archive_database = computer_sqlite yscale = 0, 1, 0.25
#        [[[[load1]]]]
#            [[[[load5]]]]
#            [[[[load15]]]]
#
#     [[[daydisk]]]
#        archive_database = computer_sqlite yscale = 0, None, None
#        [[[[disk_root_total]]]]
#        [[[[disk_root_used]]]]

#     [[[daymem]]]
#        archive_database = computer_sqlite yscale = 0, None, None
#        [[[[mem_total]]]]
#        [[[[mem_used]]]]

#     [[[daynet]]]
#        archive_database = computer_sqlite
#        [[[[net_eth0_rbytes]]]]
#        [[[[net_eth0_tbytes]]]]

    [[month_images]]
        x_label_format = %d
        bottom_label_format = %m/%d/%y %H:%M
        time_length = 2592000    # == 30 days
        aggregate_type = avg
        aggregate_interval = 10800    # == 3 hours
       
        [[[monthbarometer]]]
            [[[[barometer]]]]
       
        [[[monthbarometer_highres]]]
            image_width = 1060
            image_height = 640
            [[[[barometer]]]]
       
        [[[monthtempdew]]]
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
       
        [[[monthtempdew_highres]]]
            image_width = 1060
            image_height = 640
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
       
        [[[monthtempchill]]]
            [[[[windchill]]]]
            [[[[heatindex]]]]
       
        [[[monthtempchill_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windchill]]]]
            [[[[heatindex]]]]
       
        [[[monthrain]]]
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                aggregate_interval = 86400
                label = Rain (daily avg)
       
        [[[monthrain_highres]]]
            image_width = 1060
            image_height = 640
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                aggregate_interval = 86400
                label = Rain (daily avg)
       
        [[[monthwind]]]
            [[[[windSpeed]]]]
            [[[[windGust]]]]
                aggregate_type = max
       
        [[[monthwind_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windSpeed]]]]
            [[[[windGust]]]]
                aggregate_type = max
       
        [[[monthinside]]]
            [[[[inTemp]]]]
       
        [[[monthinside_highres]]]
            image_width = 1060
            image_height = 640
            [[[[inTemp]]]]
       
        [[[monthwinddir]]]
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]
   
        [[[monthwinddir_highres]]]
            image_width = 1060
            image_height = 640
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]
   
#        [[[monthradiation]]]
#            [[[[radiation]]]]

#        [[[monthradiation_highres]]]
#            image_width = 1060
#            image_height = 640
#            [[[[radiation]]]]

    [[year_images]]
        x_label_format = %m/%d
        bottom_label_format = %m/%d/%y
        time_length = 31536000    # == 365 days
        aggregate_type = avg
        aggregate_interval = 86400
       
        [[[yearbarometer]]]
            [[[[barometer]]]]
       
        [[[yearbarometer_highres]]]
            image_width = 1060
            image_height = 640
            [[[[barometer]]]]
       
        [[[yeartempdew]]]
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
       
        [[[yeartempdew_highres]]]
            image_width = 1060
            image_height = 640
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
       
        [[[yearwind]]]
            [[[[windSpeed]]]]
            [[[[windGust]]]]
                aggregate_type = max
       
        [[[yearwind_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windSpeed]]]]
            [[[[windGust]]]]
                aggregate_type = max
       
        [[[yeartempchill]]]
            [[[[windchill]]]]
            [[[[heatindex]]]]
       
        [[[yeartempchill_highres]]]
            image_width = 1060
            image_height = 640
            [[[[windchill]]]]
            [[[[heatindex]]]]
       
        [[[yearrain]]]
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                #           aggregate_interval = 2629800 # Magic number: the length of a nominal month
                aggregate_interval = 604800    # == 1 week
                label = Rain (weekly avg)
       
        [[[yearrain_highres]]]
            image_width = 1060
            image_height = 640
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                #           aggregate_interval = 2629800 # Magic number: the length of a nominal month
                aggregate_interval = 604800    # == 1 week
                label = Rain (weekly avg)
       
        [[[yearinside]]]
            [[[[inTemp]]]]
       
        [[[yearinside_highres]]]
            image_width = 1060
            image_height = 640
            [[[[inTemp]]]]
       
        [[[yearwinddir]]]
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]

        [[[yearwinddir_highres]]]
            image_width = 1060
            image_height = 640
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]

#        [[[yearradiation]]]
#            [[[[radiation]]]]

#        [[[yearradiation_highres]]]
#            image_width = 1060
#            image_height = 640
#            [[[[radiation]]]]

        # A progressive vector plot of daily gust vectors overlayed
        # with the daily wind average would look something like this:
#        [[[yeargustvec]]]
#            [[[[windvec]]]]
#                plot_type = vector
#                aggregate_type = avg
#            [[[[windgustvec]]]]
#                plot_type = vector
#                aggregate_type = max


############################################################################################

#
# The list of generators that are to be run:
#
[Generators]
    generator_list = weewx.filegenerator.FileGenerator, weewx.imagegenerator.ImageGenerator, weewx.reportengine.CopyGenerator




 

mwall

unread,
Jan 15, 2014, 4:57:14 PM1/15/14
to weewx...@googlegroups.com
On Wednesday, January 15, 2014 4:24:27 PM UTC-5, Florian B wrote:
Well, I made the changes you mentioned above. It wasn't commented when I tried that. I commented it now because I want to have the data archieved and running.

Here is my skin.conf: (The sections are commented too. Only to leave all running)

F

##
#     [[[dayload]]]
#        archive_database = computer_sqlite yscale = 0, 1, 0.25
#        [[[[load1]]]]
#            [[[[load5]]]]
#            [[[[load15]]]]
#
#     [[[daydisk]]]
#        archive_database = computer_sqlite yscale = 0, None, None
#        [[[[disk_root_total]]]]
#        [[[[disk_root_used]]]]

#     [[[daymem]]]
#        archive_database = computer_sqlite yscale = 0, None, None
#        [[[[mem_total]]]]
#        [[[[mem_used]]]]


these lines are the problem. it should be:

archive_database = computer_sqlite

then put the yscale on a separate line.

by the way, you should put the day* definitions in the day section, then create analogous week and month sections for the week and month sections.

m

Florian B

unread,
Jan 16, 2014, 8:01:38 AM1/16/14
to weewx...@googlegroups.com
Tried that now and the following appears:

Jan 16 13:58:47 raspberrypi weewx[2704]: reportengine: Caught unrecoverable exception                                                                                            in generator weewx.imagegenerator.ImageGenerator
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****  no such column: net_eth0_rbytes
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****  Traceback (most recent call las                                                                                           t):
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****    File "/usr/share/weewx/weewx/                                                                                           reportengine.py", line 131, in run
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****      obj.start()
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****    File "/usr/share/weewx/weewx/                                                                                           reportengine.py", line 294, in start
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****      self.run()
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****    File "/usr/share/weewx/weewx/                                                                                           imagegenerator.py", line 38, in run
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****      self.genImages(self.gen_ts)
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****    File "/usr/share/weewx/weewx/                                                                                           imagegenerator.py", line 202, in genImages
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****      aggregate_interval, aggrega                                                                                           te_type)
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****    File "/usr/share/weewx/weewx/                                                                                           archive.py", line 409, in getSqlVectorsExtended
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****      return self.getSqlVectors(e                                                                                           xt_type, startstamp, stopstamp, aggregate_interval, aggregate_type)
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****    File "/usr/share/weewx/weewx/                                                                                           archive.py", line 334, in getSqlVectors
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****      _cursor.execute(sql_str, st                                                                                           amp)
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****    File "/usr/share/weewx/weedb/                                                                                           sqlite.py", line 120, in execute
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****      raise weedb.OperationalErro                                                                                           r(e)
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****  OperationalError: no such colum                                                                                           n: net_eth0_rbytes
Jan 16 13:58:47 raspberrypi weewx[2704]:         ****  Generator terminated...


Florian

Florian B

unread,
Jan 16, 2014, 8:15:40 AM1/16/14
to weewx...@googlegroups.com
I changed the eth1 to eth0 back in cmon.py because I saw that my network is eth0.

root@raspberrypi:~# ifconfig
eth0      
Link encap:Ethernet  Hardware Adresse b8:27:eb:4e:3b:d8
          inet
Adresse:192.168.178.77  Bcast:192.168.178.255  Maske:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU
:1500  Metrik:1
          RX packets
:59208 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:31447 errors:0 dropped:0 overruns:0 carrier:0
         
Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes
:4632359 (4.4 MiB)  TX bytes:10214955 (9.7 MiB)

lo        
Link encap:Lokale Schleife
          inet
Adresse:127.0.0.1  Maske:255.0.0.0
          UP LOOPBACK RUNNING  MTU
:65536  Metrik:1
          RX packets
:163 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:163 errors:0 dropped:0 overruns:0 carrier:0
         
Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes
:30768 (30.0 KiB)  TX bytes:30768 (30.0 KiB)


Now the following error appears again:

Jan 16 14:14:59 raspberrypi weewx[3884]: wxengine: Caught unrecoverable exception in wxengine:
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****  schema mismatch: ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth1_rbytes', 'net_eth1_rpackets', 'net_eth1_rerrs', 'net_eth1_rdrop', 'net_eth1_tbytes', 'net_eth1_tpackets', 'net_eth1_terrs', 'net_eth1_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used'] != ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth0_rbytes', 'net_eth0_rpackets', 'net_eth0_rerrs', 'net_eth0_rdrop', 'net_eth0_tbytes', 'net_eth0_tpackets', 'net_eth0_terrs', 'net_eth0_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used']
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****  Traceback (most recent call last):
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 892, in main
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****      engine = EngineClass(config_dict)
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 70, in __init__
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****      self.loadServices(config_dict)
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 124, in loadServices
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****      self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****    File "/usr/share/weewx/user/cmon.py", line 191, in __init__
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****      raise Exception('schema mismatch: %s != %s' % (dbcol, memcol))
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****  Exception: schema mismatch: ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth1_rbytes', 'net_eth1_rpackets', 'net_eth1_rerrs', 'net_eth1_rdrop', 'net_eth1_tbytes', 'net_eth1_tpackets', 'net_eth1_terrs', 'net_eth1_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used'] != ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth0_rbytes', 'net_eth0_rpackets', 'net_eth0_rerrs', 'net_eth0_rdrop', 'net_eth0_tbytes', 'net_eth0_tpackets', 'net_eth0_terrs', 'net_eth0_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used']
Jan 16 14:14:59 raspberrypi weewx[3884]:     ****  Exiting.


Florian

David Gardner

unread,
Jan 16, 2014, 8:18:02 AM1/16/14
to weewx...@googlegroups.com
> Jan 16 13:58:47 raspberrypi weewx[2704]:         ****  OperationalError: no such
> colum    n
: net_eth0_rbytes

Looks like your database schema doesn't match the data you're trying to graph from.
(Or you're trying to read the wrong database).

Is that column in your database?
You can check with:

$ sqlite3
weewx.sdb
sqlite> .headers on
sqlite> select * from archive order dateTime desc limit 1;

That'll show you the last line of the DB with headings displayed.

David.


--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

mwall

unread,
Jan 16, 2014, 8:23:26 AM1/16/14
to weewx...@googlegroups.com
On Thursday, January 16, 2014 8:15:40 AM UTC-5, Florian B wrote:
I changed the eth1 to eth0 back in cmon.py because I saw that my network is eth0.

florian,

david's reply is spot on.  the easiest way to fix it is to stop weewx, delete the computer.sdb file (or move it aside if it contains data you want to keep), then start weewx.

btw, the sqlite command to display table schema is simply '.schema'

finally, if anyone has suggestions for how to define a schema that is more flexible, please chime in!

m
 

Florian B

unread,
Jan 16, 2014, 8:24:38 AM1/16/14
to weewx...@googlegroups.com
Thanks for your help.

But I can't get this to work:
$ sqlite3 weewx.sdb

Florian

mwall

unread,
Jan 16, 2014, 8:28:27 AM1/16/14
to weewx...@googlegroups.com

1) the data from cmon go into computer.sdb, not weewx.sdb

sqlite3 /var/lib/weewx/computer.sdb
sqlite3> .schema
 
2) the network interface in cmon.py must match your real network interface.  if your interface is eth1, then modify cmon.py so that it uses eth1 instead of eth0.

3) the columns in cmon.py must match the columns in the actual database.  if there is a mismatch, the quickest way to fix it is to delete or move aside computer.sdb and let weewx generate a new database.

m

Florian B

unread,
Jan 16, 2014, 8:35:50 AM1/16/14
to weewx...@googlegroups.com

ad1) OK. Thats right. Do I have to do anything for that?

ad2) Modified to eth1.

ad3) Done that. But there's no new computer.sdb and the error still exists.

Florian

mwall

unread,
Jan 16, 2014, 8:44:27 AM1/16/14
to weewx...@googlegroups.com
On Thursday, January 16, 2014 8:35:50 AM UTC-5, Florian B wrote:
Am Donnerstag, 16. Januar 2014 14:28:27 UTC+1 schrieb mwall:


On Thursday, January 16, 2014 8:24:38 AM UTC-5, Florian B wrote:
Thanks for your help.

But I can't get this to work:
$ sqlite3 weewx.sdb

Florian

1) the data from cmon go into computer.sdb, not weewx.sdb

sqlite3 /var/lib/weewx/computer.sdb
sqlite3> .schema
 
2) the network interface in cmon.py must match your real network interface.  if your interface is eth1, then modify cmon.py so that it uses eth1 instead of eth0.

3) the columns in cmon.py must match the columns in the actual database.  if there is a mismatch, the quickest way to fix it is to delete or move aside computer.sdb and let weewx generate a new database.

m

ad1) OK. Thats right. Do I have to do anything for that?

no.  .schema is simply a way for you to inspect the database schema.  the [Databases] section of weewx.conf specifies where the database is located, and the [ComputerMonitor] section associates 'computer_sqlite' with the actual computer.sdb database.
 
ad2) Modified to eth1.

ad3) Done that. But there's no new computer.sdb and the error still exists.

you must stop weewx, delete/move the computer.sdb file, then start weewx.

m

Florian B

unread,
Jan 16, 2014, 8:47:34 AM1/16/14
to weewx...@googlegroups.com

I stopped it. But there's no more computer.sdb file in archive. When I try to start weewx there's no computer.sdb created and the error mentioned abov (schema) appears again.

Florian

mwall

unread,
Jan 16, 2014, 8:57:25 AM1/16/14
to weewx...@googlegroups.com
On Thursday, January 16, 2014 8:47:34 AM UTC-5, Florian B wrote:
I stopped it. But there's no more computer.sdb file in archive. When I try to start weewx there's no computer.sdb created and the error mentioned abov (schema) appears again.


look in /var/lib/weewx

Florian B

unread,
Jan 16, 2014, 9:04:53 AM1/16/14
to weewx...@googlegroups.com

Great. That seems to work. Have a look here: www.wetternet.org Thanks a lot!

Now I have to solve the biggest problem. The gaps.

Florian

Florian B

unread,
Jan 16, 2014, 9:20:55 AM1/16/14
to weewx...@googlegroups.com


One short thing to this topic. Do you have an idea why the chart looks so ugly? How can I get rid of that?

Florian

mwall

unread,
Jan 16, 2014, 9:24:43 AM1/16/14
to weewx...@googlegroups.com
On Thursday, January 16, 2014 9:20:55 AM UTC-5, Florian B wrote:
One short thing to this topic. Do you have an idea why the chart looks so ugly? How can I get rid of that?

close your eyes? ;)

you might want to start a new thread about graphs and plotting.

m

Florian B

unread,
Jan 16, 2014, 9:45:12 AM1/16/14
to weewx...@googlegroups.com

;-)

You're right. Thaught it was only one short thing.

Thanks for helping me out.

Regards

Florian

vigilancewx

unread,
Sep 1, 2014, 4:23:49 AM9/1/14
to weewx...@googlegroups.com
Hi

I a having similar problems that Derek Sedunary had

I am using weewx-2.5.0, William Phelps CPU monitor and your Forecast service


I followed the instructions in the wiki  restart weewx and I get the following error


ep  1 06:25:55 raspberrypi weewx[2419]: restful: Skipped record 2014-09-01 06:25:00 BST (1409549100) to StationRegistry station http://spitalwx.no-ip.org/weewx/
Sep  1 06:25:55 raspberrypi weewx[2419]:    ****  Registration interval (604800) has not passed.
Sep  1 06:25:55 raspberrypi weewx[2419]: vantage: successfully woke up console
Sep  1 06:25:55 raspberrypi weewx[2419]: wxengine: Caught unrecoverable exception in wxengine:
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****  'ComputerMonitor' object has no attribute 'max_age'
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****  Traceback (most recent call last):
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 889, in main
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****      engine.run()
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 142, in run
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 192, in dispatchEvent
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****      callback(event)
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 447, in startup
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****      self._catchup()
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 564, in _catchup
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****      self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, record=record, origin='hardware'))
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****    File "/home/weewx/bin/weewx/wxengine.py", line 192, in dispatchEvent
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****      callback(event)
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****    File "/home/weewx/bin/user/cmon.py", line 323, in newArchiveRecordCallback
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****      if self.max_age is not None:
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****  AttributeError: 'ComputerMonitor' object has no attribute 'max_age'
Sep  1 06:25:55 raspberrypi weewx[2419]:     ****  Exiting.


I have tried as Derek did by hashing out the line in weewx.conf
max_age = 2592000 # 30 days

 But no luck

any ideas

 thanks





On Wednesday, October 23, 2013 4:09:58 AM UTC+1, mwall wrote:
folks,

here is another weewx service to track cpu load, memory use, disk use, and network traffic.

https://sourceforge.net/p/weewx/wiki/monitor/

william phelps already wrote one of these as described in this thread:

https://groups.google.com/forum/#!topic/weewx-user/sk7kenddddQ

however, this service is a bit more generic - it should work on any linux with kernel 2.2 or later (not just the raspberry pi), and it saves data to a separate database instead of extending the weewx archive schema.

m
Reply all
Reply to author
Forward
0 new messages