Here is an example of how to set up and use the electronic logbook for a new experiment, let's say 'A2'.
These subsections would be of interest for an administrator who would like to set up such an electronic logbook.
First thing, you have to obtain the source code (PHP, JS & HTML) from the author. Email the author for this,
stating what for and where you would like to install it.
Private functions and sessions history are kept in a directory outside the www tree:
cp private_func.php /www/safe_dir/A2/
chown apache /www/safe_dir/A2/private_func.php
But the directory
has to be writeable by the
user. Copy the indicated files therein.
Create the directory structure for the portal and file storage:
chown -R apache /www/html/site/A2
directory has to be writeable by the
user as well. This is where the attachments will be stored
Copy over the necessary files.
To create a database
and tables, use the following commands:
mysql> CREATE DATABASE A2;
mysql> GRANT ALL ON A2.* TO 'A2_db_admin'@'localhost' IDENTIFIED BY '******';
mysql> FLUSH PRIVILEGES;
Then use the commands from the file
(included in the code tarball) to create the tables, like this:
CREATE TABLE `Contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(60) DEFAULT NULL,
`email` varchar(60) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL,
`alt_phone` varchar(20) DEFAULT NULL,
`institute` int(3) DEFAULT NULL,
`homepage` varchar(120) DEFAULT NULL,
PRIMARY KEY (`id`)
and so on. In the end, you should have ten tables (not all are used for the eLog):
mysql> show tables from A2;
| Tables_in_A2 |
| Contacts |
| Experiments |
| Hardware |
| Institutes |
| Logbook |
| Parameters |
| ProcessVariables |
| Subgroups |
| Types |
| Units |
10 rows in set (0.00 sec)
Remember to replace
with the actual name of your database.
Edit the file
as explained in the comments therein. You will set up filesystem paths, superuser list, the list of generic systems of
your setup (the others are taken from the Subgroups DB table), the attributes and types lists, some of the colors for the layout etc.
After you will be done playing with the interface, you will be able to hide all the test entries by modifying the
Design a nice logo and save it in
The only tables needed for using this kit as a logbook are:
. The other tables are related to Process Variables, and would be
used for slow controls.
DB transfer problems
If the elog is moved to a new machine, with an older version of mysql, the mysql dump has to be compatible:
At origin (5.0.45):
mysqldump --user=root --opt --compact --compatible=mysql323 --password=xtehdsa A2 > /www/html/site/A2/A2-LOGBOOK-2010-04-08-323.SQL
At destination (3.23.41):
mysql -p -u A2_db_admin A2 < A2-LOGBOOK-2010-04-08-323.SQL
If the mysql socket is not in the usual place (
), then one can specify it in
mysql_connect(':/var/lib/mysql/mysql.sock', $user, $pass);
Authentication between these versions of mysql is different, so one may have to do this:
mysql> UPDATE mysql.user SET password=OLD_PASSWORD('xtehdsa') WHERE user='A2_db_admin' AND host='localhost';
mysql> flush privileges;
This electronic logbook software is currently used by PANDA@FAIR
experiments and by the
NDM initiative at CLAS
. The subsections below are for general user reference.
The users can register via the online interface. To add users, see instructions in the
file included in the software tarball.
Validate at least one superuser account by editing the files located in the
directory. Then log in as superuser and validate the other registrants.
Fill in the 'Institutes' and 'Contacts' DB tables.
Logbook entries can be done via individual accounts, or one could create a generic account, say
for shift summary entries. In the latter case,
the 'operators' entry field should be completed with the full names for the shift takers.
Here is a detailed A2 Logbook User Manual written by Ken Livingston: elog_manual_8868213.pdf
imported from http://nuclear.gla.ac.uk/twiki/bin/view.pl/Main/ELogHowTo
- 23 Aug 2012