cpu_test
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html>
<html lang="zh">
<head>
<base href="<%=basePath%>">
<!-- jsp文件头和头部 -->
<%@ include file="../admin/top.jsp"%>
<script type="text/javascript">
$(top.hangge());
</script>
<style type="text/css">
#resourch_bar select {
border: solid 1px #C0C0C0;
appearance: none;
-moz-appearance: none;
font-size: 13px;
font-family: Arial, "Microsoft YaHei", 黑体, 宋体, sans-serif;
padding: 1px 5px;
height: 22px;
width: 130px;
margin-top: 7px;
} select::-ms-expand {
display: none;
} #top_bar_left {
font-weight: bold;
float: left;
font-size: 16px;
margin: 10px 20px;
} #resourch_bar {
margin: 0 20px;
text-align: right;
float: right;
}
</style>
</head>
<body>
<div id="top_bar_left" style="">CPU占用率统计</div> <div id="resourch_bar" style="">
IP地址:<select name="ip" id="ip" onchange="changeIp()" title="IP">
<option value="0">10.62.256.156</option>
<option value="1">10.62.256.12</option>
<%-- <c:forEach items="" var="menu">
<option value="">${menu.MENU_NAME }</option>
</c:forEach> --%>
</select> 进程名称:<select name="processName"
id="processName" onchange="changeProcessName()" title="进程名称">
<option value="0">zte_cloud1</option>
<option value="1">zte_cloud1_main1</option>
<%-- <c:forEach items="" var="menu">
<option value="">${menu.MENU_NAME }</option>
</c:forEach> --%>
</select>
</div> <div id="container"
style="min-width: 700px; min-height: 500px; margin: 0 10px;"></div> <!-- 引入 -->
<script type="text/javascript">
window.jQuery
|| document
.write("_$tag_______________________________________\x3C/script>");
</script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/ace-elements.min.js"></script>
<script src="static/js/ace.min.js"></script>
<!-- 引入 --> <script type="text/javascript">
$(function() {
$
.getJSON(
'http://www.hcharts.cn/datas/jsonp.php?filename=usdeur.json&callback=?',
function(data) {
var startDate = new Date(
data[data.length - 1][0]), // Get year of last data point
minRate = 1, maxRate = 0, startPeriod, date, rate, index;
startDate.setMonth(startDate.getMonth() - 3); // a quarter of a year before last data point
startPeriod = Date.UTC(startDate.getFullYear(),
startDate.getMonth(), startDate
.getDate());
for (index = data.length - 1; index >= 0; index = index - 1) {
date = data[index][0]; // data[i][0] is date
rate = data[index][1]; // data[i][1] is exchange rate
if (date < startPeriod) {
break; // stop measuring highs and lows
}
if (rate > maxRate) {
maxRate = rate;
}
if (rate < minRate) {
minRate = rate;
}
}
// Create the chart
$('#container').highcharts('StockChart', {
rangeSelector : {
selected : 1
},
title : {
/* text : 'CPU占用率统计(样板)' */
},
yAxis : {
title : {
text : 'CPU占用率(%)'
},
plotLines : [ {
value : minRate,
color : 'green',
dashStyle : 'shortdash',
width : 2,
label : {
text : '最近半小时最小值'
}
}, {
value : maxRate,
color : 'red',
dashStyle : 'shortdash',
width : 2,
label : {
text : '最近半小时最大值'
}
} ]
},
series : [ {
name : 'CPU占用率',
data : data,
tooltip : {
valueDecimals : 4
}
} ]
});
});
});
</script>
<script type="text/javascript">
var taskId = 1470211358843;
function changeIp() {
$.ajax({
type : "post",
async : false, //同步执行
url : "resource/getReourceIP?taskId=" + taskId,
//data:{taskId:taskId},
dataType : "json", //返回数据形式为json
success : function(data) {
console.log("1111");
var selectid = document.getElementById("ip");
for (var i = 0; i < data.length; i++) {
selectid[i] = new Option(data[i].TAGS, data[i].TAGS);
}
},
error : function(errorMsg) {
console.log("2222");
var selectid = document.getElementById("processName");
selectid[0] = new Option("---- 设置显示0 ----", 0);
selectid[1] = new Option("---- 设置显示1 ----", 1);
selectid[2] = new Option("---- 设置显示2 ----", 2);
}
});
}
</script>
<style type="text/css">
li {
list-style-type: none;
}
</style>
<script type="text/javascript" src="static/js/hcharts/highstock.js"></script>
<ul class="navigationTabs">
<li><a></a></li>
<li></li>
</ul>
</body>
</html>
cpu_test的更多相关文章
- sysbench的框架实现介绍
sysbench是一个非常经典的综合性能测试工具,它支持CPU,IO,内存,尤其是数据库的性能测试.那它是怎么做到通用性的呢,总结一句话是大量运用了重载的方法. sysbench总体架构 sysben ...
- 嵌入式开发之zynqMp ---Zynq UltraScale+ MPSoC 图像编码板zcu102
1.1 xilinx zynqMp 架构 1.1.1 16nm 级别工艺 Zynq UltraScale+ MPSoC架构 Xilinx新一代Zynq针对控制.图像和网络应用推出了差异化的产品系,这 ...
- centos中单进程监控
[root@k8s6 proc]# ps aux|grep -v PID|sort -rn -k +|head - root ? Ssl : : /usr/bin/dockerd root ? Ssl ...
- python之常用模块篇5
一.日志模块,logging模块 1)logging模块简单使用,屏幕输出.默认级别30 import logging logging.debug( logging.info( logging.war ...
- shell 脚本学习
Shell简介 概述 Shell是一种具备特殊功能的程序,它提供了用户与内核进行交互操作的一种接口.它接收用户输入的命令,并把它送入内核去执行.内核是Linux系统的心脏,从开机自检就驻留在计算机的内 ...
- ubuntu生成core转储文件
1.ulimit -c 判断是否开启转储 为0 则没有开启 2.ulimit -c unlimited 设置转储core大小没有限制 3.设置转储文件位置 echo "/var/core/% ...
- python 中的"switch"用法
转载:http://python.jobbole.com/82008/ 为什么Python中没有Switch/Case语句? 不同于我用过的其它编程语言,Python 没有 switch / case ...
- LINUX CGROUP总结
简介: Linux CGroup全称Linux Control Group, 是Linux内核的一个功能,用来限制,控制与分离一个进程组群的资源(如CPU.内存.磁盘输入输出等).这个项目最早是由Go ...
随机推荐
- kindeditor老版本version 4.1.10 bug踩坑
目录 上传图片或者视频的弹窗有时候不出现,只出现遮罩 视频上传无法播放的问题 参考链接: 问题目录 上传图片或者视频的弹窗有时候不出现,只出现遮罩 通过测试发现,出现这种情况不是弹出框没有出现,而是设 ...
- win8升级8.1提示卸载sentinel runtime drivers
Win8升级8.1时提示需卸载sentinel runtime drivers的解决方法 第一步:打开sentinelcustomer.safenet-inc.com/sentineldownload ...
- javascript基础编程の变量、对象、数据类型及函数
在web标准中.网页由结构.表现形式和行为三个部分组成. 结构标准---->XHTML: 表现形式标准----->CSS: 行为标准----->javascript: javascr ...
- webBrowser捕获Alert内容(C#)
1.引用using mshtml; //Microsoft HTML Object Library2.[ComVisible(true)] //放到类的上边 public partial class ...
- 重新总结flex布局(flex,flex-direction,justify-content,align-items,flex-wrap,align-self)
1.flex,主要就是按比例分配.(例如:两个div的flex:1,就大小相等) .box1{ flex:1; background-color: red; } .box2{ flex:1; back ...
- jquery城市选择案例
1.代码实例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...
- 用10张图来看机器学习Machine learning in 10 pictures
I find myself coming back to the same few pictures when explaining basic machine learning concepts. ...
- Scrum 思考
下个月就要离职,所以这个月特别清闲,上班时间都在上网看书,偶然在Startup News的一篇文章(http://blog.devtang.com/blog/2013/06/17/startup-an ...
- [Todo] Java并发编程学习
有两个系列的博文,交替着可以看看: 1. Java并发编程与技术内幕 http://blog.csdn.net/Evankaka/article/details/51866242 2. [Java并发 ...
- 高性能WEB开发:深入理解页面呈现、重绘、回流
在讨论页面重绘.回流之前.需要对页面的呈现流程有些了解,页面是怎么把html结合css等显示到浏览器上的,下面的流程图显示了浏览器对页面的呈现的处理流程.可能不同的浏览器略微会有些不同.但基本上都是类 ...