|
SetSystemConfigurationOption
SetSystemConfigurationOption() dynamically changes server configuration settings at runtime.
Declaration
NINT SetSystemConfigurationOption(NINT option, pTEXT value);
Short Name
ctSETCFG()
Description
SetSystemConfigurationOption() allows a c-tree Server configuration to be changed at run time. This means you do not have to restart the server to operate with these specified configuration changes. This allows utilities and other diagnostic monitoring tools to directly call the server to activate or inactivate various server configuration options.
- value is the new setting value specified as a string.
- option is one of the following c-tree Server configuration values:
Option
|
Description
|
setcfgFUNCTION_MONITOR
|
Dynamically turn on and off the Function Monitor.
|
setcfgCHECKPOINT_MONITOR
|
Dynamically turn on and off the Checkpoint Monitor.
|
setcfgMEMORY_MONITOR
|
Dynamically turn on and off the Memory Monitor.
|
setcfgREQUEST_TIME_MONITOR
|
Dynamically set the function monitoring time interval.
|
setcfgDYNAMIC_DUMP_DEFER
|
Dynamically set the Dynamic Dump defer time for enhanced online performance to value in milliseconds.
|
setcfgCTSTATUS_MASK
|
Dynamically turn on and off masking of messages specified by value in CTSTATUS.FCS. Accepted values:
WARNING_AUTO_TRNLOG | ~WARNING_AUTO_TRNLOG
DYNAMIC_DUMP_FILES | ~DYNAMIC_DUMP_FILES
|
Specifying any other option value than these causes ctSETCFG() to return error PBAD_ERR (749).
Details
An attempt to change an option that is specified in a c-tree Server settings (ctsrvr.set) file will fail with a SETO_ERR (804) error, cannot override option specified in settings file. ctSETCFG() can only be called by a member of the ADMIN group; otherwise it will fail with error LADM_ERR (589).
The function monitor file output now also includes a time stamp.
Return Values
Value
|
Symbolic Constant
|
Explanation
|
0
|
NO_ERROR
|
Successful operation.
|
589
|
LADM_ERR
|
Member of ADMIN group required.
|
749
|
PBAD_ERR
|
bad parameter value
|
804
|
SETO_ERR
|
cannot override configuration option that was specified in settings file
|
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.
Examples
/* Enable function monitor logging to a file. */ ctSETCFG(setcfgFUNCTION_MONITOR, "fncmon.log");
/* Enable memory monitor output with 30000000 byte threshold. */ ctSETCFG(setcfgMEMORY_MONITOR, "30000000");
/* Enable checkpoint monitor detailed output. */ ctSETCFG(setcfgCHECKPOINT_MONITOR, "DETAIL");
/* Dynamically set the monitoring of function timings */ ctSETCFG(setcfgREQUEST_TIME_MONITOR, "15");
/* Dynamically set the Dynamic Dump defer time */ ctSETCFG(setcfgDYNAMIC_DUMP_DEFER, "25");
/* Dynamically turn on masking of Dynamic Dump messages */ ctSETCFG(setcfgCTSTATUS_MASK, "DYNAMIC_DUMP_FILES");
|