This is an automated email from the ASF dual-hosted git repository.

spricoder pushed a commit to branch feature/linux-memory
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/feature/linux-memory by this 
push:
     new ebafeffd449 update union
ebafeffd449 is described below

commit ebafeffd449672e816a8715cebedb8198663f16c
Author: spricoder <[email protected]>
AuthorDate: Sat Apr 13 23:31:30 2024 +0800

    update union
---
 .../org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java
 
b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java
index 31e1cba9d08..e888f4d551d 100644
--- 
a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java
+++ 
b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java
@@ -195,7 +195,7 @@ public class SystemMetrics implements IMetricSet {
           new BufferedReader(new InputStreamReader(process.getInputStream()))) 
{
         String line;
         while ((line = input.readLine()) != null) {
-          result.append(line + "\n");
+          result.append(line).append("\n");
         }
       }
       logger.error(result.toString());
@@ -209,7 +209,7 @@ public class SystemMetrics implements IMetricSet {
                 MetricLevel.CORE,
                 SystemTag.NAME.toString(),
                 linuxMemoryTitles[i - 1])
-            .set(Long.parseLong(memParts[i]));
+            .set(Long.parseLong(memParts[i]) * 1024);
       }
     } catch (IOException e) {
       logger.warn("Failed to get memory, because ", e);

Reply via email to