优化线程休眠异常日志
This commit is contained in:
parent
5699c7d0e4
commit
e4105a958b
@ -1,5 +1,8 @@
|
|||||||
package com.genersoft.iot.vmp.utils;
|
package com.genersoft.iot.vmp.utils;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookListener;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
import oshi.SystemInfo;
|
import oshi.SystemInfo;
|
||||||
import oshi.hardware.*;
|
import oshi.hardware.*;
|
||||||
@ -21,6 +24,8 @@ import java.util.concurrent.TimeUnit;
|
|||||||
*/
|
*/
|
||||||
public class SystemInfoUtils {
|
public class SystemInfoUtils {
|
||||||
|
|
||||||
|
private final static Logger logger = LoggerFactory.getLogger(SystemInfoUtils.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取cpu信息
|
* 获取cpu信息
|
||||||
* @return
|
* @return
|
||||||
@ -73,7 +78,7 @@ public class SystemInfoUtils {
|
|||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
throw new RuntimeException(e);
|
logger.error("[线程休眠失败] : {}", e.getMessage());
|
||||||
}
|
}
|
||||||
List<NetworkIF> afterNetworkIFs = hal.getNetworkIFs();
|
List<NetworkIF> afterNetworkIFs = hal.getNetworkIFs();
|
||||||
NetworkIF afterNet = afterNetworkIFs.get(afterNetworkIFs.size() - 1);
|
NetworkIF afterNet = afterNetworkIFs.get(afterNetworkIFs.size() - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user