Merge branch 'master' into dev
Conflicts: .gitignore
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1 +1,5 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
/bin
|
/bin
|
||||||
|
=======
|
||||||
|
/bin/
|
||||||
|
>>>>>>> refs/heads/master
|
||||||
|
|||||||
@@ -1156,8 +1156,7 @@ public class ProcessUtil
|
|||||||
*/
|
*/
|
||||||
public static List<String> getLinuxProcessId(String procSearchKey)
|
public static List<String> getLinuxProcessId(String procSearchKey)
|
||||||
{
|
{
|
||||||
String cmd = "ps -ef | grep -i '" + procSearchKey.trim()
|
String cmd = "ps -ef | grep " + procSearchKey.trim() + " | grep -v grep | awk '{print $2}'";
|
||||||
+ "' | grep -v grep | awk '{print $2}'";
|
|
||||||
logger.info("getLinuxProcessId-----" + cmd);
|
logger.info("getLinuxProcessId-----" + cmd);
|
||||||
String[] shellCmd1 = new String[] { "/bin/bash", "-c", cmd };
|
String[] shellCmd1 = new String[] { "/bin/bash", "-c", cmd };
|
||||||
BufferedReader bReader = null;
|
BufferedReader bReader = null;
|
||||||
|
|||||||
@@ -190,8 +190,10 @@ public class SystemInfo
|
|||||||
// a)物理内存信息
|
// a)物理内存信息
|
||||||
Mem mem = sigar.getMem();
|
Mem mem = sigar.getMem();
|
||||||
Long memTotal = mem.getTotal();// 内存总量
|
Long memTotal = mem.getTotal();// 内存总量
|
||||||
Long memUsed = mem.getUsed();// 当前内存使用量
|
//Long memUsed = mem.getUsed();// 当前内存使用量
|
||||||
Long memFree = mem.getFree();// 当前内存剩余量
|
//Long memFree = mem.getFree();// 当前内存剩余量
|
||||||
|
Long memFree = mem.getActualFree();//
|
||||||
|
Long memUsed = mem.getActualUsed();
|
||||||
sb.append(doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2));// 内存总量,单位:"G"
|
sb.append(doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2));// 内存总量,单位:"G"
|
||||||
sb.append(SEPARATOR);
|
sb.append(SEPARATOR);
|
||||||
sb.append(doubleFormat(memUsed / (1024 * 1024 * 1024.0), 2));// 当前内存使用量,单位:"G"
|
sb.append(doubleFormat(memUsed / (1024 * 1024 * 1024.0), 2));// 当前内存使用量,单位:"G"
|
||||||
|
|||||||
Reference in New Issue
Block a user