The dqtool tool manual page

Name

dqtool — Display the contents of a disk-buffer file created with AxoSyslog.

Synopsis

dqtool [command] [options]

Description

The dqtool application is a utility that can be used to display and format the messages stored in a disk-buffer file.

The cat command

cat [options] [file]

Use the cat command to display the log messages stored in the disk-buffer (also called disk-queue) file, and also information from the header of the disk queue file. The messages are printed to the standard output (stdout), so it is possible to use grep and other tools to find particular log messages, for example, dqtool cat /var/log/messages.lgs |grep 192.168.1.1.

The cat command has the following options:

  • --debug or -d

    Print diagnostic and debugging messages to stderr.

  • --help or -h

    Display a brief help message.

  • --template=<template> or -t

    Format the messages using the specified template.

  • --verbose or -v

    Print verbose messages to stderr.

  • --version or -V

    Display version information.

Example: The cat command

Terminal window
./dqtool cat ../var/syslog-ng-00000.qf

The output looks like:

Terminal window
Disk-buffer state loaded;
filename='../var/syslog-ng-00000.qf', qout_length='65', qbacklog_length='0', qoverflow_length='9205', qdisk_length='0'
Mar  3 10:52:05 tristram localprg[1234]: seq: 0000011630, runid: 1267609923, stamp: 2010-03-03T10:52:05 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD
Mar  3 10:52:05 tristram localprg[1234]: seq: 0000011631, runid: 1267609923, stamp: 2010-03-03T10:52:05 PADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADDPADD

The info command

info [DISK-BUFFER_FILE]

Shows status information about the specified disk-buffer file. For example:

  • Empty, normal disk-buffer file

    Terminal window
    /opt/syslog-ng/bin/dqtool info /opt/syslog-ng/var/syslog-ng-00000.qf/var/lib/syslog-ng/syslog-ng-00000.qf

    Example output:

    Terminal window
    Disk-buffer state loaded; filename='/opt/syslog-ng/var/syslog-ng-00000.qf/var/lib/syslog-ng/syslog-ng-00000.qf', number_of_messages='0'
  • Non-empty, reliable disk-buffer queue file

    Terminal window
    /opt/syslog-ng/bin/dqtool info /opt/syslog-ng/var/syslog-ng-00000.rqf
    Terminal window
    Reliable disk-buffer state loaded; filename='/opt/syslog-ng/var/syslog-ng-00000.rqf', number_of_messages='10'

The relocate command

relocate [options] [files]

Use the relocate command to move or rename disk-buffer (also called disk-queue) files. Note that this option modifies the persist file. Stop AxoSyslog before using this command.

The relocate command has the following options:

  • --all or -a

    Relocate every disk-buffer file that is listed in the AxoSyslog persist file.

  • --new_path or -n

    The directory where you want to move the disk-bufffer files. For example: /var/disk-buffers

  • --persist or -p

    The path to the AxoSyslog persist file. The relocate command automatically updates the entries of the disk-buffer files in the persist file.

Examples

Relocate a single queue file:

Terminal window
bin/dqtool relocate --new_path /tmp/dq --persist var/syslog-ng.persist /tmp/syslog-ng-00000.rqf

Relocate multiple queue files:

Terminal window
bin/dqtool relocate --new_path /tmp/dq --persist var/syslog-ng.persist /tmp/syslog-ng-00000.rqf /tmp/syslog-ng-00001.rqf

Relocate every queue file:

Terminal window
bin/dqtool relocate --new_path /tmp/dq --persist var/syslog-ng.persist --all

The assign command

assign [options] [file]

Use the assign command to assign an existing disk-buffer file to a destination, by adding it to the AxoSyslog persist file under a specific persist name. This is useful when the persist file has no entry for the disk-buffer file, and you want to attach the file to a destination manually. Note that this command modifies the persist file. Stop AxoSyslog before using it.

If the disk-buffer file is specified by filename only, dqtool appends it to the current working directory. You must know the persist name that your destination uses.

The assign command has the following options:

  • --example or -e

    Print usage examples and exit.

  • --persist=<persist-file> or -p

    The path to the AxoSyslog persist file to update.

  • --persist_name=<persist-name> or -n

    The persist name to assign the disk-buffer file to. If the persist file already contains an entry with this name, dqtool overwrites it and prints the previous value.

Example: The assign command

Terminal window
bin/dqtool assign -p var/syslog-ng.persist \
                  -n "afsocket_dd_qfile(stream,localhost:15554)" \
                  /tmp/syslog-ng-dq/syslog-ng-00000.rqf

The truncate command

truncate [options] [files]

Use the truncate command to reclaim the unused space of abandoned disk-buffer files.

CAUTION:

Truncating a disk-buffer file that AxoSyslog is actively using can result in data loss. Stop AxoSyslog, or make sure that the files are no longer in use, before you run this command.

The truncate command has the following options:

  • --force or -f

    Perform the truncation. Without this option, dqtool only prints a warning and exits without modifying any file.

Example: The truncate command

Terminal window
bin/dqtool truncate --force /tmp/syslog-ng-00000.rqf

The output looks like:

Terminal window
Disk-buffer /tmp/syslog-ng-00000.rqf has been truncated, reclaimed space: 1.453125 GiB

Files

/opt/syslog-ng/bin/dqtool

See also

syslog-ng.conf.5

syslog-ng.8

Getting help

  • The up-to-date documentation of AxoSyslog is available on the AxoSyslog documentation site.
  • For news and notifications about AxoSyslog, visit the Axoflow blog.
  • If you want to contact the developers directly to help with problems or report issues, contact us on Discord or GitHub.

This manual page is maintained by Axoflow

Last modified September 15, 2026: Sync man page options with source code (52ac2d7f)