cancel
Showing results for 
Search instead for 
Did you mean: 

Allow SADIAGDIR to be set by DB server start-up parameters

justin_willey
Participant
0 Kudos
4,054

Currently the location of diagnostic data dumps etc is determined by an environment variable SADIAGDIR. This applies to all engines running on the server - unlike TEMPDIR etc there is no option to set it in the db engine startup parameters.

This is a pain for two reasons if you run multiple servers:

  • all server have to be stopped before any change takes effect
  • all diagnostic information ends up in the same place

This is particularly problematic when one is trying to save full cache dumps and lots of RAM (eg 100GB + ) is in use!

Ideally, one could set a SADIAGDIR setting per d engine in the start-up parameters which would override anything else just like the temporary folder settings do).

Accepted Solutions (0)

Answers (1)

Answers (1)

MarkCulp
Participant

Perhaps I am not understanding the problem - Why can't you set the environment variable SADIAGDIR to different values before you start each server? i.e. just before spawning the server set the variable.

E.g. (syntax will vary depending on shell being used)

set SADIAGDIR=/path/to/location/1
dbspawn dbsrv16 -n server1 foo.db

set SADIAGDIR=/a/different/path/2
dbspawn dbsrv16 -n server 2 bar.db

Server1 will dump data into /path/to/location/1 and server2 will dump data into /a/different/path/2

justin_willey
Participant
0 Kudos

Do you mean that each instance uses the value of SADIAGDIR that was current when it was started, ignoring any later changes?

VolkerBarth
Contributor
0 Kudos

Yes. By design, a process uses its own "share of environment variables", i.e. when the process is started, he inherits those from the parent process (say, a shell), and further modifications of the parent's process environment do not influence the new process (and vice versa).