mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Allow enable the Java remote Debug for CloudStack Agent (#2897)
The idea is to create a property in /etc/defaults/cloudstack-agent that can be enabled/disabled (uncommented/commented) to control the enabling of Java remote debug in CloudStack's JVM.
This commit is contained in:
		
							parent
							
								
									92f8cda64a
								
							
						
					
					
						commit
						143fe5375c
					
				| @ -20,3 +20,7 @@ JAVA_HEAP_INITIAL=256m | ||||
| JAVA_HEAP_MAX=2048m | ||||
| JAVA_CLASS=com.cloud.agent.AgentShell | ||||
| JAVA_TMPDIR=/usr/share/cloudstack-agent/tmp | ||||
| 
 | ||||
| #You can uncomment this if you want to enable Java remote debugging. | ||||
| #Feel free to change the parameters at your will. The 'address' field defines the port to be used. | ||||
| #JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n" | ||||
|  | ||||
| @ -28,7 +28,7 @@ ExecStart=/bin/sh -ec '\ | ||||
|     export ACP=`ls /usr/share/cloudstack-agent/lib/*.jar /usr/share/cloudstack-agent/plugins/*.jar 2>/dev/null|tr "\\n" ":"`; \ | ||||
|     export CLASSPATH="$ACP:/etc/cloudstack/agent:/usr/share/cloudstack-common/scripts"; \ | ||||
|     mkdir -m 0755 -p ${JAVA_TMPDIR}; \ | ||||
|     ${JAVA} -Djava.io.tmpdir="${JAVA_TMPDIR}" -Xms${JAVA_HEAP_INITIAL} -Xmx${JAVA_HEAP_MAX} -cp "$CLASSPATH" $JAVA_CLASS' | ||||
|     ${JAVA} -Djava.io.tmpdir="${JAVA_TMPDIR}" -Xms${JAVA_HEAP_INITIAL} -Xmx${JAVA_HEAP_MAX} $JAVA_DEBUG -cp "$CLASSPATH" $JAVA_CLASS' | ||||
| Restart=always | ||||
| RestartSec=10s | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user