Browse Source

bug修改

demon 8 years ago
parent
commit
5d8bb5c460

+ 18 - 0
hos-broker/src/main/java/com/yihu/hos/common/constants/MonitorConstant.java

@ -0,0 +1,18 @@
package com.yihu.hos.common.constants;
/**
 * @author HZY
 * @vsrsion 1.0
 * Created at 2016/11/3.
 */
public class MonitorConstant {
    public static String HOST = "host";
    public static String CPU = "cpu";
    public static String FILES = "files";
    public static String MEMORY = "memory";
    public static String NET = "net";
}

+ 15 - 12
hos-broker/src/main/java/com/yihu/hos/common/scheduler/EnvScheduler.java

@ -1,5 +1,6 @@
package com.yihu.hos.common.scheduler;
import com.yihu.hos.common.constants.MonitorConstant;
import com.yihu.hos.common.util.MongodbUtil;
import com.yihu.hos.common.util.SigarUtil;
import com.yihu.hos.core.datatype.DateUtil;
@ -24,7 +25,7 @@ import java.util.List;
public class EnvScheduler {
    static private final Logger logger = LoggerFactory.getLogger(EnvScheduler.class);
    private static String host = SigarUtil.getHost();
    @Scheduled(cron="0 0/1 * * * ?") //每分钟执行一次
    public void statusCheck() {
        System.out.println("每分钟执行一次。开始============================================");
@ -36,26 +37,34 @@ public class EnvScheduler {
    public String collectEnvHealth(){
        try {
            MongodbUtil monoEnv = new MongodbUtil("envHealth");
            Document result = new Document();
            Document result = null;
            result = new Document();
            result.put("create_date", DateUtil.getCurrentString(DateUtil.DEFAULT_YMDHMSDATE_FORMAT));
            result.put("create_time", new Date());
            //cpu
            JSONObject cpu = JSONObject.fromObject( SigarUtil.cpu());
            result.put("data",cpu);
            monoEnv.insert("cpu",result);
            result.put("type", MonitorConstant.CPU);
            monoEnv.insert(host,result);
            //内存
            JSONObject memory = JSONObject.fromObject( SigarUtil.memory());
            result.put("data",memory);
            monoEnv.insert("memory",result);
            result.put("type", MonitorConstant.MEMORY);
            result.remove("_id");
            monoEnv.insert(host,result);
            //硬盘
            List<JSONObject> files = JSONArray.fromObject( SigarUtil.file());
            result.put("data",files);
            monoEnv.insert("files", result);
            result.put("type", MonitorConstant.FILES);
            result.remove("_id");
            monoEnv.insert(host, result);
            //网络
            JSONObject net = JSONObject.fromObject( SigarUtil.net());
            result.put("data",net);
            monoEnv.insert("net",result);
            result.put("type", MonitorConstant.NET);
            result.remove("_id");
            monoEnv.insert(host,result);
        } catch (Exception e) {
            e.printStackTrace();
@ -65,12 +74,6 @@ public class EnvScheduler {
//    @Scheduled(fixedRate=10000)
//    public void testTasks() {
//        logger.info("每10秒执行一次。开始……");

+ 26 - 12
hos-broker/src/main/java/com/yihu/hos/common/util/SigarUtil.java

@ -74,6 +74,18 @@ public class SigarUtil {
     *
     * @throws UnknownHostException
     */
    public static String getHost(){
        try {
            InetAddress addr = InetAddress.getLocalHost();
            String ip = addr.getHostAddress();
            return ip;
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        return "unknowHost";
    }
    private static void property() throws UnknownHostException {
        Runtime r = Runtime.getRuntime();
        Properties props = System.getProperties();
@ -152,24 +164,25 @@ public class SigarUtil {
    public static Map<String, Object> cpu()  {
        Map<String, Object> cpuMap = new HashMap<>();
        try {
            Cpu timer = sigar.getCpu();
            CpuInfo infos[] = sigar.getCpuInfoList();
            CpuPerc cpuPerc = sigar.getCpuPerc();
            CpuInfo info1 = infos[0];
            //cpu信息
            cpuMap.put("quantity", infos.length);
            cpuMap.put("model", info1.getModel());
            cpuMap.put("totalCores", info1.getTotalCores());
            cpuMap.put("totalSockets", info1.getTotalSockets());
            cpuMap.put("model", info1.getModel());// CPU型号
            cpuMap.put("totalCores", info1.getTotalCores());// CPU逻辑个数
            cpuMap.put("totalSockets", info1.getTotalSockets());// CPU物理个数
            cpuMap.put("Mhz", info1.getMhz());
            //cpu使用率
            String totalPerc = String.format("%.2f", cpuPerc.getCombined() * 100);
            String userPerc = String.format("%.2f", cpuPerc.getUser() * 100);
            String sysPerc = String.format("%.2f", cpuPerc.getSys() * 100);
            String wait = String.format("%.2f", cpuPerc.getWait() * 100);
            String nice = String.format("%.2f", cpuPerc.getNice() * 100);
            String freePerc = String.format("%.2f", cpuPerc.getIdle() * 100);
            cpuMap.put("cores",info1.getCoresPerSocket());//核数
            long cacheSize = info1.getCacheSize();
            if (cacheSize != Sigar.FIELD_NOTIMPL) {
                cpuMap.put("cache",info1.getCacheSize());//核数
            }
            //cpu使用率
            cpuMap.put("timer",timer.getUser());//核数
            cpuMap.put("totalPerc", getDouble(cpuPerc.getCombined() * 100));
            cpuMap.put("userPerc", getDouble(cpuPerc.getUser() * 100));
            cpuMap.put("sysPerc", getDouble(cpuPerc.getSys() * 100));
@ -177,7 +190,7 @@ public class SigarUtil {
            cpuMap.put("nice", getDouble(cpuPerc.getNice() * 100));
            cpuMap.put("freePerc", getDouble(cpuPerc.getIdle() * 100));
        }catch (SigarException e){
        } catch (SigarException e){
            e.printStackTrace();
        }
        return cpuMap;
@ -366,4 +379,5 @@ public class SigarUtil {
        return Double.parseDouble(total);
    }
}

+ 26 - 1
src/main/java/com/yihu/hos/monitor/controller/ServerMonitorController.java

@ -39,13 +39,38 @@ public class ServerMonitorController {
    @ResponseBody
    @ApiOperation(value = "获取服务器使用率", produces = "application/json", notes = "获取服务器硬件使用率")
    public Result usage(
            @ApiParam(name = "host", value = "服务器IP", required = true)
            @RequestParam(value = "host") String host,
            @ApiParam(name = "type", value = "类型", required = true)
            @RequestParam(value = "type") String type,
            @ApiParam(name = "beginTime", value = "开始时间", required = true)
            @RequestParam(value = "beginTime") String beginTime,
            @ApiParam(name = "endTime", value = "结束时间", required = true)
            @RequestParam(value = "endTime") String endTime) {
        return monitorService.getMonitorInfo(type, beginTime, endTime);
        host = monitorService.getHost();
        return monitorService.getMonitorList(host,type, beginTime, endTime);
    }
    @RequestMapping(value = "/detail", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取服务器详情信息", produces = "application/json", notes = "获取服务器详情信息")
    public Result detail(
            @ApiParam(name = "host", value = "服务器IP", required = true)
            @RequestParam(value = "host") String host,
            @ApiParam(name = "type", value = "类型", required = true)
            @RequestParam(value = "type") String type,
            @ApiParam(name = "date", value = "时间点", required = true)
            @RequestParam(value = "date") String date) {
        host = monitorService.getHost();
        return monitorService.getMonitorDetail(host,type, date);
    }
    @RequestMapping(value = "/hosts", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取服务器列表", produces = "application/json", notes = "获取服务器列表")
    public Result hosts() {
        return monitorService.getHosts();
    }

+ 48 - 2
src/main/java/com/yihu/hos/monitor/service/ServerMonitorService.java

@ -10,6 +10,12 @@ import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
 * Created by chenweida on 2016/1/27.
 */
@ -24,11 +30,12 @@ public class ServerMonitorService {
    @Autowired
    private Mongo mongo;
    public Result getMonitorInfo(String table,String beginTime, String endTime) {
    public Result getMonitorList(String table, String type, String beginTime, String endTime) {
        mongoOperations = new MongoTemplate(mongo, envHealth);
        DBCollection envCollection = mongoOperations.getCollection(table);
        BasicDBObject queryObject = new BasicDBObject().append(QueryOperators.AND,
                new BasicDBObject[]{
                        new BasicDBObject().append("type",type),
                        new BasicDBObject().append("create_time",
                                new BasicDBObject().append(QueryOperators.GTE, DateUtil.toTimestamp(beginTime))),
                        new BasicDBObject().append("create_time",
@ -40,7 +47,6 @@ public class ServerMonitorService {
            DBObject dbObject = cursor.next();
            dbObject.removeField("_id");
            result.put(dbObject);
            System.out.println(dbObject.toString());
        }
        ActionResult actionResult = new ActionResult();
@ -48,4 +54,44 @@ public class ServerMonitorService {
        return actionResult;
    }
    public Result getMonitorDetail(String host, String type, String date) {
        mongoOperations = new MongoTemplate(mongo, envHealth);
        DBCollection envCollection = mongoOperations.getCollection(host);
        BasicDBObject queryObject = new BasicDBObject().append(QueryOperators.AND,
                new BasicDBObject[]{
                        new BasicDBObject().append("type", type),
                        new BasicDBObject().append("create_time",new BasicDBObject().append(QueryOperators.LTE, DateUtil.toTimestamp(date)))});
        Map result = new HashMap<>();
        DBCursor cursor = envCollection.find(queryObject).sort(new BasicDBObject("create_time",-1)).limit(1);
        while(cursor.hasNext()) {
            DBObject dbObject = cursor.next();
            dbObject.removeField("_id");
            result = dbObject.toMap();
        }
        ActionResult actionResult = new ActionResult();
        actionResult.setData(result);
        return actionResult;
    }
    public static String getHost(){
        try {
            InetAddress addr = InetAddress.getLocalHost();
            String ip = addr.getHostAddress();
            return ip;
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        return "unknowHost";
    }
    public Result getHosts() {
        mongoOperations = new MongoTemplate(mongo, envHealth);
        Set<String> collections = mongoOperations.getCollectionNames();
        ActionResult actionResult = new ActionResult();
        actionResult.setData(collections);
        return actionResult;
    }
}

+ 36 - 36
src/main/webapp/WEB-INF/ehr/jsp/monitor/server/sEnvManage.jsp

@ -58,44 +58,44 @@
            <div class="c-item" data-item="net">网络</div>
        </div>
            <%-- echarts 数据--%>
        <div id="main" style="width: 60%;height:400px;border: solid deepskyblue 1px;"></div>
        <div id="main" style="width: 80%;height:400px;border: solid deepskyblue 1px;"></div>
            <%-- 详细数据 --%>
            <div class="ml50 mt20">
                <div class="div-item">
                    <div>
                        <div class="d-item">利用率</div>
                        <div class="d-item">速度</div>
                    </div>
                    <div class="mb20">
                        <div class="c-content">53%</div>
                        <div class="c-content">2.18GHZ</div>
                    </div>
                    <div>
                        <div class="d-item">进程</div>
                        <div class="d-item">线程</div>
                        <div class="d-item">句柄</div>
                    </div>
                    <div class="mb20">
                        <div class="c-content">107</div>
                        <div class="c-content">1720</div>
                        <div class="c-content">59868</div>
                    </div>
                    <div class="f-dis-inline f-fs12">正常运行时间</div>
                    <div class="mb20">
                        <div class="c-content">11:19:15:40</div>
                    </div>
                </div>
                <div class="div-item">
                    <div class="div-right-item">最大速度:<span class="f-fs14 c-fwb">2.19GHZ</span></div>
                    <div class="div-right-item">插槽:<span class="f-fs14 c-fwb">1</span></div>
                    <div class="div-right-item">内核:<span class="f-fs14 c-fwb">2</span></div>
                    <div class="div-right-item">编辑处理器:<span class="f-fs14 c-fwb">4</span></div>
                    <div class="div-right-item">虚拟化:<span class="f-fs14 c-fwb">已启用</span></div>
                    <div class="div-right-item">L1缓存:<span class="f-fs14 c-fwb">121KB</span></div>
                    <div class="div-right-item">L2缓存:<span class="f-fs14 c-fwb">512KB</span></div>
                    <div class="div-right-item">L3缓存:<span class="f-fs14 c-fwb">3.0MB</span></div>
                </div>
            <div id="detail" class="ml50 mt20">
                <%--<div class="div-item">--%>
                    <%--<div>--%>
                        <%--<div class="d-item">利用率</div>--%>
                        <%--<div class="d-item">速度</div>--%>
                    <%--</div>--%>
                    <%--<div class="mb20">--%>
                        <%--<div class="c-content">53%</div>--%>
                        <%--<div class="c-content">2.18GHZ</div>--%>
                    <%--</div>--%>
                    <%--<div>--%>
                        <%--<div class="d-item">进程</div>--%>
                        <%--<div class="d-item">线程</div>--%>
                        <%--<div class="d-item">句柄</div>--%>
                    <%--</div>--%>
                    <%--<div class="mb20">--%>
                        <%--<div class="c-content">107</div>--%>
                        <%--<div class="c-content">1720</div>--%>
                        <%--<div class="c-content">59868</div>--%>
                    <%--</div>--%>
                    <%--<div class="f-dis-inline f-fs12">正常运行时间</div>--%>
                    <%--<div class="mb20">--%>
                        <%--<div class="c-content">11:19:15:40</div>--%>
                    <%--</div>--%>
                <%--</div>--%>
                <%--<div class="div-item">--%>
                    <%--<div class="div-right-item">最大速度:<span class="f-fs14 c-fwb">2.19GHZ</span></div>--%>
                    <%--<div class="div-right-item">插槽:<span class="f-fs14 c-fwb">1</span></div>--%>
                    <%--<div class="div-right-item">内核:<span class="f-fs14 c-fwb">2</span></div>--%>
                    <%--<div class="div-right-item">编辑处理器:<span class="f-fs14 c-fwb">4</span></div>--%>
                    <%--<div class="div-right-item">虚拟化:<span class="f-fs14 c-fwb">已启用</span></div>--%>
                    <%--<div class="div-right-item">L1缓存:<span class="f-fs14 c-fwb">121KB</span></div>--%>
                    <%--<div class="div-right-item">L2缓存:<span class="f-fs14 c-fwb">512KB</span></div>--%>
                    <%--<div class="div-right-item">L3缓存:<span class="f-fs14 c-fwb">3.0MB</span></div>--%>
                <%--</div>--%>
            </div>

+ 126 - 54
src/main/webapp/WEB-INF/ehr/jsp/monitor/server/sEnvManageJs.jsp

@ -1,6 +1,7 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
<script src="${contextRoot}/develop/lib/plugin/echarts/echarts-all.js"></script>
<%--<script src="${contextRoot}/develop/echarts/echarts.js"></script>--%>
<script>
    $(function () {
@ -30,8 +31,9 @@
        var type = $(".div-menu .active").attr("data-item");
        var beginTime = $("#repeatStartTime").ligerDateEditor("getValue");
        var endTime = $("#repeatEndTime").ligerDateEditor("getValue");
        getServerInfo(type,beginTime,endTime);
        var host = '192.168.131.11'; //TODO 通过树获取服务器IP
        getServerInfo(host,type,beginTime,endTime);
        getCpnInfo(host,type,endTime);
        //搜索按钮事件
        $(".m-form-control").on("click","#btnSearch",function(){
@ -44,8 +46,10 @@
            }
            var type = $(".div-menu .active").attr("data-item");
            var host = '192.168.131.11'; //TODO 通过树获取服务器IP
            //获取服务器监控数据
            getServerInfo(type,beginTime,endTime);
            getServerInfo(host,type,beginTime,endTime);
            getCpnInfo(host,type,endTime);
        })
        //选项卡切换时间
@ -56,17 +60,18 @@
            //获取服务器监控数据
            var beginTime = $("#repeatStartTime").ligerDateEditor("getValue");
            var endTime = $("#repeatEndTime").ligerDateEditor("getValue");
            getServerInfo(type,beginTime,endTime);
            var host = '192.168.131.11'; //TODO 通过树获取服务器IP
            getServerInfo(host,type,beginTime,endTime);
            getCpnInfo(host,type,endTime);
        })
    });
    function getServerInfo(type,beginTime,endTime){
    function getServerInfo(host,type,beginTime,endTime){
        $.ajax({
            type: "GET",
            url : "${contextRoot}/monitor/server/usage",
            dataType : "json",
            data:{type:type,beginTime:beginTime,endTime:endTime},
            data:{host:host,type:type,beginTime:beginTime,endTime:endTime},
            cache:false,
            success :function(re){
                if(re.successFlg) {
@ -100,21 +105,44 @@
    }
    var env ={
        $resourceTree: $("#div_wrapper_left_ul_resourcetree"),//树对象
    init:function(){
            //初始化树
            var resourceTree = this.$resourceTree;
            $.ajax({
                type: "POST",
                url: "${contextRoot}/monitor/server/hosts",
                success: function (msg) {
                    // 初始化树形菜单
                    resourceTree = resourceTree.ligerTree({
                        data: msg.data,
                        idFieldName: 'id',
                        nodeWidth: 200,
                        parentIDFieldName: 'pid',
                        isExpand: false,
                        onClick: function (obj) {
                            rsResoureManege.reloadGridTree(obj.data.id, rsResoureManege.$searchresourceName.val());
                            rsResoureManege.$resourceTreeId=obj.data.id;
                        },
                        onSuccess: function (data) {
                        }
                    });
                }
            });
        },
        cpuInfo:function(re){
         var data = re.data;
         if(data!=null && data.length>0)
         {
             var count = 0
             var success =0;
             var x = [];
             var y1=[];
             var y2=[];
             for(var i=0;i<data.length;i++)
             {
                 var create_date = data[i].create_date.substring(11,16);
                 x.push(create_date);
                 count += data[i].data.totalPerc;
                 success += data[i].data.userPerc;
//                 var create_date = data[i].create_date.substring(11,16);
//                 x.push(create_date);
                 x.push(data[i].create_date);
                 y1.push(data[i].data.totalPerc);
                 y2.push(data[i].data.userPerc);
             }
@ -129,6 +157,11 @@
                 tooltip: {
                     trigger: 'axis'
                 },
                 dataZoom : {
                     show : true,
                     start : 0,
                     end : 100
                 },
                 legend: {
                     left: 'left',
                     data: ['总使用率', '用户使用率']
@ -165,11 +198,12 @@
                 ]
             };
             myChart.setOption(option);
             myChart.on('mouseover', function (params) {
//                 getCpnInfo(host,type,params.name);
                 console.log(params);
             });
             //设置图例下方的信息
         }
         else{
            //TODO 清除数据处理
@ -179,8 +213,6 @@
            var data = re.data;
            if(data!=null && data.length>0)
            {
                var count = 0
                var success =0;
                var x = [];
                var y1=[];
                var y2=[];
@ -188,7 +220,6 @@
                {
                    var create_date = data[i].create_date.substring(11,16);
                    x.push(create_date);
                    count += data[i].data.usedPerc;
                    y1.push(data[i].data.usedPerc);
                    y2.push(data[i].data.freePerc);
                }
@ -203,6 +234,11 @@
                    tooltip: {
                        trigger: 'axis'
                    },
                    dataZoom : {
                        show : true,
                        start : 0,
                        end : 100
                    },
                    legend: {
                        left: 'left',
                        data: ['使用率', '空闲率']
@ -273,6 +309,11 @@
                    tooltip: {
                        trigger: 'axis'
                    },
                    dataZoom : {
                        show : true,
                        start : 0,
                        end : 100
                    },
                    legend: {
                        left: 'left',
                        data: ['已使用', '总量']
@ -338,6 +379,11 @@
                    tooltip: {
                        trigger: 'axis'
                    },
                    dataZoom : {
                        show : true,
                        start : 0,
                        end : 100
                    },
                    legend: {
                        left: 'left',
                        data: ['接收', '发送']
@ -405,42 +451,68 @@
    /* **************************动态DIV添加************************ */
    /* CPU 详情数据*/
    function getCpnInfo(host,type,date){
        $.ajax({
            type: "GET",
            url : "${contextRoot}/monitor/server/detail",
            dataType : "json",
            data:{host:host,type:type,date:date},
            cache:false,
            success :function(re){
                if(re.successFlg) {
                    //TODO 设置详情数据
                    var data = re.data;
                    if(data!=null && data!=''>0){
                        var envData = data.data;
                        debugger
                        var $envInfo = $("#detail");
                        var html = "<div class=\"div-item\">\n" +
                                "                    <div>\n" +
                                "                        <div class=\"d-item\">利用率</div>" +
                                "                        <div class=\"d-item\">速度</div>" +
                                "                    </div>" +
                                "                    <div class=\"mb20\">\n" +
                                "                        <div class=\"c-content\">"+envData.userPerc+"%</div>" +
                                "                        <div class=\"c-content\">2.18GHZ</div>\n" +
                                "                    </div>\n" +
                                "                    <div>\n" +
                                "                        <div class=\"d-item\">进程</div>\n" +
                                "                        <div class=\"d-item\">线程</div>\n" +
                                "                        <div class=\"d-item\">句柄</div>\n" +
                                "                    </div>\n" +
                                "                    <div class=\"mb20\">\n" +
                                "                        <div class=\"c-content\">107</div>\n" +
                                "                        <div class=\"c-content\">1720</div>\n" +
                                "                        <div class=\"c-content\">59868</div>\n" +
                                "                    </div>\n" +
                                "                    <div class=\"f-dis-inline f-fs12\">正常运行时间</div>\n" +
                                "                    <div class=\"mb20\">\n" +
                                "                        <div class=\"c-content\">11:19:15:40</div>\n" +
                                "                    </div>\n" +
                                "                </div>\n" +
                                "                <div class=\"div-item\">\n" +
                                "                    <div class=\"div-right-item\">最大速度:<span class=\"f-fs14 c-fwb\">"+envData.model.substring(envData.model.length-8)+"</span></div>\n" +
                                "                    <div class=\"div-right-item\">插槽:<span class=\"f-fs14 c-fwb\">1</span></div>\n" +
                                "                    <div class=\"div-right-item\">内核:<span class=\"f-fs14 c-fwb\">"+envData.cores+"</span></div>\n" +
                                "                    <div class=\"div-right-item\">逻辑处理器:<span class=\"f-fs14 c-fwb\">"+envData.totalCores+"</span></div>\n" +
                                "                    <div class=\"div-right-item\">物理处理器:<span class=\"f-fs14 c-fwb\">"+envData.totalSockets+"</span></div>\n" +
                                "                    <div class=\"div-right-item\">L1缓存:<span class=\"f-fs14 c-fwb\">121KB</span></div>\n" +
                                "                    <div class=\"div-right-item\">L2缓存:<span class=\"f-fs14 c-fwb\">512KB</span></div>\n" +
                                "                    <div class=\"div-right-item\">L3缓存:<span class=\"f-fs14 c-fwb\">3.0MB</span></div>\n" +
                                "                </div>";
    var $envInfo = $(".mt20");
    var html = "<div class=\"div-item\">\n" +
            "                    <div>\n" +
            "                        <div class=\"d-item\">利用率</div>\n" +
            "                        <div class=\"d-item\">速度</div>\n" +
            "                    </div>\n" +
            "                    <div class=\"mb20\">\n" +
            "                        <div class=\"c-content\">53%</div>\n" +
            "                        <div class=\"c-content\">2.18GHZ</div>\n" +
            "                    </div>\n" +
            "                    <div>\n" +
            "                        <div class=\"d-item\">进程</div>\n" +
            "                        <div class=\"d-item\">线程</div>\n" +
            "                        <div class=\"d-item\">句柄</div>\n" +
            "                    </div>\n" +
            "                    <div class=\"mb20\">\n" +
            "                        <div class=\"c-content\">107</div>\n" +
            "                        <div class=\"c-content\">1720</div>\n" +
            "                        <div class=\"c-content\">59868</div>\n" +
            "                    </div>\n" +
            "                    <div class=\"f-dis-inline f-fs12\">正常运行时间</div>\n" +
            "                    <div class=\"mb20\">\n" +
            "                        <div class=\"c-content\">11:19:15:40</div>\n" +
            "                    </div>\n" +
            "                </div>\n" +
            "                <div class=\"div-item\">\n" +
            "                    <div class=\"div-right-item\">最大速度:<span class=\"f-fs14 c-fwb\">2.19GHZ</span></div>\n" +
            "                    <div class=\"div-right-item\">插槽:<span class=\"f-fs14 c-fwb\">1</span></div>\n" +
            "                    <div class=\"div-right-item\">内核:<span class=\"f-fs14 c-fwb\">2</span></div>\n" +
            "                    <div class=\"div-right-item\">编辑处理器:<span class=\"f-fs14 c-fwb\">4</span></div>\n" +
            "                    <div class=\"div-right-item\">虚拟化:<span class=\"f-fs14 c-fwb\">已启用</span></div>\n" +
            "                    <div class=\"div-right-item\">L1缓存:<span class=\"f-fs14 c-fwb\">121KB</span></div>\n" +
            "                    <div class=\"div-right-item\">L2缓存:<span class=\"f-fs14 c-fwb\">512KB</span></div>\n" +
            "                    <div class=\"div-right-item\">L3缓存:<span class=\"f-fs14 c-fwb\">3.0MB</span></div>\n" +
            "                </div>";
                        $envInfo.html(html);
                    }
                }
                else{
                    $.ligerDialog.error(re.message);
                }
            },
            error :function(data){
                $.ligerDialog.error("Status:"+data.status +"(" +data.statusText+")");
            }
        });
    }
</script>