XiaoZYang commented on a change in pull request #393: Polish the default JVM 
options for namesrv and broker
URL: https://github.com/apache/rocketmq/pull/393#discussion_r209166284
 
 

 ##########
 File path: distribution/bin/runserver.sh
 ##########
 @@ -37,7 +37,16 @@ export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
 # JVM Configuration
 
#===========================================================================================
 # Get the max heap used by a jvm, which used all the ram available to the 
container.
-MAX_POSSIBLE_HEAP=$(java -XX:+UnlockExperimentalVMOptions -XX:MaxRAMFraction=1 
-XshowSettings:vm -version |& awk '/Max\. Heap Size \(Estimated\): [0-9KMG]+/{ 
print $5}' | gawk -f to_bytes.gawk)
+MAX_POSSIBLE_HEAP_STR=$(java -XX:+UnlockExperimentalVMOptions 
-XX:MaxRAMFraction=1 -XshowSettings:vm -version |& awk '/Max\. Heap Size 
\(Estimated\): [0-9KMG]+/{ print $5}')
 
 Review comment:
   @huanwei  Is it a typo here? It should be `|` instead of `|&`.
   And after I replace `|&` with `|`, When I run the script by `bash mqnamesrv 
-n localhost:9876` I got an error with message: `Invalid maximum heap size: 
-Xmx0`. By the way, the code is cloned from your github.
   Would you mind re-checking your awk script here? 
   My development environment is:
   - OS: MacOS Elcaption 10.11
   - java version: 1.8.0_172
   - bash version: 3.2.57

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to