How to extract log information from Oahpa for research

As usual, commands on victorio.


We have different language versions. The commands here use sma, replace with sjd, etc. For univ_oahpa, replace with univ_. For the old (sme) oahpa, remove the prefix, and write only oahpa, drill_log, etc.

First, create a directory under your home directory where everybody has the writing permission:

mkdir ~/logdata
chmod 777 logdata

On both gtoahpa and gtlab write:

mysql -u root -p

And then, dependent upon the oahpa version you want to extract data for, write:

mysql> use smaoahpa;
mysql> select * from smadrill_log order by game into outfile '/home/your_username/logdata/smaoahpalog.txt' fields terminated by '|';
mysql> exit

where your_username is replaced with your user name on the server.

More useful commands:

mysql> show databases;
mysql> use smaoahpa;

Here is the command set for old oahpa:

mysql> use oahpa;
mysql> select * from drill_log order by game into outfile '/home/your_username/logdata/oahpalog.txt' fields terminated by '|';

The resulting file can then be gathered.

As can be seen, more refined commands are possible (refining the log result).

Logs may also be extracted from the command line directly, and one program at a time. This command prints all the entries:

python manage.py printlogs 

Note that this demands python 2.6 on some machines and 2.7 on others.

Cf. an actual example, with the option --game set (no option gives all programs):

$ python2.6 manage.py printlogs --game numra