<?xml version="1.0"?>
<!--

  Copyright (c) 2012 Balabit

  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License version 2 as published
  by the Free Software Foundation, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

  As an additional exemption you are allowed to compile & link against the
  OpenSSL libraries as published by the OpenSSL project. See the file
  COPYING for details.

-->
<reference xmlns="http://docbook.org/ns/docbook" xml:id="syslog-ng-ctl-man-page" version="5.0">
  <info>
    <productname/>
    <title>The syslog-ng control tool manual page</title>
  </info>
  <refentry xml:id="syslog-ng-ctl.1">
    <refmeta>
      <refentrytitle>syslog-ng-ctl</refentrytitle>
      <manvolnum>1</manvolnum>
      <refmiscinfo class="version">4.9</refmiscinfo>
      <refmiscinfo class="source"/>
    </refmeta>
    <refnamediv>
      <refname>syslog-ng-ctl</refname>
      <refpurpose>Display message statistics and enable verbose, debug and trace modes in  </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
      <cmdsynopsis>
        <command>syslog-ng-ctl</command>
        <arg>command</arg>
        <arg>options</arg>
      </cmdsynopsis>
    </refsynopsisdiv>
    <refsection xml:id="syslog-ng-ctl-mandescription">
      <title>Description</title>
      <para>NOTE: The syslog-ng-ctl application is distributed with the  system logging application, and is usually part of the syslog-ng package. The latest version of the syslog-ng application is available at <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://syslog-ng.org">the official syslog-ng website</link>.</para>
      <para>This manual page is only an abstract, for the complete documentation of syslog-ng, see <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://www.balabit.com/support/documentation/"><command>The  Administrator Guide</command></link>.</para>
      <para>The <command>syslog-ng-ctl</command> application is a utility that can be used to:</para>
      <itemizedlist>
        <listitem>
          <para>enable/disable various syslog-ng messages for troubleshooting</para>
        </listitem>
        <listitem>
          <para>display statistics about the processed messages</para>
        </listitem>
        <listitem>
          <para>reload the configuration of .</para>
        </listitem>
      </itemizedlist>
    </refsection>
    <refsection xml:id="syslog-ng-ctl">
      <title>Enabling troubleshooting messages</title>
      <cmdsynopsis>
        <command>command</command>
        <arg>options</arg>
      </cmdsynopsis>
      <para>Use the <command>syslog-ng-ctl &lt;command&gt; --set=on</command> command to display verbose, trace, or debug messages. If you are trying to solve configuration problems, the verbose (and occasionally trace) messages are usually sufficient. Debug messages are needed mostly for finding software errors. After solving the problem, do not forget to turn these messages off using the <command>syslog-ng-ctl &lt;command&gt; --set=off</command>. Note that enabling debug messages does not enable verbose and trace messages.</para>
      <para>Use <command>syslog-ng-ctl &lt;command&gt;</command> without any parameters to display whether the particular type of messages are enabled or not.</para>
      <para>If you need to use a non-standard control socket to access syslog-ng, use the <command>syslog-ng-ctl &lt;command&gt; --set=on --control=&lt;socket&gt;</command> command to specify the socket to use.</para>
      <variablelist>
        <varlistentry>
          <term>
            <command>verbose</command>
          </term>
          <listitem>
            <para>Print verbose messages. If syslog-ng was started with the <parameter>--stderr</parameter> or <parameter>-e</parameter> option, the messages will be sent to stderr. If not specified, syslog-ng will log such messages to its internal source.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <command>trace</command>
          </term>
          <listitem>
            <para>Print trace messages of how messages are processed. If syslog-ng was started with the <parameter>--stderr</parameter> or <parameter>-e</parameter> option, the messages will be sent to stderr. If not specified, syslog-ng will log such messages to its internal source.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <command>debug</command>
          </term>
          <listitem>
            <para>Print debug messages. If syslog-ng was started with the <parameter>--stderr</parameter> or <parameter>-e</parameter> option, the messages will be sent to stderr. If not specified, syslog-ng will log such messages to its internal source.</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>Example:<synopsis>syslog-ng-ctl verbose --set=on</synopsis></para>
    </refsection>
    <refsection xml:id="syslog-ng-ctl-stats">
      <title>The stats command</title>
      <cmdsynopsis>
        <command>stats</command>
        <arg>options</arg>
      </cmdsynopsis>
      <para>Use the <command>stats</command> command to display statistics about the processed messages. The <command>stats</command> command has the following options:</para>
      <variablelist>
        <varlistentry>
          <term><command>--control=&lt;socket&gt;</command> or <command>-c</command>
                    </term>
          <listitem>
            <para>Specify the socket to use to access syslog-ng. Only needed when using a non-standard socket.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>--reset</command> or <command>-r</command></term>
          <listitem>
            <para>Reset all statistics to zero, except for the <userinput>stored</userinput> counters. (The <userinput>stored</userinput> counters show the number of messages stored in the message queue of the destination driver, waiting to be sent to the destination.)</para>
          </listitem>
        </varlistentry>
      </variablelist>
      <para>Example:<synopsis>syslog-ng-ctl stats</synopsis></para>
      <para>An example output:</para>
      <synopsis>src.internal;s_all#0;;a;processed;6445
src.internal;s_all#0;;a;stamp;1268989330
destination;df_auth;;a;processed;404
destination;df_news_dot_notice;;a;processed;0
destination;df_news_dot_err;;a;processed;0
destination;d_ssb;;a;processed;7128
destination;df_uucp;;a;processed;0
source;s_all;;a;processed;7128
destination;df_mail;;a;processed;0
destination;df_user;;a;processed;1
destination;df_daemon;;a;processed;1
destination;df_debug;;a;processed;15
destination;df_messages;;a;processed;54
destination;dp_xconsole;;a;processed;671
dst.tcp;d_network#0;10.50.0.111:514;a;dropped;5080
dst.tcp;d_network#0;10.50.0.111:514;a;processed;7128
dst.tcp;d_network#0;10.50.0.111:514;a;stored;2048
destination;df_syslog;;a;processed;6724
destination;df_facility_dot_warn;;a;processed;0
destination;df_news_dot_crit;;a;processed;0
destination;df_lpr;;a;processed;0
destination;du_all;;a;processed;0
destination;df_facility_dot_info;;a;processed;0
center;;received;a;processed;0
destination;df_kern;;a;processed;70
center;;queued;a;processed;0
destination;df_facility_dot_err;;a;processed;0</synopsis>
    </refsection>
    <refsection xml:id="syslog-ng-ctl-reload">
      <title>Reloading the configuration</title>
      <cmdsynopsis>
        <command>command</command>
        <arg>options</arg>
      </cmdsynopsis>
      <para>Use the <command>syslog-ng-ctl reload</command> command to reload the configuration file of  without having to restart the  application. The <command>syslog-ng-ctl reload</command> works like a SIGHUP.</para>
    </refsection>
    <refsection>
      <title>Files</title>
      <para>
        <filename>/opt/syslog-ng/sbin/syslog-ng-ctl</filename>
      </para>
    </refsection>
    <refsection>
      <title>See also</title>
      <para>
        <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://www.balabit.com/support/documentation/">
          <command>The syslog-ng Administrator Guide</command>
        </link>
      </para>
      <para>
        <link linkend="syslog-ng.conf.5"><command>syslog-ng.conf</command>(5)</link>
      </para>
      <para>
        <link linkend="syslog-ng.8"><command>syslog-ng</command>(8)</link>
      </para>
      <note version="5.0">
        <para>For the detailed documentation of  see <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://www.balabit.com/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html/index.html"><command>The  4.9 Administrator Guide</command></link></para>
        <para>If you experience any problems or need help with syslog-ng, visit the <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://lists.balabit.hu/mailman/listinfo/syslog-ng"><command>syslog-ng mailing list</command></link>.</para>
        <para>For news and notifications about of syslog-ng, visit the <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://syslog-ng.org/blogs/"><command>syslog-ng blogs</command></link>.</para>
      </note>
    </refsection>
    <refsection version="5.0">
      <title>Author</title>
      <para>This manual page was written by the Balabit Documentation Team &lt;documentation@balabit.com&gt;.</para>
    </refsection>
    <refsection version="5.0">
      <title>Copyright</title>
    </refsection>
  </refentry>
</reference>
