summaryrefslogtreecommitdiff
path: root/src/com/nis/systeminfo/model/SystemInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/nis/systeminfo/model/SystemInfo.java')
-rw-r--r--src/com/nis/systeminfo/model/SystemInfo.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/nis/systeminfo/model/SystemInfo.java b/src/com/nis/systeminfo/model/SystemInfo.java
index c628971..690dc72 100644
--- a/src/com/nis/systeminfo/model/SystemInfo.java
+++ b/src/com/nis/systeminfo/model/SystemInfo.java
@@ -200,7 +200,8 @@ public class SystemInfo
sb.append(SEPARATOR);
sb.append(doubleFormat(memFree / (1024 * 1024 * 1024.0), 2));// 当前内存剩余量,单位:"G"
sb.append(SEPARATOR);
- sb.append(doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1));// 内存使用率
+ sb.append(doubleFormat(mem.getUsedPercent(), 1));// 内存使用率
+// sb.append(doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1));// 内存使用率
StringBuffer sb2 = new StringBuffer();
// sb2.append("内存总大小: " + doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2) + "G, 现使用:"
@@ -210,7 +211,7 @@ public class SystemInfo
sb2.append("i18n_client.SystemInfo.memerySize_n81i: " + doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.currentUsed_n81i:"
+ doubleFormat(memUsed / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.spaceRemain_n81i:"
+ doubleFormat(memFree / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.shiyonglv_n81i:"
- + doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1) + "%");
+ + doubleFormat(mem.getUsedPercent(), 1) + "%");
detectInfo.getDetailDatas().add(sb.toString());
detectInfo.setDescInfo(sb2.toString());