\label{doc_help_kdb-plugin-check_md_md_doc_help_kdb_plugin_check}%
\Hypertarget{doc_help_kdb-plugin-check_md_md_doc_help_kdb_plugin_check}%
 \hypertarget{doc_help_kdb-plugin-check_md_autotoc_md2627}{}\doxysection{SYNOPSIS}\label{doc_help_kdb-plugin-check_md_autotoc_md2627}
{\ttfamily kdb plugin-\/check \mbox{[}$<$plugin$>$\mbox{]}}\hypertarget{doc_help_kdb-plugin-check_md_autotoc_md2628}{}\doxysection{DESCRIPTION}\label{doc_help_kdb-plugin-check_md_autotoc_md2628}
This command is used to perform checks on the key database or an Elektra plugin.

Where the option argument, {\ttfamily plugin} is the plugin that a user wants to check. Use {\ttfamily -\/c} to pass options to that plugin. If no {\ttfamily plugin} argument is provided a check will be performed on the key database itself. Special values are returned upon exit to represent the outcome of a check.\hypertarget{doc_help_kdb-plugin-check_md_autotoc_md2629}{}\doxysection{OPTIONS}\label{doc_help_kdb-plugin-check_md_autotoc_md2629}

\begin{DoxyItemize}
\item {\ttfamily -\/H}, {\ttfamily -\/-\/help}\+: Show the man page.
\item {\ttfamily -\/V}, {\ttfamily -\/-\/version}\+: Print version info.
\item {\ttfamily -\/p}, {\ttfamily -\/-\/profile $<$profile$>$}\+: Use a different kdb profile.
\item {\ttfamily -\/C}, {\ttfamily -\/-\/color $<$when$>$}\+: Print never/auto(default)/always colored output.
\item {\ttfamily -\/f}, {\ttfamily -\/-\/force}\+: The user can also use this tool to perform write tests. Please note that this can result in configuration files being changed!
\item {\ttfamily -\/v}, {\ttfamily -\/-\/verbose}\+: Explain what is happening. Prints additional information in case of errors/warnings.
\item {\ttfamily -\/c}, {\ttfamily -\/-\/plugins-\/config $<$plugins-\/config$>$}\+: Add a plugin configuration in addition to {\ttfamily /module}.
\item {\ttfamily -\/d}, {\ttfamily -\/-\/debug}\+: Give debug information. Prints additional debug information in case of errors/warnings.
\end{DoxyItemize}\hypertarget{doc_help_kdb-plugin-check_md_autotoc_md2630}{}\doxysection{RETURN VALUES}\label{doc_help_kdb-plugin-check_md_autotoc_md2630}
There are two different types of checks, a check on a plugin (by specifying the name of a plugin as an argument) or a check on the key database itself.

The outcome of a check on the key database is returned as an exit status. This integer represents an 8-\/bit pattern. Each bit represents a specific outcome as described below\+:


\begin{DoxyItemize}
\item 0\+: No errors (no output)
\item Bit 1\+: Warning on opening the key database.
\item Bit 2\+: Error on opening the key database.
\item Bit 3\+: Warning on getting the value of a key.
\item Bit 4\+: Error on getting the value of a key.
\item Bit 5\+: Warning on setting the value of a key. (only checked when {\ttfamily -\/f} is used)
\item Bit 6\+: Error on setting the value of a key (only checked when {\ttfamily -\/f} is used)
\item Bit 7\+: Warning on closing the key database.
\item Bit 8\+: Error on closing the key database.
\end{DoxyItemize}

So if the following number was returned {\ttfamily 9} the user could figure out more detail by considering the bits\+: {\ttfamily 00001001} The user would know that there was a warning on open and an error on get.

If a plugin name is given, checks will only be done on the given plugin. The returned values for a check on a plugin are returned as much simpler numbers.

Return values on plugin checking\+:


\begin{DoxyItemize}
\item 0\+: Everything ok. (no output)
\item 1\+: No such plugin found or plugin could not be opened.
\item 2\+: Plugin did not pass checks.
\item 3\+: Plugin has warnings.
\end{DoxyItemize}

Please report any output caused by official plugins to \href{https://git.libelektra.org/issues}{\texttt{ https\+://git.\+libelektra.\+org/issues}}.

Since the error code is a return value, it is not automatically displayed to the shell. If the user wants to have the value printed, they must do so manually (by running a command such as {\ttfamily echo \$?}).\hypertarget{doc_help_kdb-plugin-check_md_autotoc_md2631}{}\doxysection{EXAMPLES}\label{doc_help_kdb-plugin-check_md_autotoc_md2631}
To check the Key Database\+:~\newline
 {\ttfamily kdb plugin-\/check}

To check the Key Database and then print the result\+:~\newline
 {\ttfamily kdb plugin-\/check} followed by\+:~\newline
 {\ttfamily echo \$?}

To check the Key Database including write checks\+:~\newline
 {\ttfamily kdb plugin-\/check -\/f} Note that this type of check may change configuration files.

To check the {\ttfamily line} plugin\+:~\newline
 {\ttfamily kdb plugin-\/check line}\hypertarget{doc_help_kdb-plugin-check_md_autotoc_md2632}{}\doxysection{SEE ALSO}\label{doc_help_kdb-plugin-check_md_autotoc_md2632}

\begin{DoxyItemize}
\item For an introductions into plugins, read \mbox{\hyperlink{src_plugins_README_md}{elektra-\/plugins}}.
\item To list all plugins use \mbox{\hyperlink{doc_help_kdb-plugin-list_md}{kdb-\/plugin-\/list(1)}}.
\item For information on a plugin use \mbox{\hyperlink{doc_help_kdb-plugin-info_md}{kdb-\/plugin-\/info(1)}}. 
\end{DoxyItemize}