Warning Livedoc is no longer being updated and will be deprecated shortly. Please refer to https://documentation.tjhsst.edu.


Jump to: navigation, search


2,818 bytes added, 17:31, 29 July 2009
Initial edit.
'''JAWS''' (Jefferson AWS) is the program that runs on [[weather]]. The source code for JAWS is hosted at sourceforge.net.

The program interfaces with the weather station and updates a weather.log flatfile and a MySQL database with current conditions on a periodic basis. The weather.log flatfile is a legacy artifact as it is no longer used; MySQL support was added after the original development of JAWS but the old flatfile support was not removed or disabled.

The program also transmits information to Weather Underground and is able to listen on AWS port 95.

Historical information on JAWS can be found on [http://www.tjhsst.edu/~jgrafton/techlab-weather/ Jeff Grafton's website].

==Weather Data==
http://www.tjhsst.edu/weather/ has a banner with current weather conditions as well as graphs of historical weather data (the first data point is 2003-09-21 22:27:31).

[[Intranet]] also has an intrabox that displays current weather conditions.

Current weather conditions can be accessed locally on the TJ network through telnet:
*For formatted, user-friendly weather information: <code>telnet weather 8888</code>
*For raw weather data (CSV): <code>telnet weather 8889</code>

==Starting JAWS==
On [[weather]], cd to /root/jaws and run <code>screen -d -m ./jawsd</code> (alternatively, run jawsd in a screen and detach the screen).

*config.h must be set correctly at compile time.
*The running directory of jawsd must have a weather.log file or jawsd will segfault.
*/dev/ttyS0 must be owned by the weather user (it is unclear why group membership is insufficient to allow the weather user to open the device).

The current source in use is largely the same as the one on Sourceforge, except for a few differences:
*In wunderground.c, the transmit URL contains softwaretype=tjhsst_csl-lburton instead of softwaretype=jgrafton_weather_techlab. This seems to be a meaningless difference though, as wunderground shows a blank field for Station Type on the station page.
*In jawsd.c, the AWS listener thread is disabled. For some unknown reason, on the previous weather server, the listener was able to listen on privileged port 95/tcp while running as uid 101, but it is not able to do so on the current server. In addition, according to [[User:Lee Burton|one of the developers]], the AWS thread has always been buggy. Finally, NBC4 reported to us that they were switching from AWS to Weather Underground, so hopefully AWS was no longer used by anybody. If it was, we will need to figure out a way to enable it again, possibly requiring source code changes (i.e. open the port before dropping to an unprivileged user).
*Occasionally (and only on the current [[weather]] server), JAWS will log some entries with the year 1931 immediately after starting. The cause is unknown.

Navigation menu