11
13693261870
2024-08-16 e28e6c5ea1ceff3f9f36698cc2c1866b4f47d527
wgcloud-agent/src/main/java/se/wgcloud/OshiUtil.java
ÎļþÃû´Ó wgcloud-agent/src/main/java/com/wgcloud/OshiUtil.java ÐÞ¸Ä
@@ -1,6 +1,6 @@
package com.wgcloud;
package se.wgcloud;
import com.wgcloud.entity.*;
import se.wgcloud.entity.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import oshi.hardware.CentralProcessor;
@@ -20,10 +20,10 @@
/**
 * @version v3.3
 * @ClassName: OshiUtil
 * @author: http://www.wgstart.com
 * @author:
 * @date: 2021å¹´11月19日
 * @Description: Oshi工具类
 * @Copyright: 2017-2024 wgcloud. All rights reserved.
 * @Copyright:
 */
public class OshiUtil {
@@ -74,8 +74,8 @@
     * @return
     * @throws Exception
     */
    public static com.wgcloud.entity.SystemInfo os(CentralProcessor processor, OperatingSystem os) throws Exception {
        com.wgcloud.entity.SystemInfo systemInfo = new com.wgcloud.entity.SystemInfo();
    public static SystemInfo os(CentralProcessor processor, OperatingSystem os) throws Exception {
        SystemInfo systemInfo = new SystemInfo();
        systemInfo.setHostname(commonConfig.getBindIp());
        systemInfo.setCpuCoreNum(processor.getLogicalProcessorCount() + "");
        String cpuInfo = processor.toString();
@@ -126,7 +126,7 @@
     *
     * @return
     */
    public static SysLoadState getLoadState(com.wgcloud.entity.SystemInfo systemInfo, CentralProcessor processor) throws Exception {
    public static SysLoadState getLoadState(SystemInfo systemInfo, CentralProcessor processor) throws Exception {
        SysLoadState sysLoadState = new SysLoadState();
        if (systemInfo == null) {
            return null;