[ https://issues.apache.org/jira/browse/ZOOKEEPER-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andor Molnar reassigned ZOOKEEPER-4792: --------------------------------------- Assignee: Yan Zhao > Tune the env log at the start of the process > -------------------------------------------- > > Key: ZOOKEEPER-4792 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4792 > Project: ZooKeeper > Issue Type: Improvement > Components: server > Affects Versions: 3.9.1 > Reporter: Yan Zhao > Assignee: Yan Zhao > Priority: Minor > Labels: pull-request-available > Fix For: 3.10 > > Time Spent: 50m > Remaining Estimate: 0h > > At the start of the process, it will print the env info in the log. > There are three logs for the memory metrics. > {code:java} > // Get memory information. > Runtime runtime = Runtime.getRuntime(); > int mb = 1024 * 1024; > put(l, "os.memory.free", runtime.freeMemory() / mb + "MB"); > put(l, "os.memory.max", runtime.maxMemory() / mb + "MB"); > put(l, "os.memory.total", runtime.totalMemory() / mb + "MB"); > {code} > https://github.com/apache/zookeeper/blob/9e40464d98319b4553d93b12c6d7db4d240bbce9/zookeeper-server/src/main/java/org/apache/zookeeper/Environment.java#L88-L90 > It's misleading for the user, use jvm as the prefix will be better. > Change to: > {code:java} > // Get memory information. > Runtime runtime = Runtime.getRuntime(); > int mb = 1024 * 1024; > put(l, "jvm,.memory.free", runtime.freeMemory() / mb + "MB"); > put(l, "jvm.memory.max", runtime.maxMemory() / mb + "MB"); > put(l, "jvm.memory.total", runtime.totalMemory() / mb + "MB"); > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)