Commit 0a7c5be1 authored by ZhengJie's avatar ZhengJie
Browse files

[代码优化](v2.6):修复服务监控磁盘统计不准确的问题,修复本机IP获取不准确的问题

close https://github.com/elunez/eladmin/issues/527
parent d752b3d9
...@@ -77,7 +77,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -77,7 +77,7 @@ public class MonitorServiceImpl implements MonitorService {
String osName = System.getProperty("os.name"); String osName = System.getProperty("os.name");
long available = 0, total = 0; long available = 0, total = 0;
for (OSFileStore fs : fsArray){ for (OSFileStore fs : fsArray){
// windows 需要将所有磁盘分区累加 // windows 需要将所有磁盘分区累加,linux 和 mac 直接累加会出现磁盘重复的问题,待修复
if(osName.toLowerCase().startsWith(ElAdminConstant.WIN)) { if(osName.toLowerCase().startsWith(ElAdminConstant.WIN)) {
available += fs.getUsableSpace(); available += fs.getUsableSpace();
total += fs.getTotalSpace(); total += fs.getTotalSpace();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment