Skip to content

Fast track installation and usage instructions

Marios Fragkoulis edited this page Aug 27, 2013 · 9 revisions

1. Download the project's source code tree by executing

               git clone https://github.com/mfragkoulis/PiCO_QL.git

2. Navigate to the downloaded directory; then

               cd PiCO_QL/src/Linux-kernel-mod/server/ 

where the PiCO QL LKM's source code is located.

3. As any kernel module, PiCO QL requires kernel headers. If not installed in your system, please type

               sudo apt-get install linux-headers-`uname -r`

4. Only the first time PiCO QL is compiled (or after moving to another kernel version) type

               sudo make prep

to copy header file placeholders that PiCO QL requires in the central catalogue.

5. You can build the module by typing

               sudo make

and clean compilation artifacts by typing

               make clean

6. To load the module type

               sudo insmod picoQL.ko

7. You can verify that the module is loaded by typing

               grep 'picoQL' /proc/modules

8. Entering an SQL query is as easy as

               echo "SELECT * FROM SQLITE_MASTER;" > /proc/picoQL

or you can try the Web interface.

9. To retrieve the query's result set, type

               cat /proc/picoQL

This query will return the virtual database schema.

10. It is possible to configure query output. Available options are:

  • No metadata -default-, that is no column names, no result set rows and no execution time reported. In other words, uniform output as Unix commands. (code 100)
  • Metadata (code 111)
  • Result set as plain text output -default- (code 10)
  • Result set as HTML output (code 11)
               ./picoQL_config_ioctl code
First compile with:
               gcc -g picoQL_config_ioctl.c -o picoQL_config_ioctl

11. To unload the module simply type

               sudo rmmod picoQL

Web interface

1. Having loaded the PiCO QL LKM, navigate to the client code as follows.

               cd PiCO_QL/src/Linux-kernel-mod/client/ 

2. Compile the web interface by typing

               make

and clean compilation artifacts by typing

             make clean

3. Start the web interface by typing

               ./picoQL-client

4. Open your favorite browser and go to

               http://localhost:8080

Once the web interface starts it configures the module to produce metadata and provide the result set as an HTML table. To facilitate querying, the query input page features the current virtual table schema.