File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -227,11 +227,11 @@ private void updateLinuxSystemMemInfo() {
227227 result .append (line ).append ("\n " );
228228 }
229229 }
230- String [] lines = result .toString ().split ("\n " );
230+ String [] lines = result .toString ().trim (). split ("\n " );
231231 // if failed to get result
232232 if (lines .length >= 2 ) {
233233 String [] memParts = lines [1 ].trim ().split ("\\ s+" );
234- if (memParts .length = = linuxMemoryTitles .length ) {
234+ if (memParts .length > = linuxMemoryTitles .length ) {
235235 usedMemory = Long .parseLong (memParts [2 ]) * 1024 ;
236236 sharedMemory = Long .parseLong (memParts [4 ]) * 1024 ;
237237 buffCacheMemory = Long .parseLong (memParts [5 ]) * 1024 ;
You can’t perform that action at this time.
0 commit comments