$station.uptime

221 views
Skip to first unread message

Robin

unread,
Mar 3, 2018, 3:45:48 AM3/3/18
to weewx-user
I have this feeling in my water that I am missing something really simple here, BUT.......

Why does my station uptime not change? It shows "Weewx uptime: 0 days, 0 hours, 6 minutes" permanently!


Andrew Milner

unread,
Mar 3, 2018, 6:35:11 AM3/3/18
to weewx-user
Maybe time is standing still .......

Seriously though - do the other variables like system time change with only station uptime appearing to be stuck in a spacetime distortion??

gjr80

unread,
Mar 3, 2018, 8:02:34 AM3/3/18
to weewx-user
Hi,

Is your site visible from the Internet, if so could you provide a link? The algorithm for calculating station uptime is fairly basic, the only real way to confuse it and display what you describe would be if weeWX was continually being restarted. That would ceratainly show in the log. Even if weeWX was starting with a system time that is too far in the past it would be a one-off event and again it would be evident in the log.

I trust you have restarted weeWX? Would be interesting to see a log from weeWX startup covering about 15-20 minutes.

Gary

Andrew Milner

unread,
Mar 3, 2018, 8:07:15 AM3/3/18
to weewx-user
One other reason is that the about page is not, for some reason, being regenerated every report cycle - or is not being copied/ftpd every cycle.  Is it perhaps included in the 'copy once only' list??

As gary says, looking at the site may help and the logs certainly would be valuable and should be informative.

Robin

unread,
Mar 3, 2018, 8:49:39 AM3/3/18
to weewx-user
The main page is http://www.weather.molyvos.eu

The 'status' page was just a fun thing to see how long since the last power cut. http://www.weather.molyvos.eu/status

I'm sure it used to work when I started running weewx (June 2014) but I then took it off my page as it was really only a measure of the reliability of our electricity supply.

I will get the log sorted out.

Is there a format associated with $station.uptimeor do I use it as is?

Thanks
Robin

On Saturday, 3 March 2018 10:45:48 UTC+2, Robin wrote:

gjr80

unread,
Mar 3, 2018, 1:41:38 PM3/3/18
to weewx-user
$station.uptime by itself should format just fine, though it will/may depend on the contents of skin.conf. In your case it appears to be formatting as it should. Given we are talking about a custom page (ie not one included in a default weeWX install) it would be worth posting the template file (.tmpl) and skin config file being used.

Gary

Robin

unread,
Mar 4, 2018, 1:07:30 AM3/4/18
to weewx-user
Hi Gary,

I don't think it is the template or skin config as I also have a Bootstrap skin running.


Since I did a Weewx stop/start it now shows 

Weewx uptime: 0 days, 0 hours, 0 minutes
Server uptime: 0 days, 0 hours, 6 minutes

 

Andrew Milner

unread,
Mar 4, 2018, 1:11:47 AM3/4/18
to weewx-user
the bootstrap skin has totally the wrong date and time of lasdt update though!!!!!  It is saying November 2015

Robin

unread,
Mar 4, 2018, 1:27:31 AM3/4/18
to weewx-user
Andrew, 

my bad, just noticed that myself and was about to post. I will get /bootstrap/index running again and see what happens

Robin

Robin

unread,
Mar 4, 2018, 1:40:23 AM3/4/18
to weewx-user
OK the page is now updating (not the images, I'm only interested in the uptime).


It still shows

Station uptime:0 days, 0 Hours, 0 minutes
Server uptime:0 days, 0 Hours, 6 minutes


Andrew Milner

unread,
Mar 4, 2018, 2:15:11 AM3/4/18
to weewx-user
and the log??

ma...@erwinheger.de

unread,
Mar 4, 2018, 2:18:41 AM3/4/18
to weewx...@googlegroups.com
The data from this example webpage are all totally outdated, all from 2015.

Did you switch the database or is it all static?

Better put the uptime-variable into a live page than driving us nuts with something, that doesn’t work at all.



It still shows

Station uptime:0 days, 0 Hours, 0 minutes
Server uptime:0 days, 0 Hours, 6 minutes


E

gjr80

unread,
Mar 4, 2018, 2:27:29 AM3/4/18
to weewx-user
You might want to upgrade to a later weeWX version, at least 3.7.0, as there have been a number of changes to bin/weewx/station.py (the module that handles station uptime and server uptime) since your 3.6.1 version. I had a quick look at station.py just now and cannot see any one change that would obviously fix your issue but the changes have been substantial. You could probably just download the current station.py from the weeWX github repo master branch and replace your current station.py. Something like:

$ wget https://raw.githubusercontent.com/weewx/weewx/master/bin/weewx/station.py

should download the current file. If you do take this approach make sure you keep the old file in case you need to revert. WeeWX will need to be restarted after such a change.

Gary

Andrew Milner

unread,
Mar 4, 2018, 2:28:19 AM3/4/18
to weewx-user
if you search for uptime in /bin/weewx/station.py you will see how weewx and server uptimes are derived!!

may offer some clues

Andrew Milner

unread,
Mar 4, 2018, 2:29:28 AM3/4/18
to weewx-user
sorry gary - we seem to have crossposted!!

Andrew Milner

unread,
Mar 4, 2018, 2:30:10 AM3/4/18
to weewx-user
if you do uptime -p what result do you get??

Robin

unread,
Mar 4, 2018, 3:14:51 AM3/4/18
to weewx-user
up 16 days, 18:57,  1 user,  load average: 0.14, 0.19, 0.21

Andrew Milner

unread,
Mar 4, 2018, 4:07:39 AM3/4/18
to weewx-user
the format must vary with the operating system then as mine says
up 1 week, 3 hours, 51 minutes!!

not too sure why your uptime should give be giving any info about users or load averages though!!

Andrew Milner

unread,
Mar 4, 2018, 4:12:43 AM3/4/18
to weewx-user
are you on a MAC by any chance??  seems like weewx has implemented pretty much the method outlined here for os uptime:

Robin

unread,
Mar 4, 2018, 7:48:16 AM3/4/18
to weewx-user
I'm running a Raspberry Pi.

Andrew Milner

unread,
Mar 4, 2018, 8:27:56 AM3/4/18
to weewx-user
then i'm well baffled as so am i - running raspbian, yet my uptime -p command gave a very different result to yours!!  I also use the bootstrap skin

the answer must lie in your skin/weewx.conf or the log .....

have you tried gary's suggestion yet??

Andrew Milner

unread,
Mar 4, 2018, 8:43:19 AM3/4/18
to weewx-user
getting closer .....

Having checked 5 different RPis ..... Jessie and Stretch respond like I posted originally

Wheezy responds like yours, and does not appear to accept the -p option

whether there is any significance in this I do not know!!!  It could be that the proc info is different in wheezy

Robin

unread,
Mar 4, 2018, 9:59:45 AM3/4/18
to weewx-user
Andrew,

Correct, I am running Wheezy.

Please stop trying to solve this (for now).

I decided to update to 3.8 and all hell has broken loose. Typically I ignored all the good advice to backup the SD card. Now pulling my hair out (not much left to work with).

Gone back to old conf file and made a couple of hacks to get it running.

Robin

3.6.1 was working fine - if it ain’t brokedon’t fix it

sigh........

Andrew Milner

unread,
Mar 4, 2018, 10:38:07 AM3/4/18
to weewx-user
Robin
Unless you have a good reason I would recommend a fresh install of stretch since you are already deep in the proverbial anyway

The only rpi I have still on wheezy is one no longer in live production use - all my others (for weewx, touch display and soil moisture sensors) are now on Jessie and one is on stretch for my sprinkler watering!!  

But yes, you sound as bad as me for following good advice!!!!!!

Andrew
PS - OK - I'll stop looking around, but I suspect the likely cause is a wheezy/weewx mismatch rather than weewx itself

Robin

unread,
Mar 4, 2018, 11:00:11 AM3/4/18
to weewx-user
Andrew,

I'm going to sit in the 'stupid' corner for a while!

A fresh install is going to take courage. I have a lot of bits and bobs that I have added in, some of which I can only just remember! My knowledge and skill level give me major worries that I won't get everything back together again.

I think I need to start with building a list of my added 'stuff' and then making a plan to get it all back into a new install.

I already have a headache.

Robin

Andrew Milner

unread,
Mar 4, 2018, 11:03:37 AM3/4/18
to weewx...@googlegroups.com

Weeeeeeeeeeeeeeeeeeeeeeeeeeeee ........ have a few paracetomols to help you out!!!!!!!

 

Go on – a few deep breaths and a fresh sd card and a new install .......

 

As long as you are on a fresh sd card you should be ok as you rebuild.

But yes, a list of the addons is a prerequisite and a good excuse for a few beers as you exercise the memory cells ........................

 

 

 

Sent from Mail for Windows 10

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/oNaUk2ENIzc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Reply all
Reply to author
Forward
0 new messages