.\" Automatically generated by Pandoc 2.2.1 .\" .TH "PMEMLOG_CTL_GET" "3" "2019-02-19" "PMDK - pmemlog API version 1.1" "PMDK Programmer's Manual" .hy .\" Copyright 2014-2019, Intel Corporation .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" * Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" * Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" * Neither the name of the copyright holder nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .SH NAME .PP \f[B]pmemlog_ctl_get\f[](), \f[B]pmemlog_ctl_set\f[](), \f[B]pmemlog_ctl_exec\f[]() \- Query and modify libpmemlog internal behavior (EXPERIMENTAL) .SH SYNOPSIS .IP .nf \f[C] #include\ int\ pmemlog_ctl_get(PMEMlogpool\ *plp,\ const\ char\ *name,\ void\ *arg);\ (EXPERIMENTAL) int\ pmemlog_ctl_set(PMEMlogpool\ *plp,\ const\ char\ *name,\ void\ *arg);\ (EXPERIMENTAL) int\ pmemlog_ctl_exec(PMEMlogpool\ *plp,\ const\ char\ *name,\ void\ *arg);\ (EXPERIMENTAL) \f[] .fi .SH DESCRIPTION .PP The \f[B]pmemlog_ctl_get\f[](), \f[B]pmemlog_ctl_set\f[]() and \f[B]pmemlog_ctl_exec\f[]() functions provide a uniform interface for querying and modifying the internal behavior of \f[B]libpmemlog\f[](7) through the control (CTL) namespace. .PP The \f[I]name\f[] argument specifies an entry point as defined in the CTL namespace specification. The entry point description specifies whether the extra \f[I]arg\f[] is required. Those two parameters together create a CTL query. The functions and the entry points are thread\-safe unless indicated otherwise below. If there are special conditions for calling an entry point, they are explicitly stated in its description. The functions propagate the return value of the entry point. If either \f[I]name\f[] or \f[I]arg\f[] is invalid, \-1 is returned. .PP If the provided ctl query is valid, the CTL functions will always return 0 on success and \-1 on failure, unless otherwise specified in the entry point description. .PP See more in \f[B]pmem_ctl\f[](5) man page. .SH CTL NAMESPACE .PP prefault.at_create | rw | global | int | int | \- | boolean .PP If set, every page of the pool will be touched and written to when the pool is created, in order to trigger page allocation and minimize the performance impact of pagefaults. Affects only the \f[B]pmemlog_create\f[]() function. .PP Always returns 0. .PP prefault.at_open | rw | global | int | int | \- | boolean .PP If set, every page of the pool will be touched and written to when the pool is opened, in order to trigger page allocation and minimize the performance impact of pagefaults. Affects only the \f[B]pmemlog_open\f[]() function. .PP Always returns 0. .PP sds.at_create | rw | global | int | int | \- | boolean .PP If set, force\-enables or force\-disables SDS feature during pool creation. Affects only the \f[B]pmemlog_create\f[]() function. See \f[B]pmempool_feature_query\f[](3) for informations about SDS (SHUTDOWN_STATE) feature. .PP Always returns 0. .SH CTL EXTERNAL CONFIGURATION .PP In addition to direct function call, each write entry point can also be set using two alternative methods. .PP The first method is to load a configuration directly from the \f[B]PMEMLOG_CONF\f[] environment variable. .PP The second method of loading an external configuration is to set the \f[B]PMEMLOG_CONF_FILE\f[] environment variable to point to a file that contains a sequence of ctl queries. .PP See more in \f[B]pmem_ctl\f[](5) man page. .SH SEE ALSO .PP \f[B]libpmemlog\f[](7), \f[B]pmem_ctl\f[](5) and \f[B]\f[]