High CPU usage with Mysql and GW100 driver

244 views
Skip to first unread message

carlo74

unread,
Jan 25, 2022, 6:04:35 AM1/25/22
to weewx-user
All server software update to the last version:
mysqld 8.0.27
weewx 4.5.1
GW1000 0.4.1

I have a high CPU usage all the day at 50/60/70% of CPU. Why?

htop.jpg

cockpit.jpg

and on syslog, sometimes:

pcp-pmie[1855]: High aggregate context switch rate 10453ctxsw/s@server

Today, after this message on syslog, my server crash and stop working:

pcp-pmie[1749]: High aggregate context switch rate 9416ctxsw/s@server
pcp-pmie[1749]: High average processor utilization 97%util@server
pcp-pmie[1749]: High per CPU processor utilization 97%util[cpu0]@server 97%util[cpu1]@server

Can you help me?
Thanks
Carlo

Tom Keffer

unread,
Jan 25, 2022, 7:45:53 AM1/25/22
to weewx-user
Hard to say without some more details. At the bare minimum it would be helpful to know which skin are you using, what is the archive interval, and what kind of processor.

Even better would be to include more of the log. Set debug=1 in weewx.conf, restart weewx, let it run through a reporting cycle, then include the log.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f12c97d9-8a49-424d-b37e-4a71add9d636n%40googlegroups.com.

carlo74

unread,
Jan 25, 2022, 5:28:54 PM1/25/22
to weewx-user
I'm use Belchertown skin with archive_interval = 300 and the CPU is an "AMD Athlon(tm) 64 X2 Dual Core Processor 5000+" with 4GB of RAM in a Ubuntu server 20.04.
I attach the weewx.conf and an extract of syslog:

Today when I started weewx.service

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

Jan 25 10:13:35 ubuntu-server-one weewx[13400]:  * Starting weewx weather system weewx
Jan 25 10:13:35 ubuntu-server-one weewx[13421] INFO __main__: Initializing weewx version 4.5.1
Jan 25 10:13:35 ubuntu-server-one weewx[13421] INFO __main__: Using Python 3.8.10 (default, Nov 26 2021, 20:14:08) #012[GCC 9.3.0]
Jan 25 10:13:35 ubuntu-server-one weewx[13421] INFO __main__: Platform Linux-5.4.0-96-generic-x86_64-with-glibc2.29
Jan 25 10:13:35 ubuntu-server-one weewx[13421] INFO __main__: Locale is 'it_IT.UTF-8'
Jan 25 10:13:35 ubuntu-server-one weewx[13421] INFO __main__: PID file is /var/run/weewx.pid
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO __main__: Debug is 1
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG __main__: Initializing engine
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO weewx.engine: Loading station type GW1000 (user.gw1000)
Jan 25 10:13:35 ubuntu-server-one weewx[13400]:    ...done.
Jan 25 10:13:35 ubuntu-server-one systemd[1]: Started LSB: weewx weather system.
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.gw1000: field map is {'co2': 'co2', 'co2_24h_avg': 'co2_24h_avg', 'dateTime': 'datetime', 'daymaxwind': 'daymaxwind', 'dayRain': 'rainday', 'dewpoint': 'dewpoint', 'extraHumid1': 'humid1', 'extraHumid2': 'humid2', 'extraHumid3': 'humid3', 'extraHumid4': 'humid4', 'extraHumid5': 'humid5', 'extraHumid6': 'humid6', 'extraHumid7': 'humid7', 'extraHumid8': 'humid8', 'extraHumid17': 'humid17', 'extraTemp1': 'temp1', 'extraTemp2': 'temp2', 'extraTemp3': 'temp3', 'extraTemp4': 'temp4', 'extraTemp5': 'temp5', 'extraTemp6': 'temp6', 'extraTemp7': 'temp7', 'extraTemp8': 'temp8', 'extraTemp9': 'temp9', 'extraTemp10': 'temp10', 'extraTemp11': 'temp11', 'extraTemp12': 'temp12', 'extraTemp13': 'temp13', 'extraTemp14': 'temp14', 'extraTemp15': 'temp15', 'extraTemp16': 'temp16', 'extraTemp17': 'temp17', 'heatindex': 'heatindex', 'hourRain': 'rainhour', 'inHumidity': 'inhumid', 'inTemp': 'intemp', 'leafWet1': 'leafwet1', 'leafWet2': 'leafwet2', 'leafWet3': 'leafwet3', 'leafWet4': 'leafwet4', 'leafWet5': 'leafwet5', 'leafWet6': 'leafwet6', 'leafWet7': 'leafwet7', 'leafWet8': 'leafwet8', 'leak1': 'leak1', 'leak2': 'leak2', 'leak3': 'leak3', 'leak4': 'leak4', 'lightning_distance': 'lightningdist', 'lightning_last_det_time': 'lightningdettime', 'lightning_strike_count': 'lightning_strike_count', 'lightningcount': 'lightningcount', 'luminosity': 'light', 'monthRain': 'rainmonth', 'outHumidity': 'outhumid', 'outTemp': 'outtemp', 'pm2_5': 'pm251', 'pm2_51_24h_avg': 'pm251_24h_avg', 'pm2_52': 'pm252', 'pm2_52_24h_avg': 'pm252_24h_avg', 'pm2_53': 'pm253', 'pm2_53_24h_avg': 'pm253_24h_avg', 'pm2_54': 'pm254', 'pm2_54_24h_avg': 'pm254_24h_avg', 'pm2_55': 'pm255', 'pm2_55_24h_avg': 'pm255_24h_avg', 'pm10': 'pm10', 'pm10_24h_avg': 'pm10_24h_avg', 'pressure': 'absbarometer', 'rain': 'rain', 'rainRate': 'rainrate', 'relbarometer': 'relbarometer', 'soilMoist1': 'soilmoist1', 'soilMoist2': 'soilmoist2', 'soilMoist3': 'soilmoist3', 'soilMoist4': 'soilmoist4', 'soilMoist5': 'soilmoist5', 'soilMoist6': 'soilmoist6', 'soilMoist7': 'soilmoist7', 'soilMoist8': 'soilmoist8', 'soilMoist9': 'soilmoist9', 'soilMoist10': 'soilmoist10', 'soilMoist11': 'soilmoist11', 'soilMoist12': 'soilmoist12', 'soilMoist13': 'soilmoist13', 'soilMoist14': 'soilmoist14', 'soilMoist15': 'soilmoist15', 'soilMoist16': 'soilmoist16', 'soilTemp1': 'soiltemp1', 'soilTemp2': 'soiltemp2', 'soilTemp3': 'soiltemp3', 'soilTemp4': 'soiltemp4', 'soilTemp5': 'soiltemp5', 'soilTemp6': 'soiltemp6', 'soilTemp7': 'soiltemp7', 'soilTemp8': 'soiltemp8', 'soilTemp9': 'soiltemp9', 'soilTemp10': 'soiltemp10', 'soilTemp11': 'soiltemp11', 'soilTemp12': 'soiltemp12', 'soilTemp13': 'soiltemp13', 'soilTemp14': 'soiltemp14', 'soilTemp15': 'soiltemp15', 'soilTemp16': 'soiltemp16', 'stormRain': 'rainevent', 'totalRain': 'raintotals', 'UV': 'uvi', 'uvradiation': 'uv', 'weekRain': 'rainweek', 'wh24_batt': 'wh24_batt', 'wh24_sig': 'wh24_sig', 'wh25_batt': 'wh25_batt', 'wh25_sig': 'wh25_sig', 'wh26_batt': 'wh26_batt', 'wh26_sig': 'wh26_sig', 'wh31_ch1_batt': 'wh31_ch1_batt', 'wh31_ch1_sig': 'wh31_ch1_sig', 'wh31_ch2_batt': 'wh31_ch2_batt', 'wh31_ch2_sig': 'wh31_ch2_sig', 'wh31_ch3_batt': 'wh31_ch3_batt', 'wh31_ch3_sig': 'wh31_ch3_sig', 'wh31_ch4_batt': 'wh31_ch4_batt', 'wh31_ch4_sig': 'wh31_ch4_sig', 'wh31_ch5_batt': 'wh31_ch5_batt', 'wh31_ch5_sig': 'wh31_ch5_sig', 'wh31_ch6_batt': 'wh31_ch6_batt', 'wh31_ch6_sig': 'wh31_ch6_sig', 'wh31_ch7_batt': 'wh31_ch7_batt', 'wh31_ch7_sig': 'wh31_ch7_sig', 'wh31_ch8_batt': 'wh31_ch8_batt', 'wh31_ch8_sig': 'wh31_ch8_sig', 'wh35_ch1_batt': 'wh35_ch1_batt', 'wh35_ch1_sig': 'wh35_ch1_sig', 'wh35_ch2_batt': 'wh35_ch2_batt', 'wh35_ch2_sig': 'wh35_ch2_sig', 'wh35_ch3_batt': 'wh35_ch3_batt', 'wh35_ch3_sig': 'wh35_ch3_sig', 'wh35_ch4_batt': 'wh35_ch4_batt', 'wh35_ch4_sig': 'wh35_ch4_sig', 'wh35_ch5_batt': 'wh35_ch5_batt', 'wh35_ch5_sig': 'wh35_ch5_sig', 'wh35_ch6_batt': 'wh35_ch6_batt', 'wh35_ch6_sig': 'wh35_ch6_sig', 'wh35_ch7_batt': 'wh35_ch7_batt', 'wh35_ch7_sig': 'wh35_ch7_sig', 'wh35_ch8_batt': 'wh35_ch8_batt', 'wh35_ch8_sig': 'wh35_ch8_sig', 'wh40_batt': 'wh40_batt', 'wh40_sig': 'wh40_sig', 'wh41_ch1_batt': 'wh41_ch1_batt', 'wh41_ch1_sig': 'wh41_ch1_sig', 'wh41_ch2_batt': 'wh41_ch2_batt', 'wh41_ch2_sig': 'wh41_ch2_sig', 'wh41_ch3_batt': 'wh41_ch3_batt', 'wh41_ch3_sig': 'wh41_ch3_sig', 'wh41_ch4_batt': 'wh41_ch4_batt', 'wh41_ch4_sig': 'wh41_ch4_sig', 'wh45_batt': 'wh45_batt', 'wh45_sig': 'wh45_sig', 'wh51_ch1_batt': 'wh51_ch1_batt', 'wh51_ch1_sig': 'wh51_ch1_sig', 'wh51_ch2_batt': 'wh51_ch2_batt', 'wh51_ch2_sig': 'wh51_ch2_sig', 'wh51_ch3_batt': 'wh51_ch3_batt', 'wh51_ch3_sig': 'wh51_ch3_sig', 'wh51_ch4_batt': 'wh51_ch4_batt', 'wh51_ch4_sig': 'wh51_ch4_sig', 'wh51_ch5_batt': 'wh51_ch5_batt', 'wh51_ch5_sig': 'wh51_ch5_sig', 'wh51_ch6_batt': 'wh51_ch6_batt', 'wh51_ch6_sig': 'wh51_ch6_sig', 'wh51_ch7_batt': 'wh51_ch7_batt', 'wh51_ch7_sig': 'wh51_ch7_sig', 'wh51_ch8_batt': 'wh51_ch8_batt', 'wh51_ch8_sig': 'wh51_ch8_sig', 'wh51_ch9_batt': 'wh51_ch9_batt', 'wh51_ch9_sig': 'wh51_ch9_sig', 'wh51_ch10_batt': 'wh51_ch10_batt', 'wh51_ch10_sig': 'wh51_ch10_sig', 'wh51_ch11_batt': 'wh51_ch11_batt', 'wh51_ch11_sig': 'wh51_ch11_sig', 'wh51_ch12_batt': 'wh51_ch12_batt', 'wh51_ch12_sig': 'wh51_ch12_sig', 'wh51_ch13_batt': 'wh51_ch13_batt', 'wh51_ch13_sig': 'wh51_ch13_sig', 'wh51_ch14_batt': 'wh51_ch14_batt', 'wh51_ch14_sig': 'wh51_ch14_sig', 'wh51_ch15_batt': 'wh51_ch15_batt', 'wh51_ch15_sig': 'wh51_ch15_sig', 'wh51_ch16_batt': 'wh51_ch16_batt', 'wh51_ch16_sig': 'wh51_ch16_sig', 'wh55_ch1_batt': 'wh55_ch1_batt', 'wh55_ch1_sig': 'wh55_ch1_sig', 'wh55_ch2_batt': 'wh55_ch2_batt', 'wh55_ch2_sig': 'wh55_ch2_sig', 'wh55_ch3_batt': 'wh55_ch3_batt', 'wh55_ch3_sig': 'wh55_ch3_sig', 'wh55_ch4_batt': 'wh55_ch4_batt', 'wh55_ch4_sig': 'wh55_ch4_sig', 'wh57_batt': 'wh57_batt', 'wh57_sig': 'wh57_sig', 'wh65_batt': 'wh65_batt', 'wh65_sig': 'wh65_sig', 'wh68_batt': 'wh68_batt', 'wh68_sig': 'wh68_sig', 'windchill': 'windchill', 'windDir': 'winddir', 'windGust': 'gustspeed', 'windSpeed': 'windspeed', 'ws80_batt': 'ws80_batt', 'ws80_sig': 'ws80_sig', 'yearRain': 'rainyear'}
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.gw1000: driver version is 0.4.1
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.gw1000: None address is 192.168.1.243:45000
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.gw1000: poll interval is 20 seconds
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.gw1000: max tries is 3, retry wait time is 10 seconds
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.gw1000: broadcast address is b'255.255.255.255':46000, broadcast timeout is 5 seconds
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.gw1000: socket timeout is 2 seconds
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service user.MQTTSubscribe.MQTTSubscribeService
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.gw1000: Next update in 20 seconds
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Using weewx version 4.5.1
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Using Python 3.8.10 (default, Nov 26 2021, 20:14:08) #012[GCC 9.3.0]
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Platform Linux-5.4.0-96-generic-x86_64-with-glibc2.29
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Locale is 'it_IT.UTF-8'
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Version is 1.6.2
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Log level: 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Log debug setting: 1
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Log console: False
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Log file: None
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) sanitized configuration removed ['password']
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) MQTTSUBscriber sanitized_service_dict is {'port': '1883', 'message_callback': {'type': 'json'}, 'binding': 'loop', 'host': 'localhost', 'topics': {'unit_system': 'METRIC', 'use_server_datetime': 'True', 'ignore_start_time': 'True', 'ignore_end_time': 'True', 'adjust_start_time': '1', 'adjust_end_time': '1', 'first/topic': {}, 'FIRST/REPLACE_ME': {}, 'SECOND/REPLACE_ME': {}}, 'enable': 'true', 'username': 'carlo', 'keepalive': '60'}
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) overlap is 0.0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) TopicManager self.subscribed_topics is {'first/topic': {'type': 'normal', 'unit_system': 16, 'msg_id_field': None, 'qos': 0, 'use_server_datetime': True, 'ignore_start_time': True, 'ignore_end_time': True, 'adjust_start_time': 1.0, 'adjust_end_time': 1.0, 'datetime_format': None, 'offset_format': None, 'ignore': False, 'max_queue': 9223372036854775807, 'queue': deque([]), 'fields': {}, 'ignore_msg_id_field': []}, 'FIRST/REPLACE_ME': {'type': 'normal', 'unit_system': 16, 'msg_id_field': None, 'qos': 0, 'use_server_datetime': True, 'ignore_start_time': True, 'ignore_end_time': True, 'adjust_start_time': 1.0, 'adjust_end_time': 1.0, 'datetime_format': None, 'offset_format': None, 'ignore': False, 'max_queue': 9223372036854775807, 'queue': deque([]), 'fields': {}, 'ignore_msg_id_field': []}, 'SECOND/REPLACE_ME': {'type': 'normal', 'unit_system': 16, 'msg_id_field': None, 'qos': 0, 'use_server_datetime': True, 'ignore_start_time': True, 'ignore_end_time': True, 'adjust_start_time': 1.0, 'adjust_end_time': 1.0, 'datetime_format': None, 'offset_format': None, 'ignore': False, 'max_queue': 9223372036854775807, 'queue': deque([]), 'fields': {}, 'ignore_msg_id_field': []}, '1643102015.697415-windGust-windGustDir-windDir-windSpeed': {'type': 'collector', 'unit_system': 16, 'qos': 0, 'use_server_datetime': True, 'ignore_start_time': True, 'ignore_end_time': True, 'adjust_start_time': 1.0, 'adjust_end_time': 1.0, 'datetime_format': None, 'offset_format': None, 'max_queue': 9223372036854775807, 'queue': deque([])}}
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) TopicManager self.cached_fields is {}
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) message_callback_provider_name is user.MQTTSubscribe.MessageCallbackProvider
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) clientid is MQTTSubscribe-5894
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) client_session is True
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) host is localhost
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) port is 1883
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) keepalive is 60
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) username is carlo
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) password is set
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Archive topic is None
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider self.fields is {}
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) binding is loop
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) archive_field_cache_dict is None
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Starting loop
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Connected with result code 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Connected flags {'session present': 0}
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Subscribing to first/topic has a mid 1 and rc 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Subscribing to FIRST/REPLACE_ME has a mid 2 and rc 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Subscribing to SECOND/REPLACE_ME has a mid 3 and rc 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) Subscribing to 1643102015.697415-windGust-windGustDir-windDir-windSpeed has a mid 4 and rc 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Subscribed to mid: 1 is size 1 has a QOS of 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Subscribed to mid: 2 is size 1 has a QOS of 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Subscribed to mid: 3 is size 1 has a QOS of 0
Jan 25 10:13:35 ubuntu-server-one weewx[13424] INFO user.MQTTSubscribe: (Service) Subscribed to mid: 4 is size 1 has a QOS of 0
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service user.MQTTSubscribe.MQTTSubscribeService
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service user.filepile.FilePile
Jan 25 10:13:36 ubuntu-server-one /weewxd: filepile: Using /var/tmp/filepile.txt with the 'METRIC' unit system
Jan 25 10:13:36 ubuntu-server-one /weewxd: filepile: Label map is {'pm2_5': 'pm2_5', 'pm10_0': 'pm10_0', 'extraTemp1': 'extraTemp1', 'extraHumid1': 'extraHumid1'}
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service user.filepile.FilePile
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.engine: StdConvert target unit is 0x1
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.manager: Daily summary version is 4.0
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdWXXTypes
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdWXXTypes
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdPressureCooker
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdPressureCooker
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdRainRater
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdRainRater
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdDelta
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdDelta
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.engine: Archive will use data binding wx_binding
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.engine: Record generation will be attempted in 'software'
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.engine: Using archive interval of 300 seconds (software record generation)
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.restx: StationRegistry: Registration not requested.
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.restx: WU essentials: {}
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.restx: Wunderground-PWS: Data for station //////////////////////////////////////////////// will be posted
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.restx: PWSWeather: Data for station ///////////////////////////////////////////// will be posted
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweather
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.restx: CWOP: Posting not enabled.
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.restx: WOW: Posting not enabled.
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.restx: AWEKAS: Posting not enabled.
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service user.mqtt.MQTT
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO user.mqtt: service version is 0.23
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO user.mqtt: binding to ['archive', 'loop']
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO user.mqtt: topic is weather
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO user.mqtt: desired unit system is METRIC
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO user.mqtt: data will be uploaded to/////////////////////////////////////////////////////
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service user.mqtt.MQTT
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO __main__: Starting up weewx version 4.5.1
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.engine: Station does not support reading the time
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx'
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.manager: Starting backfill of daily summaries
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.manager: Daily summaries up to date
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.engine: Starting main packet loop.
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO user.gw1000: Using 'rainyear' for rain total
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO user.gw1000: skipping rain measurement of 26.1: no last rain
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO user.gw1000: Skipping lightning count of 0: no last count
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2022-01-25 10:13:35 CET (1643102015): dateTime: 1643102015, daymaxwind: 4.1, dayRain: 0.0, inHumidity: 48, inTemp: 18.8, lightningcount: 0, lightning_distance: 24, lightning_last_det_time: 1641921509, lightning_strike_count: None, luminosity: 15221.0, monthRain: 26.1, outHumidity: 57, outTemp: 7.1, pressure: 1001.1, rain: None, rainRate: 0.0, relbarometer: 1031.1, stormRain: 0.0, usUnits: 17, UV: 1, uvradiation: 18.7, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh57_batt: 4, wh57_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 318, windGust: 1.0, windSpeed: 0.5, yearRain: 26.1
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.manager: Daily summary version is 4.0
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.wxxtypes: Type beaufort has been deprecated. Use unit beaufort instead.
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.manager: Daily summary version is 4.0
Jan 25 10:13:36 ubuntu-server-one weewx[13424] DEBUG weewx.manager: Daily summary version is 4.0
Jan 25 10:13:36 ubuntu-server-one weewx[13424] INFO weewx.restx: MQTT: Published record 2022-01-25 10:13:35 CET (1643102015)
Jan 25 10:13:55 ubuntu-server-one weewx[13424] DEBUG user.gw1000: Next update in 20 seconds
Jan 25 10:13:55 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2022-01-25 10:13:55 CET (1643102035): dateTime: 1643102035, daymaxwind: 4.1, dayRain: 0.0, inHumidity: 48, inTemp: 18.7, lightningcount: 0, lightning_distance: 24, lightning_last_det_time: 1641921509, lightning_strike_count: 0, luminosity: 15608.0, monthRain: 26.1, outHumidity: 57, outTemp: 6.9, pressure: 1001.0, rain: 0.0, rainRate: 0.0, relbarometer: 1031.0, stormRain: 0.0, usUnits: 17, UV: 1, uvradiation: 20.0, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh57_batt: 4, wh57_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 308, windGust: 0.5, windSpeed: 0.5, yearRain: 26.1
Jan 25 10:13:55 ubuntu-server-one weewx[13424] INFO weewx.restx: MQTT: Published record 2022-01-25 10:13:55 CET (1643102035)
Jan 25 10:14:15 ubuntu-server-one weewx[13424] DEBUG user.gw1000: Next update in 20 seconds
Jan 25 10:14:15 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2022-01-25 10:14:15 CET (1643102055): dateTime: 1643102055, daymaxwind: 4.1, dayRain: 0.0, inHumidity: 48, inTemp: 18.7, lightningcount: 0, lightning_distance: 24, lightning_last_det_time: 1641921509, lightning_strike_count: 0, luminosity: 15655.0, monthRain: 26.1, outHumidity: 57, outTemp: 6.9, pressure: 1001.0, rain: 0.0, rainRate: 0.0, relbarometer: 1031.0, stormRain: 0.0, usUnits: 17, UV: 1, uvradiation: 20.0, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh57_batt: 4, wh57_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 250, windGust: 0.5, windSpeed: 0.1, yearRain: 26.1

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

And this is the last row of syslog this evening:

/////////////////////////////////////////
Jan 25 23:10:14 ubuntu-server-one weewx[13424] DEBUG user.gw1000: Next update in 20 seconds
Jan 25 23:10:14 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2022-01-25 23:10:14 CET (1643148614): dateTime: 1643148614, daymaxwind: 6.1, dayRain: 0.0, inHumidity: 50, inTemp: 18.5, lightningcount: 1, lightning_distance: 31, lightning_last_det_time: 1643130244, lightning_strike_count: 0, luminosity: 0.0, monthRain: 26.1, outHumidity: 77, outTemp: 1.2, pressure: 999.8, rain: 0.0, rainRate: 0.0, relbarometer: 1029.8, stormRain: 0.0, usUnits: 17, UV: 0, uvradiation: 0.1, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh57_batt: 4, wh57_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 329, windGust: 0.5, windSpeed: 0.5, yearRain: 26.1
Jan 25 23:10:14 ubuntu-server-one weewx[13424] INFO weewx.restx: MQTT: Published record 2022-01-25 23:10:14 CET (1643148614)
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG user.gw1000: Next update in 20 seconds
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2022-01-25 23:10:34 CET (1643148634): dateTime: 1643148634, daymaxwind: 6.1, dayRain: 0.0, inHumidity: 50, inTemp: 18.5, lightningcount: 1, lightning_distance: 31, lightning_last_det_time: 1643130244, lightning_strike_count: 0, luminosity: 0.0, monthRain: 26.1, outHumidity: 77, outTemp: 1.2, pressure: 999.8, rain: 0.0, rainRate: 0.0, relbarometer: 1029.8, stormRain: 0.0, usUnits: 17, UV: 0, uvradiation: 0.1, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh57_batt: 4, wh57_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 327, windGust: 0.5, windSpeed: 0.4, yearRain: 26.1
Jan 25 23:10:34 ubuntu-server-one weewx[13424] INFO weewx.restx: MQTT: Published record 2022-01-25 23:10:34 CET (1643148634)
Jan 25 23:10:34 ubuntu-server-one weewx[13424] INFO weewx.manager: Added record 2022-01-25 23:10:00 CET (1643148600) to database 'weewx'
Jan 25 23:10:34 ubuntu-server-one weewx[13424] INFO weewx.manager: Added record 2022-01-25 23:10:00 CET (1643148600) to daily summary in 'weewx'
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG weewx.reportengine: Running reports for latest time in the database.
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG weewx.reportengine: Report 'SeasonsReport' not enabled. Skipping.
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG weewx.reportengine: Running report 'Belchertown'
Jan 25 23:10:34 ubuntu-server-one weewx[13424] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Belchertown/skin.conf for report 'Belchertown'
Jan 25 23:10:35 ubuntu-server-one weewx[13424] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.JSONHelpers', 'user.belchertown.getData']
Jan 25 23:10:35 ubuntu-server-one weewx[13424] INFO weewx.restx: MQTT: Published record 2022-01-25 23:10:00 CET (1643148600)
Jan 25 23:10:35 ubuntu-server-one weewx[13424] DEBUG weewx.manager: Daily summary version is 4.0
Jan 25 23:10:35 ubuntu-server-one weewx[13424] INFO weewx.restx: Wunderground-PWS: Published record 2022-01-25 23:10:00 CET (1643148600)
Jan 25 23:10:35 ubuntu-server-one weewx[13424] INFO weewx.restx: PWSWeather: Published record 2022-01-25 23:10:00 CET (1643148600)
Jan 25 23:10:37 ubuntu-server-one weewx[13424] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 2.74 seconds
Jan 25 23:10:37 ubuntu-server-one weewx[13424] INFO weewx.reportengine: Copied 2 files to /////////////////////////////////////////////////////////////
Jan 25 23:10:37 ubuntu-server-one weewx[13424] DEBUG weewx.manager: Daily summary version is 4.0
Jan 25 23:10:54 ubuntu-server-one weewx[13424] DEBUG user.gw1000: Next update in 20 seconds
Jan 25 23:10:54 ubuntu-server-one weewx[13424] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2022-01-25 23:10:54 CET (1643148654): dateTime: 1643148654, daymaxwind: 6.1, dayRain: 0.0, inHumidity: 50, inTemp: 18.5, lightningcount: 1, lightning_distance: 31, lightning_last_det_time: 1643130244, lightning_strike_count: 0, luminosity: 0.0, monthRain: 26.1, outHumidity: 77, outTemp: 1.2, pressure: 999.8, rain: 0.0, rainRate: 0.0, relbarometer: 1029.8, stormRain: 0.0, usUnits: 17, UV: 0, uvradiation: 0.1, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh57_batt: 4, wh57_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 324, windGust: 0.5, windSpeed: 0.4, yearRain: 26.1
///////////////////////////////////////////////

Thanks
Carlo
weewx.conf

Tom Keffer

unread,
Jan 25, 2022, 6:31:15 PM1/25/22
to weewx-user
Well, everything looks normal there.

I would suggest setting up a query log to see what MySQL is spending its time on. https://dev.mysql.com/doc/refman/8.0/en/query-log.html

Cameron D

unread,
Jan 26, 2022, 3:51:45 AM1/26/22
to weewx-user
Is it normal in your setup to have two weewxd processes? And two mysqlds.  I run MariaDB so not exactly the same, but I only have one of each.

Have you checked memory usage to see you are not paging/swapping?

Cameron D

unread,
Jan 26, 2022, 4:12:01 AM1/26/22
to weewx-user
I withdraw that question - having installed htop and used tree mode I can see far more mysqld and weewx processes

carlo74

unread,
Jan 26, 2022, 5:53:42 AM1/26/22
to weewx-user
I activate MySql log and now I see thousand and thousand of row like this for "lightning_distance" "pm2_5" and "pm10_0"

2022-01-26T10:45:26.498249Z           20 Query        SELECT avg(lightning_distance) FROM archive WHERE dateTime > 1641246300 AND dateTime <= 1641246600 AND lightning_distance IS NOT NULL
2022-01-26T10:37:18.348249Z           16 Query        SELECT avg(pm2_5) FROM archive WHERE dateTime > 1671106500 AND dateTime <= 1671106800 AND pm2_5 IS NOT NULL

Now I stop log file because in half an hour the file is 150MB >> HUGE !!!

What can I do?
Thanks
Carlo

Graham Eddy

unread,
Jan 26, 2022, 6:06:33 AM1/26/22
to weewx...@googlegroups.com
Try running program “top" (install if necessary) to identify the processes consuming all that cpu (type ‘q’ to quit “top”)

On 26 Jan 2022, at 9:53 pm, carlo74 <carlo...@gmail.com> wrote:

What can I do?

Karen K

unread,
Jan 26, 2022, 6:23:32 AM1/26/22
to weewx-user
May be, it would be an idea to additionally deactivate all skins by adding enable = false for each skin and then re-activate them one by one. 

vince

unread,
Jan 26, 2022, 4:59:24 PM1/26/22
to weewx-user
On Wednesday, January 26, 2022 at 2:53:42 AM UTC-8 carlo74 wrote:
I activate MySql log and now I see thousand and thousand of row like this for "lightning_distance" "pm2_5" and "pm10_0"
 
2022-01-26T10:45:26.498249Z           20 Query        SELECT avg(lightning_distance) FROM archive WHERE dateTime > 1641246300 AND dateTime <= 1641246600 AND lightning_distance IS NOT NULL
2022-01-26T10:37:18.348249Z           16 Query        SELECT avg(pm2_5) FROM archive WHERE dateTime > 1671106500 AND dateTime <= 1671106800 AND pm2_5 IS NOT NULL

Now I stop log file because in half an hour the file is 150MB >> HUGE !!!
What can I do?


Your original question was 'why are you showing high cpu usage'

I would start by running a 'minimal' weewx setup temporarily:
  • stop weewx
  • disable 'all' skins other than Seasons or Standard
  • starting weewx back up
  • see if you are still experiencing the problem
I might add - why are you running mysql and not sqlite3 ?

carlo74

unread,
Jan 26, 2022, 5:24:12 PM1/26/22
to weewx-user
///// Try running program “top" (install if necessary) to identify the processes consuming all that cpu (type ‘q’ to quit “top”) /////
Schermata del 2022-01-26 22-28-00.png

///// May be, it would be an idea to additionally deactivate all skins by adding enable = false for each skin and then re-activate them one by one.  /////
Deactivate Belchertown an try with NONE and Seasons >>> All OK, no more High CPU usage !
Then I reactivate Belchertown and >>>> High CPU usage.

This two screen of log are with Seasons and Belchertown

Schermata del 2022-01-26 23-00-27.png

Schermata del 2022-01-26 23-01-35.png
I see only one difference with 'user.belchertown.getData' >>> and when the process arrive at this point the CPU grow up.

I notice that the Cpu usage is high for 3 minutes from the start of 5 minutes (when the database is created) AND after for 2 minutes is in normal operation.
i.e.:  at 22:30:30 the cpu at 70% for 3 minutes and at 22:33:30 ca. the cpu is normal. At 22:35:30 again at 70%. And this for all the day.

/////  might add - why are you running mysql and not sqlite3 ? /////
On this server I have another virtual host with wordpress and mysql database (very very small) ... so ... if  I change to sqlite3, I lost all the archive of the past year or all the statistic remain?
Thanks to everybody and sorry for my "base" english.
Carlo

vince

unread,
Jan 26, 2022, 5:42:35 PM1/26/22
to weewx-user
Your English is fine!

Next disable Seasons and Standard and turn on 'minimal' Belchertown.

Set mqtt_websockets_enabled = 0 so it only updates the data every 300 seconds.
Then restart weewx and check your cpu usage.

Cameron D

unread,
Jan 26, 2022, 7:25:04 PM1/26/22
to weewx-user
So what is unusual about lightning_distance and PM2.5?
Are you asking it to plot them, but have no data?

It is quite possible to migrate your data between mysql and sqlite3, but that will not make much difference to your problem - your weewx system seems to be stuck in a loop trying to get that lightning and PM2.5 data.

Karen K

unread,
Jan 27, 2022, 4:48:23 AM1/27/22
to weewx-user
What about

# Air Quality Index (AQI) defaults
aqi_enabled = 0
aqi_location_enabled = 0
# Earthquake defaults
earthquake_enabled = 0 

either in skin.conf or weewx.conf for Belchertown skin?

Note: weewx.conf takes precedence over skin.conf.

carlo74

unread,
Jan 27, 2022, 6:13:37 PM1/27/22
to weewx-user

/////////////////////////////////////
Next disable Seasons and Standard and turn on 'minimal' Belchertown.

Set mqtt_websockets_enabled = 0 so it only updates the data every 300 seconds.
Then restart weewx and check your cpu usage.
///////////////////////////////////
Nothing, I try and always High CPU usage

/////////////////////////////////
What about

# Air Quality Index (AQI) defaults
aqi_enabled = 0
aqi_location_enabled = 0
# Earthquake defaults
earthquake_enabled = 0 

either in skin.conf or weewx.conf for Belchertown skin?

Note: weewx.conf takes precedence over skin.conf.
/////////////////////////////////
I use another method to insert data of PM2_5, PM10_0 and lightning >> https://github.com/tkeffer/filepile

I re-controlled the Mysql log file and i suppose that the problem is at the moment of "query" the database of 3 values: pm2_5 pm10_0 and lightning.
Here an excerpt of log file and only for pm10_0 it was thousand and thousand of row 

2022-01-26T10:37:36.960712Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645402800 AND dateTime <= 1645403100 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.961776Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645403100 AND dateTime <= 1645403400 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.962752Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645403400 AND dateTime <= 1645403700 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.963524Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645403700 AND dateTime <= 1645404000 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.964263Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645404000 AND dateTime <= 1645404300 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.964989Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645404300 AND dateTime <= 1645404600 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.966022Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645404600 AND dateTime <= 1645404900 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.966960Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645404900 AND dateTime <= 1645405200 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.967965Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645405200 AND dateTime <= 1645405500 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.969014Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645405500 AND dateTime <= 1645405800 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.969930Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645405800 AND dateTime <= 1645406100 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.970924Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645406100 AND dateTime <= 1645406400 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.972136Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645406400 AND dateTime <= 1645406700 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.973038Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645406700 AND dateTime <= 1645407000 AND pm10_0 IS NOT NULL
2022-01-26T10:37:36.973989Z           16 Query        SELECT avg(pm10_0) FROM archive WHERE dateTime > 1645407000 AND dateTime <= 1645407300 AND pm10_0 IS NOT NULL


Tanks to everyone
Carlo

Tom Keffer

unread,
Jan 27, 2022, 6:33:16 PM1/27/22
to weewx-user
It looks like something is requesting the average value for "pm10_0" over 5 minute intervals, which is pretty silly because your archive interval is 5 minutes.

If you search the source code for the Belchertown skin, you do not find the string "pm10_0" anywhere, so I wonder where this request is coming from? Did you modify the Belchertown skin.conf to include plots of pm10_0? 

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

vince

unread,
Jan 27, 2022, 11:34:23 PM1/27/22
to weewx-user
I did notice you have at least some errors in your weewx.conf

You are trying to MQTT subscribe to nonexistent topics
[[[first/topic]]]
[[[FIRST/REPLACE_ME]]] [[[SECOND/REPLACE_ME]]]

Also - did you add a custom graphs.conf file to your Belchertown installation to define pm10_0 perhaps ?

If so, rename it to something else to disable the custom graphs.  Run just the default Belchertown first please.

carlo74

unread,
Jan 28, 2022, 6:03:06 AM1/28/22
to weewx-user
FIND ! Thanks @tke and @vince ... is graphs.conf !!!

First I change
//////////////////////////////////////
 # Highcharts settings
            highcharts_enabled = 0
//////////////////////////////////////
but it was not enough ... I must rename (like you told me) graphs.conf in another name and ... voilà .... No more High CPU usage.
Now I comment the chart of PM 2.5, PM 10 and lightning for "today" "week" "month" and "year" and in the next days I investigate ... I hope to risolve and told you soon.

////////////////////////////
I did notice you have at least some errors in your weewx.conf

You are trying to MQTT subscribe to nonexistent topics
[[[first/topic]]]
[[[FIRST/REPLACE_ME]]] [[[SECOND/REPLACE_ME]]]
/////////////////////////
I make this, but weewx service stop working ... so I repristinate
Schermata del 2022-01-28 11-28-15.png

Thanks to everyone
Carlo
Reply all
Reply to author
Forward
0 new messages