Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

[IMPLEMENTED] MXdiags when run as server - log rotate

A Forum to archive Cumulus MX development suggestions that have been rejected or solved by other means.
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

[IMPLEMENTED] MXdiags when run as server - log rotate

Post by HansR »

If CMX is run as server continuously on e.g. Linux, the MXdiags file may become large, especially in debug mode.
Maybe it's an idea to restart the diags at rollover or some other time as that timeslot may become too crowded.
Maybe it is better to keep more diags in that case to have the startup session always available.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
freddie
Posts: 2473
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: MXdiags when run as server

Post by freddie »

A possible solution is to have the log file name use the date that a message is logged. This has the advantage that each individual log file would be written to over a 24-hour period - thus some control over file size - and there would be an automatic rollover to a new file at midnight. You could include a parameter in the ini file (and in the admin screens) to specify the number of days of logs to keep.
Freddie
Image
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MXdiags when run as server

Post by mcrossley »

I have thought about this before, let me see what I can come up with...
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MXdiags when run as server

Post by mcrossley »

Is 5MB as a max log file size too small?
freddie
Posts: 2473
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: MXdiags when run as server

Post by freddie »

IMO yes - by an order of magnitude :D
Freddie
Image
User avatar
rogerthn
Posts: 514
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

Re: MXdiags when run as server

Post by rogerthn »

My log file 20200817-182026.txt, with debug is now 48M ;)
Image
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: MXdiags when run as server

Post by HansR »

mcrossley wrote: Thu 20 Aug 2020 4:50 pm Is 5MB as a max log file size too small?
My normal running log is less than 400K/day, but if debug is on that would be a bit larger I assume.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
freddie
Posts: 2473
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: MXdiags when run as server

Post by freddie »

HansR wrote: Thu 20 Aug 2020 6:22 pm
mcrossley wrote: Thu 20 Aug 2020 4:50 pm Is 5MB as a max log file size too small?
My normal running log is less than 400K/day, but if debug is on that would be a bit larger I assume.
@rogerthn's reply would suggest with debug switched on you are approaching 20MB per day. I personally leave debug on all the time as you never know when a problem may occur. My latest log file covers 3 days and (almost) 3 hours - it is 115MB. Perhaps something around 50MB daily to err on the cautious side?
Freddie
Image
User avatar
ConligWX
Posts: 1613
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: MXdiags when run as server

Post by ConligWX »

Yep, log rotation, sounds like a plan! :clap:
mcrossley wrote: Thu 20 Aug 2020 4:50 pm Is 5MB as a max log file size too small?
yes...smaller than my 27Gb logfile I got a few months ago yes (without debug)
Last edited by ConligWX on Thu 20 Aug 2020 6:56 pm, edited 1 time in total.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MXdiags when run as server

Post by mcrossley »

The rate of growth depends on the station type to some extent, Davis with loop data every 2 seconds will grow more quickly than say a Fine Offset.

Ok, I think we are probably looking at something like 20MB as an upper limit. It's not the file size itself that is the problem, more the speed of opening it in an editor, and adding as attachments.

What is the attachment size limit on the forum?
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: MXdiags when run as server

Post by HansR »

freddie wrote: Thu 20 Aug 2020 6:28 pm @rogerthn's reply would suggest with debug switched on you are approaching 20MB per day. I personally leave debug on all the time as you never know when a problem may occur. My latest log file covers 3 days and (almost) 3 hours - it is 115MB. Perhaps something around 50MB daily to err on the cautious side?
Yes, but some confidence that you don't need debug on all the time is justified.
And apart from that: the debug info size is highly dependent on the station type.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
freddie
Posts: 2473
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: MXdiags when run as server

Post by freddie »

mcrossley wrote: Thu 20 Aug 2020 6:46 pm What is the attachment size limit on the forum?
10MiB, but is configurable.
Freddie
Image
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MXdiags when run as server

Post by mcrossley »

OK, I think a 20MB log should zip down to around 1MB if my calcs are correct.

I'll start with 20MB and see how that goes!
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: MXdiags when run as server

Post by Phil23 »

Random thought I had a few days back about the service was outputting data to a telnet port.

Don't know the implications; it just came to mind while opening a terminal connection to another device.

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: MXdiags when run as server

Post by Phil23 »

Just a further question relating to running as a Service.

Would there be no issues in having a browser permanently open on the dashboard page.

If you were to do that I assume it the socket port would timeout after a period.

I assume that could be edited in the appropriate script, but the few searches I've made haven't popped up an answer as yet.

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Locked