Executing an SQL query by using the klsql2 utility

This article describes how to use the klsql2 utility, and how to execute an SQL query by using this utility.

To use the klsql2 utility:

  1. Go to the directory where Kaspersky Security Center Linux Administration Server is installed. The default installation path is /opt/kaspersky/ksc64/sbin.
  2. In this directory, create src.sql blank file.
  3. Open the src.sql file in any text editor.
  4. In the src.sql file, type the SQL query that you want, and then save the file.
  5. On the device with Kaspersky Security Center Linux Administration Server installed, in the command line, type the following command to execute the SQL query from the src.sql file and save the results to the result.xml file:

    sudo ./klsql2 -i src.sql -o result.xml

  6. Open the newly created result.xml file to view the SQL query results.

You can edit the src.sql file and create any query to the public views. Then, from the command line, execute your SQL query and save the results to a file.

See also

Scenario: Configuring event export to SIEM systems

Page top