Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
0a7c5be1
Commit
0a7c5be1
authored
Nov 22, 2020
by
ZhengJie
Browse files
[代码优化](v2.6):修复服务监控磁盘统计不准确的问题,修复本机IP获取不准确的问题
close
https://github.com/elunez/eladmin/issues/527
parent
d752b3d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MonitorServiceImpl.java
View file @
0a7c5be1
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment