4

In Jenkins 1580.3 the slave is being launched via execution of a command on the master node like this:

ssh jenkins@host "/path/to/java -jar /path/to/slave.jar"

What I need to do is set the max heap size to a different value and enable verbose GC logging to a file:

ssh jenkins@host "-Xmx6g -verbose:gc -Xloggc:/path/to/GC.lo /path/to/java -jar /path/to/slave.jar"

But I get various errors when trying to launch the slave, depending on what first comes in the command: Unknown mac "xmx6g" for example. Is there a way to launch a slave with the desired parameters with this launch method?

Zloj
  • 2,040
  • 2
  • 16
  • 27

1 Answers1

5

Change :

ssh jenkins@host "-Xmx6g -verbose:gc -Xloggc:/path/to/GC.lo /path/to/java -jar /path/to/slave.jar"

To :

ssh jenkins@host "/path/to/java -Xmx6g -verbose:gc -Xloggc:/path/to/GC.lo  -jar /path/to/slave.jar"
CKing
  • 14,153
  • 4
  • 39
  • 77