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

close https://github.com/elunez/eladmin/issues/527
pull/545/head
ZhengJie 2020-11-22 20:21:28 +08:00
parent d752b3d9cc
commit 0a7c5be1da
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ public class MonitorServiceImpl implements MonitorService {
String osName = System.getProperty("os.name");
long available = 0, total = 0;
for (OSFileStore fs : fsArray){
// windows 需要将所有磁盘分区累加
// windows 需要将所有磁盘分区累加linux 和 mac 直接累加会出现磁盘重复的问题,待修复
if(osName.toLowerCase().startsWith(ElAdminConstant.WIN)) {
available += fs.getUsableSpace();
total += fs.getTotalSpace();