METEOLAST(1)

NAME
meteolast - retrieve recent meteo data from database

SYNOPSIS
meteolast [ -dxMEh?+H ] [ -V ] [ -llogurl ] [ -fconffile ] [ -ttime ] [ -wwindow ] stationname...

DESCRIPTION
The meteoloop(1) programm locates the last (or first) record before (after) the time (the present time if the -t option is not present) for each station named as arguments and formats it either as plain text or as a segment of XML data. Standard XSLT style sheets can be used to convert the XML data into almost any other format. All elements on the produced XML are optional, as are the lines in the plain text format. Only lines/elements for which there is data in the database are printed.

OPTIONS

-d  increase the debug level by one. Debug messages are written to standard error.

-x  produce XML format instead of plain text.

-E  output in english units.

-M  output in metric units (the default).

-H  add an XML header and a root element <meteolist> to the output, so that the output is legal XML

-f conffile
    read configuration from conffile, usually something like /usr/local/etc/meteo.xml.

-V  print version and exit

-h  -? print a help message and exit

-ttime
    look for the last entry before time time. Together with the -+ option, looks for the first entry after time

-+  instead of search for the last record before a given time, look for the first record after that time. Using this option without the -t option does notmake sense: as the default for a search is the current time, searches with -+ will look into the future, for which normally no data is available yet. Suggestions for algorithms that allow to add such data to the database are highly welcome, though.

-w window
    The program performs a query of the form select max(timekey) from stationdata where station = 'Altendor' and timekey ... Such a query would normally be extremely slow, as the restriction on the station name causes MySQL to almost scan the whole table. Thus the query only searches for timekeys between some not too distant point in the past and the current time. The window parameter tells it how many seconds into the past it should look. The default is 3600, i.e. meteolast is successful if an update has happened during the last hour. If data comes in with longer intervals, you should increase the window. Using 86400 for the window still gives reasonably fast results.

SEE ALSO
meteo(1) meteo.xml(5), meteodraw(1), meteodequeue(1), meteojob(1), meteoavg(1).

AUTHOR
Dr. Andreas Mueller <afm@othello.ch>, based on a version of meteolast for meteo-0.5 by Jeff Wabik