Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Data logs 2 records per minute?

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

broadstairs
Posts: 1185
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW2000/GW3000
Operating System: Linux openSUSE LEAP
Location: Broadstairs, Kent, UK
Contact:

Re: Data logs 2 records per minute?

Post by broadstairs »

mcrossley wrote: Thu 08 Dec 2022 10:36 am
SamiS wrote: Wed 07 Dec 2022 8:15 pm @Mark: How foolproof is the detection if first instance is run as service (maybe under root permissions) and second instance from commandline as different user? And if I am correct, this would actually cause processes to keep their own differently named logfiles in MXdiags folder?
It creates a system mutex based on a static GUID allocated to CMX. It seems to be a pretty robust mechanism, killing a process can leave the system mutex open and you will get a warning on restarting (MX can detect the difference between an open and an abandoned mutex). How well it works with processes in different security contexts I'm not so sure, but as it is a system wide lock I'd expect it to work.
Well sorry to report but under Mono/Linux I CAN start two copies of CMX just fine no errors at all, you solution does not work. I also just checked again and the stop second instance IS set.

That does NOT mean I did start two but it is possible that forcing off the console window could leave it running in the background but even that is a remote possibility and to my mind should not happen. If I ever have to do that I'll check first to make sure mono has stopped.

Stuart
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Data logs 2 records per minute?

Post by mcrossley »

Bugger - so it doesn't. I wonder if this is a bug in newer versions of Mono, they have had bugs with mutex's before :(
Starts digging...
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Data logs 2 records per minute?

Post by mcrossley »

It still works on Windows, so it is looking like a mono problem...
broadstairs
Posts: 1185
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW2000/GW3000
Operating System: Linux openSUSE LEAP
Location: Broadstairs, Kent, UK
Contact:

Re: Data logs 2 records per minute?

Post by broadstairs »

Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Data logs 2 records per minute?

Post by freddie »

@mcrossley usage of systemd on Linux provides an immediate workaround. Best to run as a service rather than from the command line.
Freddie
Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Data logs 2 records per minute?

Post by mcrossley »

broadstairs wrote: Thu 08 Dec 2022 11:55 am Mark I just found

https://stackoverflow.com/questions/212 ... x#21750422
Yep, I found that too, but it is out of date. They added support for mutexes later.
freddie wrote: Thu 08 Dec 2022 12:40 pm @mcrossley usage of systemd on Linux provides an immediate workaround. Best to run as a service rather than from the command line.
Yep, running as a service and starting another service isn't an issue, it creates a lock file containing the process id.

Maybe I need to look at something similar for MX, the file needs to be globally readable of course.
broadstairs
Posts: 1185
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW2000/GW3000
Operating System: Linux openSUSE LEAP
Location: Broadstairs, Kent, UK
Contact:

Re: Data logs 2 records per minute?

Post by broadstairs »

Mark if you come up with something which needs testing my CMX is not live so it's easy for me to play around trying anything.

Stuart
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Data logs 2 records per minute?

Post by freddie »

mcrossley wrote: Thu 08 Dec 2022 1:55 pm Yep, running as a service and starting another service isn't an issue, it creates a lock file containing the process id.
Yep I know that - I meant recommend running as a service. No disadvantage and it is only a one-time extra step.
Freddie
Image
Post Reply