Difference between revisions of "Seon Core environment variables"
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | Environment variables are created and/or set by all Seon binaries, which values are based on the configuration of Seon. These variables are: | |
| − | *<code>Seon_CFGFILE</code>: Seon main configuration file (absolute path information) | + | *<code>Seon_CFGFILE</code>: [[Seon Core main configuration file|Seon main configuration file (absolute path information)]] |
| − | *<code>Seon_IN_DIR</code>: incoming data directory | + | *<code>Seon_IN_DIR</code>: [[Seon_Core_configuration#data_incoming_directory|incoming data directory]] |
| − | *<code>Seon_OUT_DIR</code>: outgoing data directory | + | *<code>Seon_OUT_DIR</code>: [[Seon_Core_configuration#data_outgoing_directory|outgoing data directory]] |
| − | *<code>Seon_TMP_DIR</code>: temporary data directory | + | *<code>Seon_TMP_DIR</code>: [[Seon_Core_configuration#temporary_directory|temporary data directory]] |
| − | *<code>Seon_BIN_DIR</code>: binary program directory | + | *<code>Seon_BIN_DIR</code>: [[Seon_Core_configuration#binary_installation_directory|binary program directory]] |
| − | *<code>Seon_SCRIPT_DIR</code>: script installation directory | + | *<code>Seon_SCRIPT_DIR</code>: [[Seon_Core_configuration#script_installation_directory|script installation directory]] |
| − | *<code>Seon_BACKUP_DIR</code>: backup directory | + | *<code>Seon_BACKUP_DIR</code>: [[Seon_Core_configuration#database_backup_directory|backup directory]] |
| − | *<code>RAND_FILE</code>: entropy file for OFTP2 needs | + | *<code>RAND_FILE</code>: [[Seon_Core_configuration#Entropy_file_for_random_data|entropy file for OFTP2 needs]] |
| − | *<code>OPENSSL_BIN</code>: absolute path to openSSL binary | + | *<code>OPENSSL_BIN</code>: [[Seon_Core_configuration#absolute_path_to_.27openssl.27|absolute path to openSSL binary]] |
| − | *<code>RRDTOOL_BIN</code>: absolute path to RRDtools binary | + | *<code>RRDTOOL_BIN</code>: [[Seon_Core_configuration#absolute_path_to_.27rrdtool.27|absolute path to RRDtools binary]] |
| − | *<code>RRDB_DATAPATH</code>: RRD data path | + | *<code>RRDB_DATAPATH</code>: [[Seon_Core_configuration#RRDB_data_path|RRD data path]] |
*<code>Seon_WEBGUI_DIR</code>: web interface installation directory | *<code>Seon_WEBGUI_DIR</code>: web interface installation directory | ||
| − | *<code> | + | *<code>CA_FILE</code>: [[Seon_Core_configuration#root_certificate_file_.26_root_certificate_path|configured absolute path to the root certificate file]] |
| − | *<code> | + | *<code>CA_PATH</code>: [[Seon_Core_configuration#root_certificate_file_.26_root_certificate_path|configured absolute path to the root certificate directory]] |
| − | *<code> | + | |
| + | The following environment variables are extracted form the global Seon configuration file (default: <code>/etc/seon.conf</code>): | ||
| + | *<code>Seon_DB_HOST</code> | ||
| + | *<code>Seon_DB_USER</code> | ||
| + | *<code>Seon_DB_PWD</code> | ||
| + | *<code>Seon_DB_NAME</code> | ||
| + | *<code>Seon_DB_SOCKET</code> | ||
| + | *<code>Seon_DB_PORT</code> | ||
| + | *<code>Seon_DB_TYPE</code>: either "<code>mysql</code>", "<code>DB2</code>" or "<code>sqlite3</code>" | ||
| + | |||
All processes started by Seon (event scripts, plugins, etc.) have access to these environment variables. | All processes started by Seon (event scripts, plugins, etc.) have access to these environment variables. | ||
| Line 20: | Line 29: | ||
*you may start Seon programs in a shell where this variable is set without using the parameter "<code>-C</code>" for all binaries (because the environment variable points to the correct position of the configfile) | *you may start Seon programs in a shell where this variable is set without using the parameter "<code>-C</code>" for all binaries (because the environment variable points to the correct position of the configfile) | ||
*all subsequent processes started by Seon (like event scripts) don't have to bother about the given configfile (like plugins of Seon Enterprise). | *all subsequent processes started by Seon (like event scripts) don't have to bother about the given configfile (like plugins of Seon Enterprise). | ||
| + | |||
| + | == Database performance benchmarking == | ||
| + | Available in Seon 3 Core, an environment variable can be set to log all database access timing information into that given file: | ||
| + | Seon_DB_BENCHMARKLOG | ||
| + | You can set this variable to an absolute filename where Seon logs all innformation (example: "ksh" or "bash"): | ||
| + | export Seon_DB_BENCHMARKLOG=/tmp/db2perf.log | ||
| + | This file logs the connect and query time for every single database access, resulting in a fast growing file. The content if this file looks like this (using DB2 database abstraction layer, others like MySQL start with "<code>MySQL</code>"): | ||
| + | <pre> | ||
| + | DB2 connect: 0.052482 seconds | ||
| + | DB2 SQL query: 0.126631 seconds | ||
| + | DB2 connect: 0.032447 seconds | ||
| + | DB2 SQL query: 0.004983 seconds | ||
| + | DB2 connect: 0.029555 seconds | ||
| + | DB2 SQL query: 0.004500 seconds | ||
| + | DB2 connect: 0.031012 seconds | ||
| + | DB2 SQL query: 0.001324 seconds | ||
| + | </pre> | ||
Latest revision as of 08:13, 25 August 2017
Environment variables are created and/or set by all Seon binaries, which values are based on the configuration of Seon. These variables are:
Seon_CFGFILE: Seon main configuration file (absolute path information)Seon_IN_DIR: incoming data directorySeon_OUT_DIR: outgoing data directorySeon_TMP_DIR: temporary data directorySeon_BIN_DIR: binary program directorySeon_SCRIPT_DIR: script installation directorySeon_BACKUP_DIR: backup directoryRAND_FILE: entropy file for OFTP2 needsOPENSSL_BIN: absolute path to openSSL binaryRRDTOOL_BIN: absolute path to RRDtools binaryRRDB_DATAPATH: RRD data pathSeon_WEBGUI_DIR: web interface installation directoryCA_FILE: configured absolute path to the root certificate fileCA_PATH: configured absolute path to the root certificate directory
The following environment variables are extracted form the global Seon configuration file (default: /etc/seon.conf):
Seon_DB_HOSTSeon_DB_USERSeon_DB_PWDSeon_DB_NAMESeon_DB_SOCKETSeon_DB_PORTSeon_DB_TYPE: either "mysql", "DB2" or "sqlite3"
All processes started by Seon (event scripts, plugins, etc.) have access to these environment variables.
The environment variable "Seon_CFGFILE" points to the absolute path to the Seon main configuration file. This has two effects:
- you may start Seon programs in a shell where this variable is set without using the parameter "
-C" for all binaries (because the environment variable points to the correct position of the configfile) - all subsequent processes started by Seon (like event scripts) don't have to bother about the given configfile (like plugins of Seon Enterprise).
Database performance benchmarking
Available in Seon 3 Core, an environment variable can be set to log all database access timing information into that given file:
Seon_DB_BENCHMARKLOG
You can set this variable to an absolute filename where Seon logs all innformation (example: "ksh" or "bash"):
export Seon_DB_BENCHMARKLOG=/tmp/db2perf.log
This file logs the connect and query time for every single database access, resulting in a fast growing file. The content if this file looks like this (using DB2 database abstraction layer, others like MySQL start with "MySQL"):
DB2 connect: 0.052482 seconds DB2 SQL query: 0.126631 seconds DB2 connect: 0.032447 seconds DB2 SQL query: 0.004983 seconds DB2 connect: 0.029555 seconds DB2 SQL query: 0.004500 seconds DB2 connect: 0.031012 seconds DB2 SQL query: 0.001324 seconds