LBA
|
Livepage DatabaseThe accumulated live page data is stored in several tables in mySQL databases that
are located on fourier. The two databases are called To access the database, you must log in to fourier and give the command: The mysql server will prompt you for a password: enter the root password for fourier. To select the database you wish to access, once you are in the mysql console, give the
command To view the structure of the tables, give the command Please note: ‘time_ut_date’ appears to be local date not UT date and therefore should not be used in combination with ‘time_utc’ for determining the date and time of an entry. It is best to use the ‘time_julian_day’ or ‘time_ut_day_number’ + ‘time_utc’ instead. This wiki page will not go into detail about how to make a general mySQL query - there are plenty of web pages out there for that. Instead we will give some commonly used queries that are useful. The most common query will return the last entry in the If you know what data you’re interested in you can select only that. Say you want to know what the temperature
is doing, then you might issue the query: +--------------------+----------+---------------------+ | time_ut_day_number | time_utc | weather_temperature | +--------------------+----------+---------------------+ | 260 | 06:14:09 | 10 | | 260 | 06:14:03 | 10 | | 260 | 06:13:58 | 10 | | 260 | 06:13:52 | 10 | | 260 | 06:13:46 | 10 | | 260 | 06:13:41 | 10 | | 260 | 06:13:35 | 10 | | 260 | 06:13:30 | 10 | | 260 | 06:13:24 | 10 | | 260 | 06:13:19 | 10 | | 260 | 06:13:13 | 10 | | 260 | 06:13:08 | 10 | +--------------------+----------+---------------------+ Obviously this is of limited use for temperature though. More useful is to instead take only every 100th entry, which would give us the temperature for the past 100*12*5 seconds = 6000 seconds = 1h 40m.SELECT time_ut_day_number,time_utc,weather_temperature FROM telescope WHERE right(id,2)=00 ORDER BY id DESC LIMIT 12; gives: +--------------------+----------+---------------------+ | time_ut_day_number | time_utc | weather_temperature | +--------------------+----------+---------------------+ | 260 | 23:06:24 | 8 | | 260 | 22:57:01 | 7.6 | | 260 | 22:47:39 | 7.2 | | 260 | 22:38:13 | 6.9 | | 260 | 22:28:52 | 6.6 | | 260 | 22:19:30 | 6.3 | | 260 | 22:10:09 | 5.8 | | 260 | 22:00:49 | 5.3 | | 260 | 21:51:26 | 4.9 | | 260 | 21:42:03 | 4.7 | | 260 | 21:32:39 | 4.5 | | 260 | 21:23:14 | 4.4 | +--------------------+----------+---------------------+ These are just some simple queries to get you started. The databases and the tables themselves are stored as files in the location Permissions on the live page database tables are quite restrictive. As expected the root
user can log in from anywhere and alter any of the tables in any way. For the client machines,
insertions to the If you see an error such as “database is marked as crashed and must be repaired”, (say after a crash of ares), then to repair the databases, login to ares as root This will ultimately all stop working in 2021Currently the last table is telescope_2021_Dec and so the live pages will stop working at the end of 2021. To create future tables, in mysql type: |