Windspeed in m/s - and .sdb backup

55 views
Skip to first unread message

bushtor

unread,
Jan 27, 2012, 3:36:36 AM1/27/12
to wview, ep...@bushsoft.com
Hi,

Does it exist a way to display the windspeed in m/s instead of km/h
when 'metric units' is selected? If I recall correctly all data are
stored in US units, so it is a matter of conversion?

Also I am taring my .sdb files to a safe location each night, and I
see that if this happens at a moment that wview wants to rewrite the
html files it generates a few write errors in the log and refuses to
update any more until I restart the wview daemon. Does it exist a
safe way to tar the .sdb files? Should I stop the wview daemon before
the backup and start it after having packed the tar file?

Thanks for comments on this

regards

Tor

Lukáš Kužel

unread,
Feb 5, 2012, 1:23:15 AM2/5/12
to wv...@googlegroups.com

Hi, very good idea! I asked it some time ago but with no reaction at all... the same as you :(
For example in our country (Czech republic) it is normaly to talking about wind speed in m/s insted of km/h.

--
You received this message because you are subscribed to the Google Groups "wview" group.
To post to this group, send email to wv...@googlegroups.com.
To unsubscribe from this group, send email to wview+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wview?hl=en.

Jörg Sommrey

unread,
Feb 5, 2012, 4:01:18 AM2/5/12
to wv...@googlegroups.com
Hi,

to get around the errors caused by simultaneous access to the .sdb
files, I added a small delay in my script that is called by cron.
Wview accesses the database around second 0. Waiting till second 10
avoids the concurrency in almost all cases.

For the wind speed: Just change your templates. The m/s wind speeds
are available as e.g. <!--windSpeed_ms-->

To get metric units from the database I enabled export to mysql and
defined some views that do the necessary conversions.

-jo

Lukáš Kužel

unread,
Feb 5, 2012, 8:05:37 AM2/5/12
to wv...@googlegroups.com
2012/2/5 Jörg Sommrey <jo...@sommrey.de>:

> Hi,
>
> to get around the errors caused by simultaneous access to the .sdb files, I
> added a small delay in my script that is called by cron. Wview accesses the
> database around second 0. Waiting till second 10 avoids the concurrency in
> almost all cases.
>
> For the wind speed: Just change your templates. The m/s wind speeds are
> available as e.g. <!--windSpeed_ms-->

That's it! Thx alot.

Firestone

Lukáš Kužel

unread,
Feb 5, 2012, 8:19:00 AM2/5/12
to wv...@googlegroups.com
Dne 5. února 2012 14:05 Lukáš Kužel <lukas...@gmail.com> napsal(a):

> 2012/2/5 Jörg Sommrey <jo...@sommrey.de>:
>> Hi,
>>
>> to get around the errors caused by simultaneous access to the .sdb files, I
>> added a small delay in my script that is called by cron. Wview accesses the
>> database around second 0. Waiting till second 10 avoids the concurrency in
>> almost all cases.
>>
>> For the wind speed: Just change your templates. The m/s wind speeds are
>> available as e.g. <!--windSpeed_ms-->

Second thing that I realized if it's possible to get graphics wind
dial in m/s too...?

Firestone

Mark S. Teel

unread,
Feb 5, 2012, 10:28:51 AM2/5/12
to wv...@googlegroups.com
For all stations:
LOOP data cycle frequency is determined by the POLL_INTERVAL
configuration parameter and lined up on 0. I.e., a POLL_INTERVAL of 30
seconds (the default) would occur at second 0 and 30 of each minute. A
database store is done when the LOOP data is received which varies
widely based on station/protocol and could be 100's of milliseconds to 5
seconds after the LOOP start.
Thus for the example above and a station which responds 2 seconds after
the LOOP initiation, there would be database writes at 2 seconds and 32
seconds of each minute.

ARCHIVE records are written around the 5th second of the archive
interval minute. I.e., using an archive interval of 5 minutes (the
default) there would be an archive record stored at 00:05:05, 00:10:05, ...

NOAA records are updated shortly after each archive record generated.

Mark

On 2/5/12 3:01 AM, J�rg Sommrey wrote:
> Hi,
>
> to get around the errors caused by simultaneous access to the .sdb
> files, I added a small delay in my script that is called by cron.
> Wview accesses the database around second 0. Waiting till second 10
> avoids the concurrency in almost all cases.
>
> For the wind speed: Just change your templates. The m/s wind speeds
> are available as e.g. <!--windSpeed_ms-->
>
> To get metric units from the database I enabled export to mysql and
> defined some views that do the necessary conversions.
>
> -jo
>

Jörg Sommrey

unread,
Feb 5, 2012, 11:08:57 AM2/5/12
to wv...@googlegroups.com
On Sun Feb 5 14:19:00 2012, Luká? Ku?el <lukas...@gmail.com> wrote:


> Second thing that I realized if it's possible to get graphics wind
> dial in m/s too...?
>

That's done in htmlGenerate.c. Shouldn't be too difficult to change if
you do not intent to implement a general solution (i.e. something that
is configurable).

-jo

Jörg Sommrey

unread,
Feb 5, 2012, 11:32:13 AM2/5/12
to wv...@googlegroups.com
Thanks for the clarification. Though it seems to work, I don't feel
very comfortable with my "wait till second 10" approach. I really
would like to use some kind of a voluntary, blocking lock. Any
suggestions how to implement this inside a shell script?

-jo

bushtor

unread,
Feb 15, 2012, 8:46:26 AM2/15/12
to wview
I came up with stopping wview temporarily:

/etc/init.d/wview stop
<copy sdb files here>
/etc/init.d/wview start

And I haven't discovered any side effects by using this (for four
weeks now...)

regards Tor
Reply all
Reply to author
Forward
0 new messages