HomeMogDBMogDB StackUqbar
v2.0

Documentation:v2.0

Supported Versions:

Other Versions:

Environment Variables

The PTK reads the values of some specific environment variables that affect the runtime logic.

You can use the ptk env command to view all the environment variables supported by PTK and the corresponding values in effect.

If you want to see the value of a specific environment variable, you can use the ptk env <KEY> command, for example:

  • View the catalog of PTK metadata
ptk env PTK_HOME

List of supported environment variables

PTK reads the environment variables in the table below during runtime. You can change the behavior of PTK by modifying the environment variables with export.

Environment Variable Name Description Note
PTK_HOME The root directory where PTK stores metadata, by default $HOME/.ptk.
PTK_DATA_DIR The directory where PTK stores cluster metadata, by default $PTK_HOME/data.
PTK_SSH_CONNECT_TIMEOUT The timeout for the executor to establish an SSH link with the target server, default is 1 minute. In h(hour)/m(minute)/s(second), e.g. “2m20s”.
PTK_CMD_EXECUTE_TIMEOUT Timeout for the executor to wait for a return from executing shell commands, default 10 minutes. In h(hour)/m(minute)/s(second), e.g. “2m20s”.
PTK_LOG_PATH The path to the file used to output the execution log. It can also be specified with the command line parameter --log-file. If this environment variable is set, it will be written to the log file in addition to the terminal output during the execution of PTK. By default, PTK itself will also record a log file in the $PTK_HOME/log directory during the runtime, which is not controlled by this environment variable.
PTK_NO_CHECK_VERSION By default, PTK will check if there is a new version of PTK released when running a command. Set this environment variable to true to disable PTK version checking.
PTK_NOT_LIMIT_CM_NODES PTK checks the number of CM nodes when deploying a MogDB database and deploying a CM cluster at the same time. when the number of CM nodes is greater than 3, by default, it forces to limit the deployment of only an odd number of CM server nodes to satisfy the majority election requirement, so when deploying a 4-node cluster, it will ask the user to select a node without deploying a CM server. the user can disable the restriction by setting the parameter to true. Of course, the same effect can also be achieved at installation time with the command line parameter --not-limit-cm-nodes.
PTK_ENABLE_TIMEOUT_WHEN_BUILD_DB When PTK rebuilds a standby node with the build command, the timeout for executing the command is not set by default (i.e., PTK_CMD_EXECUTE_TIMEOUT does not take effect). This is because, in some high-volume data scenarios, executing a build can be very costly, and exiting after the timeout can result in the need to rebuild. If this parameter is set, PTK_CMD_EXECUTE_TIMEOUT will take effect.
Copyright © 2011-2024 www.enmotech.com All rights reserved.