Page 1 of 2

w32error-unix.c: unknown error (61) "No data available"

Posted: Wed 29 Dec 2021 11:40 am
by broadstairs
I am seeing this error message repeat often while running MX for the first time. I decided to download today and try it out. It is accessing my GW1100 to obtain the data and I have AQI and 2 extra temp sensors together with lightning. The data seems to display OK locally on my dashboard. Just wondered what this might be.

Stuart

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Wed 29 Dec 2021 1:28 pm
by mcrossley
Hi Stuart,

I've not see that error before, could you switch on debug and data logging (Program Settings -> Logging Options), then once you have had the error happen again, please zip up and attach the latest log file from the /MXdiags folder.

Thanks

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Wed 29 Dec 2021 3:17 pm
by broadstairs
Mark

As requested the log file.

Stuart

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Wed 29 Dec 2021 7:32 pm
by mcrossley
The error is when trying to read the CPU temperature. On Linux (what version are you running?), it reads the file /sys/class/thermal/thermal_zone0/temp

It looks like that file exists as the code checks before it reads it. But it may not contain what I am expecting. Can you have a look at that file and post the contents please?

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Wed 29 Dec 2021 10:28 pm
by broadstairs
mcrossley wrote: Wed 29 Dec 2021 7:32 pm The error is when trying to read the CPU temperature. On Linux (what version are you running?), it reads the file /sys/class/thermal/thermal_zone0/temp

It looks like that file exists as the code checks before it reads it. But it may not contain what I am expecting. Can you have a look at that file and post the contents please?
Mark that is an empty file owned by root, since I'm not running CumulusMX as root I'm not surprised it wont open. All the files there are associated with hardware monitoring so I don't understand why you even go there why do you need CPU temp? I am running openSUSE Tumbleweed which is a very leading edge distro.

Stuart

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Wed 29 Dec 2021 11:27 pm
by mcrossley
The file should have read permissions for all users though?
Reading that file seems to be a fairly standard way of obtaining the CPU temperature.

Your problem is also that the file is also empty. I'll add a checks for both permissions and for no contents.

The error is caught and is fairly benign, it just creates the debug logging message once a minute.

It is used to set one of the environmental values that people extract via web tags. In your case that value will not be available.

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Thu 30 Dec 2021 5:25 am
by HansR
Permissions should not be an issue: I run as pi on a standard installation and it all goes well.

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Thu 30 Dec 2021 10:11 am
by broadstairs
Mark I checked again and that file is readable to all but it is empty. I don't know why it does not get populated, I will try to find out.

I am still puzzled that a weather program needs to know the CPU temperature, it is something I do not expect as I have hardware monitors running and that information does not need to be published. If folks want to know on a remote processor there are better ways to do this and temperature alone is not enough to know what might be wrong you also need other temps and fan speeds etc.

Stuart

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Thu 30 Dec 2021 11:57 am
by mcrossley
Not everyone is a computer whizz, and the CMX web tags provide an easy way for them to get some basic information to display on their web sites.

I know the environment variables are a bit of anachronism, but they were inherited from Cumulus 1 (which was Windows only) and were maintained for backwards compatibility. Providing some of that data cross platform is not always easy or possible.

TBH I wouldn't fret about it, it doesn't sound like you would use those variables anyway.

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Thu 30 Dec 2021 12:03 pm
by broadstairs
No I am not ;) Just out of interest I'm trying to find out why that file is empty on Tumbleweed.

Stuart

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Thu 30 Dec 2021 12:20 pm
by mcrossley
It does seem a bit odd that the system creates the file, but then doesn't use it.

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Fri 31 Dec 2021 11:40 am
by broadstairs
Mark I've done some more on this and it would appear that this field cannot be relied upon on all distros. It all depends on ACPI and if/how it is used I believe, so the answer is it may work or it may not. On my system there is another set of directories /sys/class/hwmon/hwmonN/ etc where there are 5 sub-directories containing 344 different files/directories and somewhere in there is probably what you want but and it's a big BUT most will contain a temp but it is not easy to determine which is the correct one for CPU temp.

So basically I'd say leave it as is and if it works great but if not then hard luck would be my response ;)

Stuart

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Sat 01 Jan 2022 3:34 pm
by mcrossley
Thanks for looking into it. Linux is a bit of a nightmare with all the different distros doing things slightly differently.

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Sun 02 Jan 2022 11:16 am
by broadstairs
Mark I updated my laptop this morning which also runs Tumbleweed and it has the Temp file with data in it, in fact it has two Thermal0 and Thermal1 and both have valid Temp files! Go figure!

Stuart

Re: w32error-unix.c: unknown error (61) "No data available"

Posted: Sun 02 Jan 2022 4:01 pm
by mcrossley
Ha! Who knows.