Filip Nowak created DAEMON-323:
----------------------------------

             Summary: A variable substitution for JVM arguments
                 Key: DAEMON-323
                 URL: https://issues.apache.org/jira/browse/DAEMON-323
             Project: Commons Daemon
          Issue Type: Improvement
          Components: Procrun
            Reporter: Filip Nowak


Server's java application are recommended (required?) to log JVM's garbage 
collector (gc) activity. 
Unfortunately JVM does not append entries to existing gc log but truncates it. 
It is often addressed by making gc log file name unique so that consecutive 
application (JVM) starts do not overwrite their gc log files, e.g. by adding 
timestamp to GC log file name. Sample JVM arguments for unix:
{code}
-Xmx2G -XX:+PrintGCDetails -XX:+PrintGCDateStamps 
-Xloggc:"./log/server_gc_`date '%Y%m%d_%H%M%S'`.log" -XX:+UseGCLogFileRotation 
-XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=10M
{code}
(in Windows, timestamp can be get from {{wmic os get LocalDateTime}})

This approach do not seem to be possible with procrun at the moment  (probably 
with jsvc as well, besides running JVM from a batch). 

Please add a support for optional custom variable (with fixed or configured 
name) which is substituted to current timestamp by Prunsrv at JVM startup. 
Similar variables for PID, hostname etc could also be useful.

PS: Java 8 has support for {{%p}} variable resolved to PID.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to