硬盘空间占比:
option = { title : { text: '/sda', subtext: '物理硬盘', x:'center' }, tooltip : { trigger: 'item', formatter: "{a} <br/>{b} : {c} ({d}%)" }, legend: { orient: 'vertical', left: 'left', data: ['sda1', 'sda2'] }, series : [ { name: '/sda', type: 'pie', radius : '45%', center: ['25%', '35%'], data:[ {value:30, name:'已用'}, {value:80, name:'未用'}, ], itemStyle: { emphasis: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ] };
系统平均负载(1,5, 15):
option = { title: { text: '系统平均负载' }, tooltip: { trigger: 'axis' }, legend: { data:['load_1m','load_5m','load15m'], left:'center' }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, toolbox: { feature: { saveAsImage: {} } }, xAxis: { type: 'category', boundaryGap: false, data: ['13:35:00', '13:40:00', '13:45:00', '13:50:00', '13:55:00', '14:00:00', '14:05:00'] }, yAxis: { type: 'value' }, series: [ { name:'load_1m', type:'line', stack: '总量', data: [1.2, 1.5, 0.8, 1.5, 2.0, 0.5, 1.56] }, { name:'load_5m', type:'line', stack: '总量', data: [1.2, 1.5, 0.8, 1.5, 2.0, 0.5, 1.56] }, { name:'load_15m', type:'line', stack: '总量', data: [0.3, 0.375, 0.2, 0.375, 0.5, 0.125, 0.39] } ] };
CPU:
option = { title: { text: 'CPU使用率', left: 'bottom' }, tooltip: { trigger: 'axis' }, legend: { data:['cpu_total'] }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, toolbox: { feature: { saveAsImage: {} } }, xAxis: { type: 'category', boundaryGap: false, data: ['13:35:00', '13:40:00', '13:45:00', '13:50:00', '13:55:00', '14:00:00', '14:05:00'] }, yAxis: { type: 'value' }, series: [ { name:'load_1m', type:'line', stack: '总量', data: [1.2, 1.5, 0.8, 1.5, 2.0, 0.5, 1.56] }, { name:'load_5m', type:'line', stack: '总量', data: [1.2, 1.5, 0.8, 1.5, 2.0, 0.5, 1.56] }, { name:'load_15m', type:'line', stack: '总量', data: [0.3, 0.375, 0.2, 0.375, 0.5, 0.125, 0.39] } ] };