.TH "md_doc_help_kdb-check" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME md_doc_help_kdb-check \- kdb-check(1) -- Perform internal checks \fCkdb check []\fP .PP .SS "DESCRIPTION" .PP This command is used to perform checks on the key database or an Elektra plugin\&. .PP Where the option argument, \fCplugin\fP is the plugin that a user wants to check\&. Use \fC-c\fP to pass options to that plugin\&. If no \fCplugin\fP 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\&. .PP .SS "OPTIONS" .PP .IP "\(bu" 2 \fC-H\fP, \fC--help\fP: Show the man page\&. .IP "\(bu" 2 \fC-V\fP, \fC--version\fP: Print version info\&. .IP "\(bu" 2 \fC-f\fP, \fC--force\fP: The user can also use this tool to perform write tests\&. Please note that this can result in configuration files being changed! .IP "\(bu" 2 \fC-v\fP, \fC--verbose\fP: Explain what is happening\&. .IP "\(bu" 2 \fC-c\fP, \fC--plugins-config\fP: Add a plugin configuration\&. .PP .PP .SS "RETURN VALUES" .PP Their 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\&. .PP 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: .PP .IP "\(bu" 2 0: No errors (no output) .IP "\(bu" 2 Bit 1: Warning on opening the key database\&. .IP "\(bu" 2 Bit 2: Error on opening the key database\&. .IP "\(bu" 2 Bit 3: Warning on getting the value of a key\&. .IP "\(bu" 2 Bit 4: Error on getting the value of a key\&. .IP "\(bu" 2 Bit 5: Warning on setting the value of a key\&. (only checked when \fC-f\fP is used) .IP "\(bu" 2 Bit 6: Error on setting the value of a key (only checked when \fC-f\fP is used) .IP "\(bu" 2 Bit 7: Warning on closing the key database\&. .IP "\(bu" 2 Bit 8: Error on closing the key database\&. .PP .PP So if the following number was returned \fC9\fP the user could figure out more detail by considering the bits: \fC00001001\fP The user would know that their was a warning on open and an error on get\&. .PP 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\&. .PP Return values on plugin checking: .PP .IP "\(bu" 2 0: Everything ok\&. (no output) .IP "\(bu" 2 1: No such plugin found or plugin could not be opened\&. .IP "\(bu" 2 2: Plugin did not pass checks\&. .IP "\(bu" 2 3: Plugin has warnings\&. .PP .PP Please report any output caused by official plugins to \fChttp://git\&.libelektra\&.org/issues\fP\&. .PP 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 \fCecho $?\fP\&. .PP .SS "EXAMPLES" .PP To check the Key Database: \fCkdb check\fP .PP To check the Key Database and then print the result: \fCkdb check\fP followed by: \fCecho $?\fP .PP To check the Key Database including write checks: \fCkdb check -f\fP Note that this type of check may change configuration files\&. .PP To check the \fCline\fP plugin: \fCkdb check line\fP .PP .SS "SEE ALSO" .PP .IP "\(bu" 2 For an introductions into plugins, read \fBelektra-plugins(7)\fP\&. .IP "\(bu" 2 To list all plugins use \fBkdb-list(1)\fP\&. .IP "\(bu" 2 For information on a plugin use \fBkdb-info(1)\fP\&. .PP