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
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 salasana:
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; mysql>
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
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 numra|2011/12/27|9|9|True|ovcci|None|None numra|2011/12/27|1|1|True|okta|None|None numra|2011/12/27|3|3|True|golbma|None|None