Configuration of DPF Server - main.customer.xml¶
??? Todo: Was davon läuft wirklich noch über die main.customer.xml und was über den Consul? Wird die main.customer.xml im laufenden Betrieb genutzt oder nur zur Initialisierung? Was ist bei Änderungen?
This chapter describes the configuration settings for:
- the DPF Server
- DPF Gate and its directories -> aktuell irrelevant
- DPF Job Cleaner
- DPF Process Manager
- DPF Watchdog -> obsolet
- DPF Working Unit Manager
- Accounting
-> Erweitern und anpassen an heutige main.customer.xml, siehe Master Version 3.3.1: M:\dpf_3.3.1\server\dpf\templates\main.customer.xml.tpl -> Teile raussuchen, und dann mit Entwicklern abklären
Hint - main.customer.xml
Customize the settings in server\dpf\templates\main.customer.xml
to prevent the settings from being overwritten when updating the DPF system.
File Format¶
The following elements of the XML configuration files are predetermined:
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
</config>
</DPF>
Each element possesses predetermined keywords which will be evaluated internally by the DPF system. In addition to the predetermined keywords, you may configure any keywords.
Hint - upper/lower case
Note that upper and lower case are considered when reading the configuration files! You must use the element names and keywords in the notation given in this documentation!
Server¶
For configuring the server for the DPF system and the servers of the remote <nodenames>
working unit, the following element is available in the <nodesname>
element:
In the <nodenames><node>
element, you configure the names of the servers for
the DPF systems and the remote working units. The following attributes are
available in the <nodenames><node>
element:
NAME
specifies the name of the server of the DPF system.
In the <nodenames><node><variable>
element, you can configure any servers of
the remote working units as variable variable. Then, you use this variable in
the configuration of the working units.
In the <nodenames><node><DEFAULTNODE>
element, you specify the server where
all working units are to be executed if no server has been specified in the configuration.
Example - simple remote system
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<nodenames>
<node NAME="dpf01">
<REMOTENODES>
dpf001 dpf006
</REMOTENODES>
<DEFAULTNODE>
%DB_HOST%
</DEFAULTNODE>
</node>
</nodenames>
...
</config>
</DPF>
Example - complex remote system with different CAD converters, test and productive systems
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<nodenames>
<node NAME="dpftst01">
<ACADNODES>
dpftst001
</ACADNODES>
<PROE_NODES>
dpftst003
</PROE_NODES>
<OFFICENODES>
dpftst004 dpftst005
</OFFICENODES>
<DEFAULTNODE>
%DB_HOST%
</DEFAULTNODE>
</node>
<node NAME="dpf01">
<ACADNODES>
dpf001
</ACADNODES>
<PROE_NODES>
dpf003
</PROE_NODES>
<OFFICENODES>
dpf004 dpf005
</OFFICENODES>
<DEFAULTNODE>
%DB_HOST%
</DEFAULTNODE>
</node>
</nodenames>
...
</config>
</DPF>
DPF Gate¶
For configuring DPF Gate, the following keywords are available in the <dpfgate>
element:
ARCHIV¶
ARCHIV
specifies the name of the directory where DPF Gate saves the jobs that were processed without errors.
Available values: String
-
<dir>
Successful jobs will be saved into the
<dir>
directory relatively to the process-specific subdirectory. -
""
Successful jobs will not be saved.
Default: ""
ERROR¶
ERROR
specifies the name of the directory where DPF Gate saves the erroneous jobs.
Available values: String
-
<dir>
Erroneous jobs will be saved into the dir directory relatively to the process-specific subdirectory.
-
""
Erroneous jobs will not be saved.
Default: error
LOGLEVEL (Gate)¶
LOGLEVEL
specifies the log level.
Available values: Enumeration
-
LOG_OFF
orOFF
No log messages
-
LOG_RUN
orR
Only start and stop messages; the identifier of these messages is
[R]
. -
LOG_FATAL
orF
LOG_RUN
and fatal error messages; the identifier of these messages is[F]
. -
LOG_ERROR
orE
LOG_FATAL
and all errors; the identifier of these messages is[E]
. -
LOG_WARN
orW
LOG_ERROR
and all warnings; the identifier of these messages is[W]
. -
LOG_INFO
orI
LOG_WARN
and info messages; the identifier of the messages is[I]
. -
LOG_DEBUG
orD
LOG_INFO
and debug messages; the identifier of these messages is[D]
. -
LOG_TRACE
orT
LOG_DEBUG
and trace messages; the identifier of these messages is[T]
.
Default: LOG_INFO
Large file
With LOG_TRACE
, the log files become very large and, therefore, slow down the system very much. For this reason, activate this log level only very selectively and deactivate it again as soon as possible!
LOGSIZE (Gate)¶
LOGSIZE
specifies the maximum size of the DPF Gate log file in KB. When reaching the specified size, the log file will be saved with the extension .old
and a new log file will be started. If a file with the .old
extension already exists, it will be overwritten.
Available values: Integer
Default: 1000
RDY¶
RDY
specifies the extension of the files triggering the processing by DPF Gate.
Available values: String
-
<ext1>
<ext2>
...<extn>
As soon as a file with one of the specified extensions is stored in the directory, processing by DPF Gate will start.
Default: rdy
SGATE¶
SGATE
specifies the name of the directory where the process-specific subdirectories containing the jobs are located.
Available values: String
-
<dir>
The process-specific subdirectories are expected in the
<dir>
directory.
Default: %PLSDATA%\io\dpfgate
SLEEP¶
SLEEP
specifies the waiting time in seconds after that DPF Gate checks the directory again.
Available values: Integer
Default: 4
Example (Gate)¶
Example configuration of DPF Gate
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<dpfgate
LOGLEVEL="LOG_INFO"
LOGSIZE="1000"
SLEEP="4"
RDY="rdy"
SGATE="%PLSDATA%/io/dpfgate"
ERROR="error"
ARCHIV=""
/>
...
</config>
</DPF>
DPF Gate Directories¶
In the <directories><directory>
element, you can configure the names of the DPF Gate directories for each process. The following attributes are available in the <directories><directory>
element:
name
specifies the name of the directory where the jobs are searched for.workflow
specifies the name of the process to that the jobs in the directory will be assigned.
jobParameters¶
In the <directories><directory><jobParameters>
element, you can configure any job parameters for each process.
The following attributes are available in the <directories><directory><jobParameters><jobParameter>
element:
name
specifies the name of the parameter for the jobs. namevalue
specifies the values of the parameter for the jobs.
Example (Directories)¶
Example configuration of DPF Gate directories
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<directories>
<directory name="tiff2pdf" workflow="dpf4view.prepare_single">
<jobParameters>
<jobParameter name="CURRFILETYPE" value="TIFF" />
<jobParameter name="JobName" value="Gate tiff2pdf" />
<jobParameter name="JobUserName" value="tiff2pdf Test" />
<jobParameter name="DPF4C_MODIFY_STAMP" value="Y" />
<jobParameter name="DPF4C_MODIFY_STAMP_N_0" value="Stamp 0" />
</jobParameters>
</directory>
<directory name="gif2pdf" workflow="dpf4view.prepare_single">
<jobParameters>
<jobParameter name="CURRFILETYPE" value="GIF" />
<jobParameter name="JobName" value="Gate gif2pdf" />
<jobParameter name="JobUserName" value="gif2pdf Test" />
<jobParameter name="DPF4C_MODIFY_STAMP" value="Y" />
<jobParameter name="DPF4C_MODIFY_STAMP_N_0" value="Stamp 0" />
</jobParameters>
</directory>
</directories>
...
</config>
</DPF>
Literature - DPF Gate configuration
Refer to Installation and Configuration of DPF Gate.
DPF Job Cleaner¶
DPF Job Cleaner deletes the finished jobs from the job files’ directory and the MongoDB database. The jobs are deleted in two steps:
- In the first step, the job files are deleted.
- In the second step, the complete job directory is deleted that means the information about the job.
For configuring DPF Job Cleaner, the following keywords are available in the <jobcleaner>
element:
DELETEJOB (Job Cleaner)¶
DELETEJOB
specifies the deletion time of the job files.
Available values: String
-
atonce
The job files will be deleted right after the processing.
-
never
The job files will never be deleted.
-
<week>
W<day>
D<hour>
H<minute>
M<second>
SThe job files will be deleted after reaching the specified time.
Default: never
Hint - evaluation
The keyword is only evaluated if it is not specified with the job.
ERR_DELETEJOB¶
ERR_DELETEJOB
specifies the deletion time of the job files of the erroneous jobs.
Available values: String
-
atonce
The job files of the erroneous jobs will be deleted right after the processing.
-
never
The job files of the erroneous jobs will never be deleted.
-
<week>
W<day>
D<hour>
H<minute>
M<second>
SThe job files of the erroneous jobs will be deleted after reaching the specified time.
Default: never
Hint - evaluation
The keyword is only evaluated if it is not specified with the job.
FORGETJOB¶
FORGETJOB
specifies the deletion time of the job directory.
Available values: String
-
atonce
The job directory will be deleted right after the processing.
-
never
The job directory will never be deleted.
-
<week>
W<day>
D<hour>
H<minute>
M<second>
SThe job directory will be deleted after reaching the specified time.
Default: never
Hint - evaluation
The keyword is only evaluated if it is not specified with the job.
INSTANCES (Job Cleaner)¶
INSTANCES
specifies the number of processes for DPF Job Cleaner.
Available values: Integer
Default: 1
KEEPUNTILFORGET¶
KEEPUNTILFORGET
specifies the name of the job files kept until the job directory will be deleted. Wildcards are not possible here.
Available values: String
-
<file1>
<file2>
...<filen>
The
<file1>
<file2>
...<filen>
files are kept.
Default: job.dat
joborig.dat
job.log
ORIGFILENAME
Hint - evaluation
The keyword is only evaluated if it is not specified with the job.
LOGLEVEL (Job Cleaner)¶
LOGLEVEL
specifies the log level.
Available values: Enumeration
-
LOG_OFF
orOFF
No log messages
-
LOG_RUN
orR
Only start and stop messages; the identifier of these messages is
[R]
. -
LOG_FATAL
orF
LOG_RUN
and fatal error messages; the identifier of these messages is[F]
. -
LOG_ERROR
orE
LOG_FATAL
and all errors; the identifier of these messages is[E]
. -
LOG_WARN
orW
LOG_ERROR
and all warnings; the identifier of these messages is[W]
. -
LOG_INFO
orI
LOG_WARN
and info messages; the identifier of the messages is[I]
. -
LOG_DEBUG
orD
LOG_INFO
and debug messages; the identifier of these messages is[D]
. -
LOG_TRACE
orT
LOG_DEBUG
and trace messages; the identifier of these messages is[T]
.
Default: LOG_INFO
Large file
With LOG_TRACE
, the log files become very large and, therefore, slow down the system very much. For this reason, activate this log level only very selectively and deactivate it again as soon as possible!
LOGSIZE (Job Cleaner)¶
LOGSIZE
specifies the maximum size of the DPF Job Cleaner log file in KB. When reaching the specified size, the log file will be saved with the extension .old
and a new log file will be started. If a file with the .old
extension already exists, it will be overwritten.
Available values: Integer
Default: 1000
RETRY_FORGETJOB¶
RETRY_FORGETJOB
specifies the time after that DPF Job Cleaner retries deleting the job information when an error occurred. ??? Todo: Überprüfen, ob das so stimmt
Available values: String
-
<week>
W<day>
D<hour>
H<minute>
M<second>
SDPF Job Cleaner retries deleting the job information after reaching the specified time.
Default: 1m
RETRY_DELETEJOB¶
RETRY_DELETEJOB
specifies the time after that DPF Job Cleaner retries deleting the job files when an error occurred. ??? Todo: Überprüfen, ob das so stimmt
Available values: String
-
<week>
W<day>
D<hour>
H<minute>
M<second>
SDPF Job Cleaner retries deleting the job files after reaching the specified time.
Default: 1m
SLEEP_MILLI_SECONDS (Job Cleaner)¶
SLEEP_MILLI_SECONDS
specifies the number of milliseconds after that DPF Job Cleaner asks the MongoDB database if there is something to do. ??? Todo: Überprüfen, ob das so stimmt? Oder kommt da NATS dazwischen?
Available values: Integer
Default: 250
VERSION¶
VERSION
specifies the version of DPF Job Cleaner. ??? Todo: Specifies? Or Outputs?
Example (Job Cleaner)¶
Example configuration of DPF Job Cleaner
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<jobcleaner
VERSION="$Id: main.xml ... Exp $"
LOGLEVEL="LOG_INFO"
LOGSIZE="1000"
INSTANCES="1"
SLEEP_MILLI_SECONDS="250"
DELETEJOB="3h"
ERR_DELETEJOB="4d"
FORGETJOB="2d"
RETRY_FORGETJOB="1m"
KEEPUNTILFORGET="job.dat joborig.dat job.log
ORIGFILENAME"
</jobcleaner>
...
</config>
</DPF>
DPF Process Manager¶
For configuring DPF Process Manager, the following keywords are available in
the
INSTANCES (Process Manager)¶
INSTANCES
specifies the number of processes for DPF Process Manager.
Available values: Integer
Default: 1
LOGLEVEL (Process Manager)¶
LOGLEVEL
specifies the log level.
Available values: Enumeration
-
LOG_OFF
orOFF
No log messages
-
LOG_RUN
orR
Only start and stop messages; the identifier of these messages is
[R]
. -
LOG_FATAL
orF
LOG_RUN
and fatal error messages; the identifier of these messages is[F]
. -
LOG_ERROR
orE
LOG_FATAL
and all errors; the identifier of these messages is[E]
. -
LOG_WARN
orW
LOG_ERROR
and all warnings; the identifier of these messages is[W]
. -
LOG_INFO
orI
LOG_WARN
and info messages; the identifier of the messages is[I]
. -
LOG_DEBUG
orD
LOG_INFO
and debug messages; the identifier of these messages is[D]
. -
LOG_TRACE
orT
LOG_DEBUG
and trace messages; the identifier of these messages is[T]
.
Default: LOG_INFO
Large file
With LOG_TRACE
, the log files become very large and, therefore, slow down the system very much. For this reason, activate this log level only very selectively and deactivate it again as soon as possible!
LOGSIZE (Process Manager)¶
LOGSIZE
specifies the maximum size of the DPF Process Manager log file in KB. When reaching the specified size, the log file will be saved with the extension .old
and a new log file will be started. If a file with the .old
extension already exists, it will be overwritten.
Available values: Integer
Default: 1000
NODENAMES (Process Manager)¶
NODENAMES
specifies the servers where DPF Process Manager is started.
Available values: String
-
<server1>
<server2>
...<servern>
List of servers where DPF Process Manager is started
-
local`host
DPF Process Manager is started on every server where sysstart is called.
Default: localhost
SLEEP_MILLI_SECONDS (Process Manager)¶
SLEEP_MILLI_SECONDS
specifies the number of milliseconds after that DPF Process Manager asks the MongoDB database if there is something to do. ??? Todo: Überprüfen, ob das so stimmt? Oder kommt da NATS dazwischen?
Available values: Integer
Default: 100
THREADS (Process Manager)¶
THREADS
specifies the number of threads for DPF Process Manager.
Available values: Integer
Default: 1
WARN_BEFORE_LICENSE_EXPIRES¶
WARN_BEFORE_LICENSE_EXPIRES
specifies the number of days and weeks as of which a warning will be output before the license will expire.
Available values: String
-
<week>
W<day>
DAs of the specified number of
<days>
and<weeks>
, a warning is output before the license will expire.
Default: 14d
Example (Process Manager)¶
Example configuration of DPF Process Manager
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<processmanager
LOGLEVEL="LOG_INFO"
LOGSIZE="1000"
THREADS="1"
INSTANCES="1"
WARN_BEFORE_LICENSE_EXPIRES="100"
NODENAMES="localhost"
SLEEP_MILLI_SECONDS="100"
/>
...
</config>
</DPF>
DPF Watchdog¶
For configuring DPF Watchdog, the following keywords are available in the
CHECK_INTERVAL¶
CHECK_INTERVAL
specifies a factor for the time period in SLEEP_MILLI_SECONDS
. After this time period, DPF Watchdog checks if the processes are still running.
Available values: Integer
Default: 100
KILL_COMMAND¶
KILL_COMMAND
specifies the command for stopping the processes.
Available values: String
Default: nkill -sKILL -cr -no -pid %PID%
LOGLEVEL (Watchdog)¶
LOGLEVEL
specifies the log level.
Available values: Enumeration
-
LOG_OFF
orOFF
No log messages
-
LOG_RUN
orR
Only start and stop messages; the identifier of these messages is
[R]
. -
LOG_FATAL
orF
LOG_RUN
and fatal error messages; the identifier of these messages is[F]
. -
LOG_ERROR
orE
LOG_FATAL
and all errors; the identifier of these messages is[E]
. -
LOG_WARN
orW
LOG_ERROR
and all warnings; the identifier of these messages is[W]
. -
LOG_INFO
orI
LOG_WARN
and info messages; the identifier of the messages is[I]
. -
LOG_DEBUG
orD
LOG_INFO
and debug messages; the identifier of these messages is[D]
. -
LOG_TRACE
orT
LOG_DEBUG
and trace messages; the identifier of these messages is[T]
.
Default: LOG_INFO
Large file
With LOG_TRACE
, the log files become very large and, therefore, slow down the system very much. For this reason, activate this log level only very selectively and deactivate it again as soon as possible!
LOGSIZE (Watchdog)¶
LOGSIZE
specifies the maximum size of the DPF Watchdog log file in KB. When reaching the specified size, the log file will be saved with the extension .old
and a new log file will be started. If a file with the .old
extension already exists, it will be overwritten.
Available values: Integer
Default: 1000
RESTART_COMMAND¶
RESTART_COMMAND
specifies the command for restarting the processes.
Available values: String
Default: %DPFSRV%\dpfstart.pl
RESTART_HANG_COMMAND¶
RESTART_HANG_COMMAND
specifies the command for restarting the processes after DPF Watchdog detected a missing component or a crash.
Available values: String
Default: %DPFSRV%\dpfrestart.pl
SLEEP_MILLI_SECONDS (Watchdog)¶
SLEEP_MILLI_SECONDS
specifies the number of milliseconds after that DPF Watchdog asks the MongoDB database if there is something to do. ??? Todo: Stimmt das so?
Available values: Integer
Default: 250
WARN_BELOW_DISK_SPACE¶
WARN_BELOW_DISK_SPACE
specifies the size of free disc space in GB below that DPF Watchdog outputs a warning into the log file, watchdog1.log
.
Available values: Float
Default: 2.0
WARN_BELOW_MEMORY¶
WARN_BELOW_MEMORY
specifies the size of free memory space in GB below that DPF Watchdog outputs a warning into the log file, watchdog1.log
.
Available values: Float
Default: 0.25
Example (Watchdog)¶
Example configuration of DPF Watchdog
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<watchdog
LOGLEVEL="LOG_INFO"
LOGSIZE="1000"
SLEEP_MILLI_SECONDS="250"
CHECK_INTERVAL="100"
RESTART_COMMAND="%DPFSRV%\dpfstart.pl"
RESTART_HANG_COMMAND="%DPFSRV%\dpfrestart.pl"
KILL_COMMAND="nkill -sKILL -cr -no -pid %PID%"
WARN_BELOW_DISK_SPACE="0.2"
WARN_BELOW_MEMORY="0.5"
/>
...
</config>
</DPF>
DPF Working Unit Manager¶
For configuring DPF Working Unit Manager, the following keywords are available in the
LOGLEVEL (WU Manager)¶
LOGLEVEL
specifies the log level.
Available values: Enumeration
-
LOG_OFF
orOFF
No log messages
-
LOG_RUN
orR
Only start and stop messages; the identifier of these messages is
[R]
. -
LOG_FATAL
orF
LOG_RUN
and fatal error messages; the identifier of these messages is[F]
. -
LOG_ERROR
orE
LOG_FATAL
and all errors; the identifier of these messages is[E]
. -
LOG_WARN
orW
LOG_ERROR
and all warnings; the identifier of these messages is[W]
. -
LOG_INFO
orI
LOG_WARN
and info messages; the identifier of the messages is[I]
. -
LOG_DEBUG
orD
LOG_INFO
and debug messages; the identifier of these messages is[D]
. -
LOG_TRACE
orT
LOG_DEBUG
and trace messages; the identifier of these messages is[T]
.
Default: LOG_INFO
Large file
With LOG_TRACE
, the log files become very large and, therefore, slow down the system very much. For this reason, activate this log level only very selectively and deactivate it again as soon as possible!
LOGSIZE (WU Manager)¶
LOGSIZE
specifies the maximum size of the DPF Working Unit Manager log file in KB. When reaching the specified size, the log file will be saved with the extension .old
and a new log file will be started. If a file with the .old
extension already exists, it will be overwritten.
Available values: Integer
Default: 1000
NODENAMES (WU Manager)¶
NODENAMES
specifies the servers where DPF Working Unit Manager is started.
Available values: String
-
<server1>
<server2>
...<servern>
List of servers where DPF Working Unit Manager is started
-
localhost
DPF Working Unit Manager is started on every server where sysstart is called.
Default: localhost
SLEEP_MILLI_SECONDS (WU Manager)¶
SLEEP_MILLI_SECONDS
specifies the number of milliseconds after that DPF Working Unit Manager asks the MongoDB database if there is something to do. ??? Todo: Stimmt das so?
Available values: Integer
Default: 250
THREADS (WU Manager)¶
THREADS
specifies the number of threads for DPF Working Unit Manager.
Available values: Integer
Default: 10
Example (WU Manager)¶
Example configuration of DPF Working Unit Manager
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<workingunit
LOGLEVEL="LOG_INFO"
LOGSIZE="1000"
THREADS="10"
NODENAMES="localhost"
SLEEP_MILLI_SECONDS="100"
/>
...
</config>
</DPF>
Accounting¶
In the accounting, values are logged which then for example can be evaluated in a statistic. For each job, a line containing the values of the configured parameters are written into the accounting file.
For configuring the accounting, the following keywords are available in the <accounting>
element:
LOGFORMAT¶
LOGFORMAT
specifies the text and parameters enclosed by %
that are written into the accounting file for each job. Here, you can specify any text and all parameters that are set at the end of the job. Unless the parameter is set, the field remains empty.
Available values: String
Default: %JOB_TIMESTAMP_BEGIN%;%JOB_TIMESTAMP_END%;%JOBID%;%WFNAME%;%ORIGUSERNAME%;%ORIGHOSTNAME%;%JOBSTATUS%
LOGLEVEL (Accounting)¶
LOGLEVEL
specifies here if the line is written into the accounting file.
Available values: Enumeration
-
LOG_OFF
orOFF
Nothing is written into the accounting file.
-
LOG_INFO
orI
The line is written into the accounting file.
Default: LOG_INFO
LOGNAME¶
LOGNAME
specifies the base name of the accounting file.
Available values: String
-
<basename>
The
<basename>.log
file will be created in the log directory,data\log
.
Default: account
LOGSIZE (Accounting)¶
LOGSIZE
specifies the size of the accounting file in KB. When reaching the specified size, the accounting file will be saved with the extension .old
and a new accounting file will be started. If a saved accounting file with the .old
extension already exists, it will be overwritten.
Available values: Integer
Default: 1000
Example (Accounting)¶
Example configuration of accounting
<?xml version="1.0" encoding="ISO-8859-1"?>
<DPF>
<config>
...
<accounting
LOGNAME="account"
LOGLEVEL="LOG_INFO"
LOGSIZE="1000"
LOGFORMAT="%JOB_TIMESTAMP_BEGIN%;%JOB_TIMESTAMP_END%;%JOBID%;%WFNAME%;%ORIGUSERNAME%;%ORIGHOSTNAME%;%JOBSTATUS%"
/>
...
</config>
</DPF>