Inspecting the Opal server and DataSHIELD logs

Viewing the logs

If you wish to look at the Opal server or DataSHIELD logs:

  • Launch the virtual machine

  • Log into the console window for the Virtual Machine using the options found here – it would be advisable in this case to use the Ubuntu Terminal/Shell environment as it offers better funtionality of scrolling through the code compared to the virtual machine’s window.

  • Change to directory"/var/log/opal" 

    cd /var/log/opal

     

  • List the contents using:

    ls -lt

    (the "-lt" part of the command instructs it to list in order of most recent change).

  • The directory contains four log files: 

    • datashield.log

    • opal.log

    • rest.log

    • stdout.log

You can view these logs by using:

more <filename>

e.g.

Given these logs will likely be very long, you can hit space to see more, and q to quit.

Live Monitoring Logs

If you wish to create a blank slate to view what logs are created as you try to recreate a problem on the opal server, you can clear out the logs using the following steps.

If you want to see the logs from a previous error, don't proceed with this clearing process.

Firstly, delete anything with a hyphen in the file name:

Then remove the existing contents of the four remaining files (effectively the same as deleting the contents of them).

Now that these are blank, you can give a command that will list the changes of all the commands that are output: using the * at the end.

This will create output that looks like:

If you are interested in only one file, say stdout.log, the command will be:

The advantage of this method is it is all in one line . The disadvantage is that the outputs can’t be scrolled through to find where the problem first started, if a large log is produced.

DataSHIELD Wiki by DataSHIELD is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at http://www.datashield.ac.uk/wiki