├── .gitignore ├── README.md ├── backup └── .gitkeep ├── bin ├── analyse.py ├── monitor_apache.py ├── monitor_clean.sh ├── monitor_memcached.py ├── monitor_nginx.py ├── monitor_start.sh ├── monitor_stop.sh ├── monitor_tomcat.py ├── plot.py ├── report.py ├── templates │ ├── base.html │ └── report.html └── util.py ├── conf ├── config.ini └── report.ini ├── example.png ├── init.sh ├── lib └── ukai.ttc ├── log └── .gitkeep ├── requirements.txt ├── result └── .gitkeep └── sample ├── test-v1.0-api_performanceTest_monitor_statistical_data_201511192006.html ├── test-v1.0-api_performanceTest_server_block_201511192006.txt ├── test-v1.0-api_performanceTest_server_cpu_201511192006-iowait.png ├── test-v1.0-api_performanceTest_server_cpu_201511192006-system.png ├── test-v1.0-api_performanceTest_server_cpu_201511192006-used.png ├── test-v1.0-api_performanceTest_server_cpu_201511192006-user.png ├── test-v1.0-api_performanceTest_server_cpu_201511192006.txt ├── test-v1.0-api_performanceTest_server_eth0_201511192006-rx(MB).png ├── test-v1.0-api_performanceTest_server_eth0_201511192006-tx(MB).png ├── test-v1.0-api_performanceTest_server_eth0_201511192006.txt ├── test-v1.0-api_performanceTest_server_inode_201511192006.txt ├── test-v1.0-api_performanceTest_server_io_rate_201511192006-read(MB).png ├── test-v1.0-api_performanceTest_server_io_rate_201511192006-tps.png ├── test-v1.0-api_performanceTest_server_io_rate_201511192006-wrtn(MB).png ├── test-v1.0-api_performanceTest_server_io_rate_201511192006.txt ├── test-v1.0-api_performanceTest_server_memory_201511192006-buffers(MB).png ├── test-v1.0-api_performanceTest_server_memory_201511192006-cached(MB).png ├── test-v1.0-api_performanceTest_server_memory_201511192006-memfree(MB).png ├── test-v1.0-api_performanceTest_server_memory_201511192006-memused(MB).png ├── test-v1.0-api_performanceTest_server_memory_201511192006-memused--.png ├── test-v1.0-api_performanceTest_server_memory_201511192006-memused.png ├── test-v1.0-api_performanceTest_server_memory_201511192006.txt ├── test-v1.0-api_performanceTest_server_network_201511192006.txt ├── test-v1.0-api_performanceTest_server_paging_201511192006.txt ├── test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-1.png ├── test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-15.png ├── test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-5.png ├── test-v1.0-api_performanceTest_server_queue_load_201511192006-plist-sz.png ├── test-v1.0-api_performanceTest_server_queue_load_201511192006.txt ├── test-v1.0-api_performanceTest_server_socket_201511192006-tcpsck.png ├── test-v1.0-api_performanceTest_server_socket_201511192006-totsck.png ├── test-v1.0-api_performanceTest_server_socket_201511192006-udpsck.png ├── test-v1.0-api_performanceTest_server_socket_201511192006.txt └── test-v1.0-api_performanceTest_server_swapping_201511192006.txt /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.out 3 | result/* 4 | venv/* 5 | log/* 6 | backup/* 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Performance Monitor 2 | performance-monitor为开源的服务器资源监控工具,采用shelll + python语言开发,具有灵活的监控配置 3 | 4 | ## 报告样例 5 | ![样例图片](https://raw.githubusercontent.com/JeffXue/performance-monitor/master/example.png) 6 | 7 | ## 统计资源 8 | performance monitor用于监控linux服务器中的资源情况,包括: 9 | * server_cpu -- 服务器CPU资源情况(sar) 10 | * `iowait(%) -- iowait占用CPU百分比,一般不应该超过30% ` 11 | * `system(%) -- 内核空间占用CPU百分比` 12 | * `used(%) -- 100%-idle(%)` 13 | * `user(%) -- 用户空间占用CPU百分比` 14 | * server_eth0 -- 服务器网卡eth0资源情况(sar -n DEV) 15 | * `rx/s(MB/s) -- 接收速度` 16 | * `tx/s(MB/s) -- 发送速度` 17 | * server_eth1 -- 服务器网卡eth1资源情况(sar -n DEV) 18 | * `rx/s(MB/s) -- 接收速度` 19 | * `tx/s(MB/s) -- 发送速度` 20 | * server_io_rate -- 服务器IO资源情况(sar -b) 21 | * `read/s(MB) -- 每秒物理设备读取数据总量` 22 | * `wrtn/s(MB) -- 每秒物理设备写入数据总量` 23 | * `tps -- 每秒物理设备IO操作次数(Total number of transfers per second that were issued to physical devices)` 24 | * server_memory -- 服务器内存资源情况(sar -r) 25 | * `buffers(MB) -- 内核缓冲区占用内存大小` 26 | * `cached(MB) -- 内核高速缓存数据占用内存大小` 27 | * `memfree(MB) -- 空闲内存大小` 28 | * `memused(MB) -- 已使用内存大小` 29 | * `memused(%) -- 已使用内存百分比` 30 | * `memused--(%) -- (memused-cached-buffers)*100%/(memfree+memused)` 31 | * server_queue_load -- 服务器CPU负载情况(sar -q) 32 | * `ldavg-1 -- 1分钟load平均值` 33 | * `ldavg-5 -- 5分钟load平均值` 34 | * `ldavg-15 -- 15分钟load平均值` 35 | * `plist-ze -- 队列中的进程和线程数量` 36 | * server_socket -- 服务器socket资源情况(sar -n SOCK) 37 | * `totsck -- 总的socket数量` 38 | * `tcpsck -- tcp连接socket数量` 39 | * `udpsck -- udp连接socket数量` 40 | * process_xxx -- 进程占用资源情况(top, ps -mP) 41 | * `CPU(%) -- 占用CPU百分比(每个核占用百分比之和)` 42 | * `MEM(%) -- 占用物理内存百分比` 43 | * `Threads -- 进程对应线程数` 44 | * mysql -- mysql数据库连接数(show global status like 'Threads_connected';) 45 | * `Threads_connected ` 46 | * redis -- redis信息(redis info) 47 | * `connected_clients -- 客户端连接数` 48 | * `hit_rate -- 命中率(keyspace_hits*100%/(keyspace_hits+keyspace_misses))` 49 | * `instantaneous_ops_per_sec -- 每秒处理请求数量` 50 | * `keyspace_hits -- 总命中数量` 51 | * `keyspace_misses -- 总不命中数量` 52 | * `total_commands_processed -- 总的请求数量` 53 | * `use_memory(MB) -- 使用内存大小` 54 | * `use_memory_peak(MB) -- 使用的最大内存大小` 55 | * memcached --memcached状态(client.get_stats()) 56 | * `accepting_conns -- 接收的请求数` 57 | * `bytes -- 处理的字节数量` 58 | * `bytes_read -- 读操作的字节数量` 59 | * `bytes_written -- 写操作的字节数量` 60 | * `cmd_flush -- flush命令总请求数量` 61 | * `cmd_get -- get命令总请求数量` 62 | * `cmd_set -- set命令总请求数量` 63 | * `curr_connections -- 当前打开这的连接数` 64 | * `curr_items -- 当前存储的items数量` 65 | * `evictions -- 为了获取空闲内存而删除的items数` 66 | * `get_hits -- 总命中次数` 67 | * `get_misses -- 总不命中次数` 68 | * `hit_rate -- 命中率(get_hits*100%/(get_hits+get_misses))` 69 | * `limit_maxbytes -- 分配给memcached内存大小` 70 | * `threads -- 当前线程数` 71 | * `total_items -- 从服务启动以后存储的items总数量` 72 | * mongodb -- mongodb信息(mongostat) 73 | * `conn -- 当前连接数` 74 | * `delete -- 每秒删除次数` 75 | * `faults -- 每秒访问失败数` 76 | * `flushes -- 每秒执行fsync将数据写入硬盘的次数` 77 | * `getmore -- 每秒执行getmore次数` 78 | * `insert -- 每秒插入次数` 79 | * `mapped(MB) -- 所有的被mmap的数据量` 80 | * `non-mapped(MB) -- MongoDB's internal data structures and threads'stacks, essentially anything not backed by files on disk` 81 | * `query -- 每秒查询数量` 82 | * `res(MB) -- 物理内存使用量` 83 | * `update -- 每秒更新次数` 84 | * `vsize(MB) -- 虚拟内存使用量` 85 | * apache --apache状态(status页面) 86 | * `closing_connection -- 关闭连接状态(C)` 87 | * `currently_processed -- 近期处理的请求数量` 88 | * `dns_lookup -- 正在查找DNS状态(D)` 89 | * `gracefully_finishing -- 进入正常结束程序中状态(G)` 90 | * `idle_cleanup_of_worker -- 处理闲置状态(I)` 91 | * `idle_worker -- 空闲线程` 92 | * `keepalive_read -- 处于保持联机的状态(K)` 93 | * `logging -- 正在写入日志文件` 94 | * `open_slot_with_no_current_process` 95 | * `reading_request -- 正在读取请求状态(R)` 96 | * `sending_reply -- 正在发送回应(W)` 97 | * `starting_up -- 启动中(S)` 98 | * `waiting_for_connection -- 等待连接中(_)` 99 | * tomcat --tomcat状态(status页面) 100 | * `free_memory -- 空闲内存` 101 | * `total_memory -- 总的使用内存` 102 | * `%ps_eden_space -- 年轻代(Eden Space)使用百分比` 103 | * `%ps_old_gen -- 年老代使用百分比` 104 | * `%ps_survivor_space -- 年轻代(Survivor Space)使用百分比` 105 | * `max_threads -- 最大线程数量` 106 | * `current_thread_count -- 近期线程数量` 107 | * `current_thread_busy -- 近期忙线程数量` 108 | * `max_processing_time -- 最大处理时间` 109 | * `processing_time -- 处理时间` 110 | * nginx -- nginx状态(status页面) 111 | * `active_connections -- 激活的连接数` 112 | * `handled_connections -- 处理的连接数` 113 | * `handled_handshake -- 处理的握手数` 114 | * `handled_requests -- 处理的请求数` 115 | * `reading -- 读取操作` 116 | * `waiting -- 等待操作` 117 | * `writing -- 写入操作` 118 | 119 | --- 120 | 121 | ## 安装步骤 122 | 123 | - apt-get install build-essential 124 | - apt-get install libssl-dev 125 | - 自行安装python2.7+,setuptools和pip 126 | - apt-get install libfreetype* 127 | - apt-get install libpng* 128 | - apt-get install sysstat 129 | - apt-get install libmysqld-dev 130 | - apt-get install zip 131 | - pip2.7 install virtualenv (可选,若需要在python虚拟环境中运行,则需安装) 132 | - pip2.7 install -r requirements.txt 133 | 134 | --- 135 | 136 | ## 使用方法 137 | 138 | 配置config目录下的config.ini和report.ini 139 | 140 | cd performance_monitor/bin 141 | 142 | ./monitor_start.sh -i interval -c count [-t time] -f prefix_name 143 | 144 | 参数说明: 145 | -i 采样间隔 146 | -c 采样次数 147 | -t 采样时长(如果你使用了-t设置时长 ,脚本将会忽略-c采样次数) 148 | -f 数据文件名前缀 例子: test-v1.0-api (使用'-'作为分隔符,请勿使用'_' ) 149 | 结束后可到result目录中查看对应的输出表单和数据 150 | 151 | --- 152 | 153 | -------------------------------------------------------------------------------- /backup/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/backup/.gitkeep -------------------------------------------------------------------------------- /bin/analyse.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | import sys 3 | import platform 4 | import ConfigParser 5 | import util 6 | import plot 7 | import report 8 | 9 | 10 | class MonitorConfig(): 11 | """get config from the ini file""" 12 | 13 | def __init__(self, config_ini): 14 | self.config_file = config_ini 15 | config = ConfigParser.ConfigParser() 16 | with open(self.config_file, "r") as cfg_file: 17 | config.readfp(cfg_file) 18 | self.res_dir = config.get("common", "resDir") 19 | self.granularity = int(config.get("plot", "granularity")) 20 | self.server_cpu_types = config.get("plot", "serverCPU").split(",") 21 | self.server_memory_types = config.get("plot", "serverMemory").split(",") 22 | self.server_io_rate_types = config.get("plot", "serverIORate").split(",") 23 | self.server_load_types = config.get("plot", "serverQueueLoad").split(",") 24 | self.server_sock_types = config.get("plot", "serverSock").split(",") 25 | server_platform = platform.platform() 26 | if server_platform.find("Ubuntu") != -1: 27 | self.server_eth_types = config.get("plot", "ubuntuEth").split(",") 28 | if server_platform.find("debian") != -1: 29 | self.server_eth_types = config.get("plot", "ubuntuEth").split(",") 30 | if server_platform.find("centos") != -1: 31 | self.server_eth_types = config.get("plot", "ubuntuEth").split(",") 32 | if server_platform.find("redhat") != -1: 33 | self.server_eth_types = config.get("plot", "redhatEth").split(",") 34 | self.mysql_connections_types = config.get("plot", "mysql").split(",") 35 | self.tcp_port_types = config.get("plot", "TCPPort").split(",") 36 | self.process_types = config.get("plot", "processStatus").split(",") 37 | self.redis_types = config.get("plot", "redisStatus").split(",") 38 | self.memcached_types = config.get("plot", "memcachedStatus").split(",") 39 | self.mongodb_types = config.get("plot", "mongodbStatus").split(",") 40 | self.apache_types = config.get("plot", 'apacheStatus').split(",") 41 | self.tomcat7_types = config.get("plot", 'tomcat7Status').split(",") 42 | self.tomcat6_types = config.get("plot", 'tomcat6Status').split(",") 43 | self.nginx_types = config.get("plot", 'nginxStatus').split(",") 44 | self.socket_stat_types = config.get("plot", 'socketStat').split(",") 45 | 46 | 47 | def main(): 48 | # get the avg 49 | parameter_lists = util.get_parameter_lists(sys.argv) 50 | if len(parameter_lists): 51 | result_prefix = parameter_lists[0] 52 | else: 53 | result_prefix = "test" 54 | if len(parameter_lists) > 1: 55 | end_time = parameter_lists[1] 56 | else: 57 | end_time = "N/A" 58 | 59 | # read the monitor config 60 | config = MonitorConfig("../conf/report.ini") 61 | 62 | # analyse file 63 | files = util.get_dir_files(config.res_dir) 64 | for datafile in files: 65 | if datafile.find("txt") != -1: 66 | if datafile.find("server_cpu") != -1: 67 | cpu_resource = plot.CPUResource(config.server_cpu_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 68 | cpu_resource.work() 69 | if datafile.find("server_memory") != -1: 70 | memory_resource = plot.MemoryResource(config.server_memory_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 71 | memory_resource.work() 72 | if datafile.find("server_io_rate") != -1: 73 | io_rate_resource = plot.IOResource(config.server_io_rate_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 74 | io_rate_resource.work() 75 | if datafile.find("server_eth0") != -1: 76 | eth0_resource = plot.EthResource(config.server_eth_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 77 | eth0_resource.work() 78 | if datafile.find("server_eth1") != -1: 79 | eth1_resource = plot.EthResource(config.server_eth_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 80 | eth1_resource.work() 81 | if datafile.find("server_queue_load") != -1: 82 | load_resource = plot.LoadResource(config.server_load_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 83 | load_resource.work() 84 | if datafile.find("server_socket") != -1: 85 | sock_resource = plot.SockResource(config.server_sock_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 86 | sock_resource.work() 87 | if datafile.find("mysql") != -1 and datafile.find('threads') != -1: 88 | mysql_resource = plot.MySQLResource(config.mysql_connections_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 89 | mysql_resource.work() 90 | if datafile.find("TCPPort") != -1: 91 | tcp_port_resource = plot.TCPPortResource(config.tcp_port_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 92 | tcp_port_resource.work() 93 | if datafile.find("process") != -1 and datafile.find('mysql') == -1: 94 | process_resource = plot.ProcessResource(config.process_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 95 | process_resource.work() 96 | if datafile.find("redis") != -1: 97 | if datafile.find('process') == -1 and datafile.find('thread') == -1: 98 | redis_resource = plot.RedisResource(config.redis_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 99 | redis_resource.work() 100 | if datafile.find('memcached') != -1: 101 | if datafile.find('process') == -1 and datafile.find('thread') == -1: 102 | memcached_resource = plot.MemcachedResource(config.memcached_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 103 | memcached_resource.work() 104 | if datafile.find('mongodb') != -1: 105 | if datafile.find('process') == -1 and datafile.find('thread') == -1: 106 | mongodb_resource = plot.MongodbResource(config.mongodb_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 107 | mongodb_resource.work() 108 | if datafile.find('apache') != -1: 109 | if datafile.find('process') == -1 and datafile.find('thread') == -1: 110 | apache_resource = plot.ApacheResource(config.apache_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 111 | apache_resource.work() 112 | if datafile.find('tomcat6') != -1: 113 | if datafile.find('process') == -1 and datafile.find('thread') == -1: 114 | tomcat_resource = plot.TomcatResource(config.tomcat6_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 115 | tomcat_resource.work() 116 | if datafile.find('tomcat7') != -1: 117 | if datafile.find('process') == -1 and datafile.find('thread') == -1: 118 | tomcat_resource = plot.TomcatResource(config.tomcat7_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 119 | tomcat_resource.work() 120 | if datafile.find('nginx') != -1: 121 | if datafile.find('process') == -1 and datafile.find('thread') == -1: 122 | nginx_resource = plot.TomcatResource(config.nginx_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 123 | nginx_resource.work() 124 | if datafile.find('SocketStat') != -1: 125 | socket_stat_resource = plot.SocketStatResource(config.socket_stat_types, result_prefix, config.res_dir+"/"+datafile, config.granularity) 126 | socket_stat_resource.work() 127 | 128 | # generate sum report 129 | report.Report.end_time = end_time 130 | resource_sum_report = report.Report(config.res_dir) 131 | resource_sum_report.work() 132 | 133 | if __name__ == "__main__": 134 | main() 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /bin/monitor_apache.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | import sys 3 | import time 4 | import requests 5 | 6 | from util import get_parameter_lists 7 | 8 | 9 | class MonitorApache(): 10 | 11 | def __init__(self, url, interval, end_time, filename, user, password): 12 | self.url = url 13 | self.interval = int(interval) 14 | self.end_time = float(end_time) 15 | self.filename = filename 16 | self.user = user 17 | self.password = password 18 | 19 | def work(self): 20 | while time.time() < self.end_time: 21 | if self.user and self.password: 22 | r = requests.get(self.url, auth=(self.user, self.password)) 23 | else: 24 | r = requests.get(self.url) 25 | if r.status_code == 200: 26 | currently_processed = r.text.split('requests currently being processed')[0].split('
')[-1].replace(' ', '') 27 | idle_worker = r.text.split('requests currently being processed')[-1].split('idle workers')[0].replace(',', '').replace(' ', '') 28 | key = r.text.split('
')[1].split('
')[0].replace('\n', '') 29 | waiting_for_connection = str(key.count('_')) 30 | starting_up = str(key.count('S')) 31 | reading_request = str(key.count('R')) 32 | sending_reply = str(key.count('W')) 33 | keepalive_read = str(key.count('K')) 34 | dns_lookup = str(key.count('D')) 35 | closing_connection = str(key.count('C')) 36 | logging = str(key.count('L')) 37 | gracefully_finishing = str(key.count('G')) 38 | idle_cleanup_of_worker = str(key.count('I')) 39 | open_slot_with_no_current_process = str(key.count('.')) 40 | stats_time = time.strftime('%H:%M:%S %p', time.localtime(time.time())) 41 | stats_list = [stats_time, currently_processed, idle_worker, waiting_for_connection, starting_up, 42 | reading_request, sending_reply, keepalive_read, dns_lookup, closing_connection, 43 | logging, gracefully_finishing, idle_cleanup_of_worker, open_slot_with_no_current_process] 44 | with open(self.filename, 'a') as f: 45 | f.write(' '.join(stats_list)+'\n') 46 | time.sleep(self.interval) 47 | 48 | 49 | def main(): 50 | parameters = get_parameter_lists(sys.argv) 51 | if len(parameters) == 4: 52 | url = parameters[0] 53 | interval = parameters[1] 54 | end_time = parameters[2] 55 | filename = parameters[3] 56 | user = None 57 | password = None 58 | if len(parameters) == 6: 59 | url = parameters[0] 60 | interval = parameters[1] 61 | end_time = parameters[2] 62 | filename = parameters[3] 63 | user = parameters[4] 64 | password = parameters[5] 65 | monitor_apache_status = MonitorApache(url, interval, end_time, filename, user, password) 66 | monitor_apache_status.work() 67 | 68 | if __name__ == "__main__": 69 | main() -------------------------------------------------------------------------------- /bin/monitor_clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #get the config 4 | source ../conf/config.ini 5 | 6 | systemType=`uname` 7 | case $systemType in 8 | Linux) 9 | files=`ls -lt $resDir | wc -l` 10 | 11 | if [ $files -gt 1 ];then 12 | newDir=`cat $startTimeRecord` 13 | mkdir $backupDir/$newDir 14 | mv $resDir/* $backupDir/$newDir 15 | 16 | fi 17 | 18 | echo "--------------------------------------------------" 19 | echo "|Finish Backup ! |" 20 | echo "--------------------------------------------------" 21 | exit 0 22 | ;; 23 | *) 24 | echo Unknow platform,please add this platform monitor into the script. 25 | exit 0 26 | ;; 27 | esac 28 | exit 0 29 | -------------------------------------------------------------------------------- /bin/monitor_memcached.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | 3 | import sys 4 | import time 5 | import bmemcached 6 | 7 | from util import get_parameter_lists 8 | 9 | 10 | class MonitorMemcachedStat: 11 | 12 | def __init__(self, ip, port, interval, end_time, filename, user, passwd): 13 | if user != '' and passwd != '': 14 | self.client = bmemcached.Client(('%s:%s' % (ip, port),), user, passwd) 15 | else: 16 | self.client = bmemcached.Client(('%s:%s' % (ip, port),)) 17 | self.ip = ip 18 | self.port = port 19 | self.interval = int(interval) 20 | self.end_time = float(end_time) 21 | self.filename = filename 22 | 23 | def work(self): 24 | while time.time() < self.end_time: 25 | stats = self.client.stats()['%s:%s' % (self.ip, self.port)] 26 | curr_connections = stats.get('curr_connections') 27 | cmd_get = stats.get('cmd_get') 28 | cmd_set = stats.get('cmd_set') 29 | cmd_flush = stats.get('cmd_flush') 30 | get_hits = stats.get('get_hits') 31 | get_misses = stats.get('get_misses') 32 | get_total = float(int(get_hits)+int(get_misses)) 33 | if int(get_hits) != 0 or int(get_total) != 0: 34 | hit_rate = '%0.2f' % float(float(int(get_hits)*100)/get_total) 35 | else: 36 | hit_rate = '0' 37 | bytes_read = stats.get('bytes_read') 38 | bytes_written = stats.get('bytes_written') 39 | limit_maxbytes = stats.get('limit_maxbytes') 40 | accepting_conns = stats.get('accepting_conns') 41 | threads = stats.get('threads') 42 | bytes = stats.get('bytes') 43 | curr_items = stats.get('curr_items') 44 | total_items = stats.get('total_items') 45 | evictions = stats.get('evictions') 46 | stats_time = time.strftime('%H:%M:%S %p', time.localtime(time.time())) 47 | stats_list = [stats_time, curr_connections, cmd_get, cmd_set, cmd_flush, get_hits, 48 | get_misses, str(hit_rate), bytes_read, bytes_written, limit_maxbytes, 49 | accepting_conns, threads, bytes, curr_items, total_items, evictions] 50 | with open(self.filename, 'a') as f: 51 | f.write(' '.join(stats_list)+'\n') 52 | time.sleep(self.interval) 53 | 54 | 55 | def main(): 56 | parameters = get_parameter_lists(sys.argv) 57 | if len(parameters) == 5: 58 | ip = parameters[0] 59 | port = parameters[1] 60 | interval = parameters[2] 61 | end_time = parameters[3] 62 | filename = parameters[4] 63 | user = '' 64 | passwd = '' 65 | monitor_memcached_stat = MonitorMemcachedStat(ip, port, interval, end_time, filename, user, passwd) 66 | monitor_memcached_stat.work() 67 | if len(parameters) == 7: 68 | ip = parameters[0] 69 | port = parameters[1] 70 | interval = parameters[2] 71 | end_time = parameters[3] 72 | filename = parameters[4] 73 | user = parameters[5] 74 | passwd = parameters[6] 75 | monitor_memcached_stat = MonitorMemcachedStat(ip, port, interval, end_time, filename, user, passwd) 76 | monitor_memcached_stat.work() 77 | 78 | if __name__ == "__main__": 79 | main() 80 | -------------------------------------------------------------------------------- /bin/monitor_nginx.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | import sys 3 | import time 4 | import requests 5 | 6 | from util import get_parameter_lists 7 | 8 | 9 | class MonitorNginx(): 10 | 11 | def __init__(self, url, interval, end_time, filename): 12 | self.url = url 13 | self.interval = int(interval) 14 | self.end_time = float(end_time) 15 | self.filename = filename 16 | 17 | def work(self): 18 | while time.time() < self.end_time: 19 | r = requests.get(self.url) 20 | if r.status_code == 200: 21 | active_connections = r.text.split('Active connections:')[-1].split()[0] 22 | handled_connections = r.text.split('server accepts handled requests')[-1].split()[0] 23 | handled_handshake = r.text.split('server accepts handled requests')[-1].split()[1] 24 | handled_requests = r.text.split('server accepts handled requests')[-1].split()[2] 25 | reading = r.text.split('Reading:')[-1].split()[0] 26 | writing = r.text.split('Writing:')[-1].split()[0] 27 | waiting = r.text.split('Waiting:')[-1].split()[0] 28 | stats_time = time.strftime('%H:%M:%S %p', time.localtime(time.time())) 29 | stats_list = [stats_time, active_connections, handled_connections, handled_handshake, handled_requests, 30 | reading, writing, waiting] 31 | with open(self.filename, 'a') as f: 32 | f.write(' '.join(stats_list)+'\n') 33 | time.sleep(self.interval) 34 | 35 | 36 | def main(): 37 | parameters = get_parameter_lists(sys.argv) 38 | if len(parameters) == 4: 39 | url = parameters[0] 40 | interval = parameters[1] 41 | end_time = parameters[2] 42 | filename = parameters[3] 43 | 44 | monitor_nginx_status = MonitorNginx(url, interval, end_time, filename) 45 | monitor_nginx_status.work() 46 | 47 | if __name__ == "__main__": 48 | main() -------------------------------------------------------------------------------- /bin/monitor_start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #导入配置参数 4 | source ../conf/config.ini 5 | 6 | #记录PID号 7 | echo $$ > $pidRecord 8 | 9 | function envError(){ 10 | echo "---------------------Error------------------------" 11 | echo "--------------------------------------------------" 12 | echo "|performance_monitor can not start ... |" 13 | echo "|make sure system has installed: |" 14 | echo "|1.sysstat |" 15 | echo "|2.python |" 16 | echo "|3.python-numpy |" 17 | echo "|4.python-Matplotlib |" 18 | echo "|5.python-memcached |" 19 | echo "|6.python-requests |" 20 | echo "|7.MySQL-python |" 21 | echo "--------------------------------------------------" 22 | exit 1 23 | } 24 | 25 | #判断是否已安装sar和python 26 | if [ ! -f "/usr/bin/sar" ];then 27 | envError 28 | elif [ ! -f "/usr/bin/python" ];then 29 | envError 30 | fi 31 | 32 | #操作记录 33 | echo "`date`: $0 $@ " >> $historyLog 34 | 35 | function paraError(){ 36 | echo "-----------------------------Error-----------------------------------" 37 | echo "---------------------------------------------------------------------" 38 | echo "Version: $version " 39 | echo "parameter error " 40 | echo "./monitor_start.sh -i interval -c count [-t time] -f prefix_name " 41 | echo "parameter: " 42 | echo " -i monitoring interval " 43 | echo " -c monitoring count " 44 | echo " -t monitoring time(minute) " 45 | echo " (If you set the -t ,the script ignore the -c parameter) " 46 | echo " -f the prefix of the recording file " 47 | echo " format: test-v1.0-dir (use '-' for separator, not '_' ) " 48 | echo "---------------------------------------------------------------------" 49 | exit 1 50 | } 51 | 52 | #解析输入参数 53 | while getopts :i:c:t:f: args 54 | do 55 | case $args in 56 | i)interval=$OPTARG 57 | ;; 58 | c)count=$OPTARG 59 | ;; 60 | t)monitorTime=$OPTARG 61 | ;; 62 | f)prefix=$OPTARG 63 | ;; 64 | \?)paraError 65 | exit; 66 | esac 67 | done 68 | 69 | #判断传入参数是否正确 70 | if [ -z $interval ];then 71 | paraError 72 | fi 73 | if [ -z $prefix ];then 74 | paraError 75 | fi 76 | if [[ -z $count && -z $monitorTime ]];then 77 | paraError 78 | fi 79 | 80 | #-f 传入参数不能带下划线_ 81 | hostname=`hostname | sed 's/\//_/'` 82 | fJudge=$(echo $prefix | grep "_") 83 | if [[ "$fJudge" != "" ]];then 84 | paraError 85 | else 86 | filename=$prefix"_"$hostname 87 | fi 88 | 89 | #若使用-t指定时长,将忽略-c参数 90 | if [ ! -z $monitorTime ];then 91 | echo "using -t parameter, ignore -c parameter" 92 | count=$(($monitorTime*60/$interval)) 93 | fi 94 | 95 | time=`date +%Y%m%d%H%M` 96 | formatted_start_time=`date '+%Y-%m-%d %H:%M:%S'` 97 | 98 | echo "--------------------------------------------------" 99 | echo "|performance_monitor is going to start ... |" 100 | echo "--------------------------------------------------" 101 | ################################################# 102 | #backup the old data 103 | ################################################# 104 | echo "--------------------------------------------------" 105 | echo "|Auto Backup the old result |" 106 | echo "--------------------------------------------------" 107 | ./monitor_clean.sh 108 | 109 | echo $filename"_"$time > $startTimeRecord 110 | startTime=`date +%s` 111 | endTime=$(($startTime+($count*$interval))) 112 | 113 | #监控进程时用于输出top监控菜单文件头 114 | function monitorProcessTitle(){ 115 | if [ $1 -eq 1 ];then 116 | title=`top -n 1 -b | grep "PID USER"` 117 | echo `date +%H:%M:%S` `date +%P` $title Threads>> $resDir/$filename"_process_"$2"_"$time.txt 118 | else 119 | echo "[ERROR]Cat not monitor the $2, there are several pids of $2. monitor will exit" 120 | exit 0 121 | fi 122 | } 123 | 124 | #监控进程时用于输出监控数据,来源top数据和ps -mP 125 | function monitorProcessData(){ 126 | mpPsData=$(eval `eval echo '$'"processCommand$mpCount"`) 127 | mpPID=`echo $mpPsData |awk '{print $2}'` 128 | mpPIDNumber=`echo $mpPsData |awk '{print $2}' |wc -l` 129 | mpTopName=$(eval echo '$'"processTopName$mpCount") 130 | mpSelfName=$(eval echo '$'"processSelfName$mpCount") 131 | if [ $mpPIDNumber -eq 1 ];then 132 | processData=`top -p $mpPID -n 1 -b |grep -w $mpTopName ` 133 | threadData=`ps -mP $mpPID |wc -l` 134 | if [[ "$processData" != "" ]];then 135 | echo `date +%H:%M:%S` `date +%P` $processData $threadData >> $resDir/$filename"_process_"$mpSelfName"_"$time.txt 136 | fi 137 | else 138 | exit 0 139 | fi 140 | } 141 | 142 | #监控进程占用资源函数 143 | function monitorProcess(){ 144 | processNumber=$(($processNumber+1)) 145 | 146 | #check the pid whether correct and create the file to record 147 | mpCount=1 148 | while [ $mpCount -lt $processNumber ] 149 | do 150 | mpPsData=$(eval `eval echo '$'"processCommand$mpCount"`) 151 | mpPID=`echo $mpPsData |awk '{print $2}'` 152 | mpPIDNumber=`echo $mpPsData |awk '{print $2}' |wc -l` 153 | mpTopName=$(eval echo '$'"processTopName$mpCount") 154 | mpSelfName=$(eval echo '$'"processSelfName$mpCount") 155 | monitorProcessTitle $mpPIDNumber $mpSelfName 156 | mpCount=$(($mpCount+1)) 157 | done 158 | 159 | #monitor the pid 160 | nowTime=`date +%s` 161 | while [ $nowTime -lt $endTime ] 162 | do 163 | mpCount=1 164 | while [ $mpCount -lt $processNumber ] 165 | do 166 | monitorProcessData $mpCount & 167 | mpCount=$(($mpCount+1)) 168 | done 169 | sleep $interval 170 | nowTime=`date +%s` 171 | done 172 | } 173 | 174 | 175 | function dumpMysqlSlowLog(){ 176 | $mysqlPath -h $mysqlIP -P $mysqlPort -u$mysqlUser -p$mysqlPassword -e"select * from mysql.slow_log where start_time >= '$formatted_start_time'" > $resDir/$filename"_mysql_slow_log_"$time.txt 177 | } 178 | 179 | function dumpMysqlProcessList(){ 180 | $mysqlPath -h $mysqlIP -P $mysqlPort -u$mysqlUser -p$mysqlPassword -e"SELECT * FROM information_schema.processlist" > $resDir/$filename"_mysql_process_list_"$time.txt 181 | } 182 | 183 | function killMysqlProcessList(){ 184 | killSql=`$mysqlPath -h $mysqlIP -P $mysqlPort -u$mysqlUser -p$mysqlPassword -e"SELECT CONCAT('KILL ',id,';') FROM information_schema.processlist WHERE Command='Query'" | grep -v CONCAT` 185 | $mysqlPath -h $mysqlIP -P $mysqlPort -u$mysqlUser -p$mysqlPassword mysql -e"$killSql" 186 | } 187 | 188 | 189 | function dumpMysqlInnodeLock(){ 190 | $mysqlPath -h $mysqlIP -P $mysqlPort -u$mysqlUser -p$mysqlPassword mysql -e"SELECT a.*, b.* FROM information_schema.INNODB_LOCK_WAITS a JOIN information_schema.INNODB_TRX c ON a.blocking_trx_id = c.trx_id JOIN information_schema.PROCESSLIST b ON c.trx_mysql_thread_id = b.ID ORDER BY TIME DESC ;" >> $resDir/$filename"_mysql_innode_lock_"$time.txt 191 | } 192 | 193 | #监控mysql线程函数 194 | function monitorMysql(){ 195 | echo `date +%H:%M:%S` `date +%P` Threads_connected > $resDir/$filename"_mysql_threads_"$time.txt 196 | nowTime=`date +%s` 197 | while [ $nowTime -lt $endTime ] 198 | do 199 | threads=`$mysqlPath -h $mysqlIP -P $mysqlPort -u$mysqlUser -p$mysqlPassword $mysqlDatabase -e"show global status like 'Threads_connected';" | grep Threads_connected |awk '{print $2}'` 200 | if [ ! -z $threads ];then 201 | echo `date +%H:%M:%S` `date +%P` $threads >> $resDir/$filename"_mysql_threads_"$time.txt 202 | fi 203 | sleep $interval 204 | nowTime=`date +%s` 205 | 206 | if [ $mysqlInnodeLockWaitsFlag -eq 1 ];then 207 | dumpMysqlInnodeLock 208 | fi 209 | done 210 | dumpMysqlSlowLog 211 | dumpMysqlProcessList 212 | killMysqlProcessList 213 | } 214 | 215 | 216 | 217 | #监控端口稳定连接数函数 218 | function monitorNetstat(){ 219 | echo `date +%H:%M:%S` `date +%P` ESTABLISHED > $resDir/$filename"_TCPPort_"$netstatPort"_"$time.txt 220 | nowTime=`date +%s` 221 | while [ $nowTime -lt $endTime ] 222 | do 223 | netstatData=`netstat -lan |grep ":$netstatPort" |grep ESTABLISHED |wc -l` 224 | echo `date +%H:%M:%S` `date +%P` $netstatData >> $resDir/$filename"_TCPPort_"$netstatPort"_"$time.txt 225 | sleep $interval 226 | nowTime=`date +%s` 227 | done 228 | } 229 | 230 | #监控socket不同状态数量函数 231 | function monitorSocketStat(){ 232 | echo `date +%H:%M:%S` `date +%P` LISTEN SYN-RECV ESTAB CLOSE-WAIT LAST_ACK FIN-WAIT-1 FIN-WAIT-2 CLOSING TIME_WAIT > $resDir/$filename"_SocketStat_"$time.txt 233 | nowTime=`date +%s` 234 | while [ $nowTime -lt $endTime ] 235 | do 236 | ss -t -a |awk '{print $1}' |sort | uniq -c |sed 's/^[ \t]*//g' > socket_stat.txt 237 | listenNum=`grep LISTEN socket_stat.txt| awk '{print $1}'` 238 | synRecvNum=`grep SYN-RECV socket_stat.txt| awk '{print $1}'` 239 | estabNum=`grep ESTAB socket_stat.txt| awk '{print $1}'` 240 | closeWaitNum=`grep CLOSE-WAIT socket_stat.txt| awk '{print $1}'` 241 | lastAckNum=`grep LAST_ACK socket_stat.txt| awk '{print $1}'` 242 | finWait1Num=`grep FIN-WAIT-1 socket_stat.txt| awk '{print $1}'` 243 | finWait2Num=`grep FIN-WAIT-2 socket_stat.txt| awk '{print $1}'` 244 | closingNum=`grep CLOSING socket_stat.txt| awk '{print $1}'` 245 | timeWaitNum=`grep TIME_WAIT socket_stat.txt| awk '{print $1}'` 246 | 247 | if [ -z $listenNum ];then 248 | listenNum=0 249 | fi 250 | if [ -z $synRecvNum ];then 251 | synRecvNum=0 252 | fi 253 | if [ -z $estabNum ];then 254 | estabNum=0 255 | fi 256 | if [ -z $closeWaitNum ];then 257 | closeWaitNum=0 258 | fi 259 | if [ -z $lastAckNum ];then 260 | lastAckNum=0 261 | fi 262 | if [ -z $finWait1Num ];then 263 | finWait1Num=0 264 | fi 265 | if [ -z $finWait2Num ];then 266 | finWait2Num=0 267 | fi 268 | if [ -z $closingNum ];then 269 | closingNum=0 270 | fi 271 | if [ -z $timeWaitNum ];then 272 | timeWaitNum=0 273 | fi 274 | 275 | echo `date +%H:%M:%S` `date +%P` $listenNum $synRecvNum $estabNum $closeWaitNum $lastAckNum $finWait1Num $finWait2Num $closingNum $timeWaitNum >> $resDir/$filename"_SocketStat_"$time.txt 276 | sleep $interval 277 | nowTime=`date +%s` 278 | done 279 | rm -rf socket_stat.txt 280 | } 281 | 282 | 283 | #监控redis info函数 284 | function monitorRedis(){ 285 | echo `date +%H:%M:%S` `date +%P` connected_clients used_memory used_memory_peak total_commands_processed keyspace_hits keyspace_misses hit_rate instantaneous_ops_per_sec > $resDir/$filename"_redis_"$time.txt 286 | nowTime=`date +%s` 287 | while [ $nowTime -lt $endTime ] 288 | do 289 | if [ -z $redisPassword ];then 290 | $redisPath/redis-cli -h $redisIP -p $redisPort info > redis_info.txt 291 | else 292 | $redisPath/redis-cli -h $redisIP -p $redisPort -a $redisPassword info > redis_info.txt 293 | fi 294 | connectedClients=`grep connected_clients redis_info.txt|cut -f2 -d':'|sed 's/\r//g'` 295 | usedMemory=`grep used_memory: redis_info.txt|cut -f2 -d":" |sed 's/\r//g'` 296 | usedMemoryPeak=`grep used_memory_peak: redis_info.txt|cut -f2 -d":" |sed 's/\r//g'` 297 | totalCommandsProcessed=`grep total_commands_processed redis_info.txt|cut -f2 -d":" |sed 's/\r//g'` 298 | keyspaceHits=`grep keyspace_hits redis_info.txt|cut -f2 -d":" |sed 's/\r//g'` 299 | keyspaceMisses=`grep keyspace_misses redis_info.txt|cut -f2 -d":" |sed 's/\r//g'` 300 | instantaneousOpsPerSec=`grep instantaneous_ops_per_sec redis_info.txt|cut -f2 -d":" |sed 's/\r//g'` 301 | 302 | oldRecord=`tail -1 $resDir/$filename"_redis_"$time.txt |grep -v connected` 303 | if [ ! -z "$oldRecord" ];then 304 | oldKeyspaceHits=`echo $oldRecord |cut -f7 -d" "` 305 | oldKeyspaceMisses=`echo $oldRecord |cut -f8 -d" "` 306 | realKeyspaceHits=$(($keyspaceHits-$oldKeyspaceHits)) 307 | realKeyspaceMisses=$(($keyspaceMisses-$oldKeyspaceMisses)) 308 | else 309 | realKeyspaceHits=$keyspaceHits 310 | realKeyspaceMisses=$keyspaceMisses 311 | fi 312 | keyspace=$(($realKeyspaceHits+$realKeyspaceMisses)) 313 | if [ $realKeyspaceHits -eq 0 -o $keyspace -eq 0 ];then 314 | hitRate=0 315 | else 316 | hitRate=$(($realKeyspaceHits*100/$keyspace)) 317 | fi 318 | echo `date +%H:%M:%S` `date +%P` $connectedClients $usedMemory $usedMemoryPeak $totalCommandsProcessed $keyspaceHits $keyspaceMisses $hitRate $instantaneousOpsPerSec >> $resDir/$filename"_redis_"$time.txt 319 | sleep $interval 320 | nowTime=`date +%s` 321 | done 322 | rm -rf redis_info.txt 323 | } 324 | 325 | #监控memcached stat函数 326 | function monitorMemcached(){ 327 | echo `date +%H:%M:%S` `date +%P` curr_connections cmd_get cmd_set cmd_flush get_hits get_misses hit_rate bytes_read bytes_written limit_maxbytes accepting_conns threads bytes curr_items total_items evictions > $resDir/$filename"_memcached_"$time.txt 328 | python monitor_memcached.py $memcachedIP $memcachedPort $interval $endTime $resDir/$filename"_memcached_"$time.txt $memcachedUser $memcachedPasswd 329 | } 330 | 331 | #监控mongodb stat函数 332 | function monitorMongoDB(){ 333 | echo `date +%H:%M:%S` `date +%P` `$mongodbPath/mongostat -h $mongodbIP --port $mongodbPort -u $mongodbUser -p $mongodbPassword --authenticationDatabase $authenticationDatabase --all -n 1 1 |grep -w insert |grep -v connected` > $resDir/$filename"_mongodb_"$time.txt 334 | nowTime=`date +%s` 335 | while [ $nowTime -lt $endTime ] 336 | do 337 | echo `date +%H:%M:%S` `date +%P` `$mongodbPath/mongostat -h $mongodbIP --port $mongodbPort -u $mongodbUser -p $mongodbPassword --authenticationDatabase $authenticationDatabase --noheaders --all -n 1 |grep -v connected` >> $resDir/$filename"_mongodb_"$time.txt & 338 | sleep $interval 339 | nowTime=`date +%s` 340 | done 341 | } 342 | 343 | #监控apache状态页面函数 344 | function monitorApache(){ 345 | echo `date +%H:%M:%S` `date +%P` currently_processed idle_worker waiting_for_connection starting_up reading_request sending_reply keepalive_read dns_lookup closing_connection logging gracefully_finishing idle_cleanup_of_worker open_slot_with_no_current_process > $resDir/$filename"_apache_"$time.txt 346 | python monitor_apache.py $apacheURL $interval $endTime $resDir/$filename"_apache_"$time.txt $apacheUser $apachePassword 347 | } 348 | 349 | #监控tomcat状态页面函数 350 | function monitorTomcat(){ 351 | tomcatNumber=$(($tomcatNumber+1)) 352 | mtCount=1 353 | while [ $mtCount -lt $tomcatNumber ] 354 | do 355 | tomcatType=$(eval echo '$'"tomcatType$mtCount") 356 | tomcatURL=$(eval echo '$'"tomcatURL$mtCount") 357 | tomcatMonitorSign=$(eval echo '$'"tomcatMonitorSign$mtCount") 358 | tomcatUser=$(eval echo '$'"tomcatUser$mtCount") 359 | tomcatPassword=$(eval echo '$'"tomcatPassword$mtCount") 360 | tomcatSelfName=$(eval echo '$'"tomcatSelfName$mtCount") 361 | if [[ "$tomcatType" == "tomcat6" ]];then 362 | tomcatResFile=$resDir/$filename"_tomcat6_"$tomcatSelfName"_"$time.txt 363 | echo `date +%H:%M:%S` `date +%P` free_memory total_memory max_threads current_thread_count current_thread_busy max_processing_time processing_time > $tomcatResFile 364 | python monitor_tomcat.py $tomcatURL $interval $endTime $tomcatResFile $tomcatMonitorSign $tomcatType $tomcatSelfName $tomcatUser $tomcatPassword & 365 | fi 366 | if [[ "$tomcatType" == "tomcat7" ]];then 367 | tomcatResFile=$resDir/$filename"_tomcat7_"$tomcatSelfName"_"$time.txt 368 | echo `date +%H:%M:%S` `date +%P` free_memory total_memory %ps_eden_space %ps_old_gen %ps_survivor_space max_threads current_thread_count current_thread_busy max_processing_time processing_time > $tomcatResFile 369 | python monitor_tomcat.py $tomcatURL $interval $endTime $tomcatResFile $tomcatMonitorSign $tomcatType $tomcatSelfName $tomcatUser $tomcatPassword & 370 | fi 371 | mtCount=$(($mtCount+1)) 372 | done 373 | } 374 | 375 | #监控nginx状态页面函数 376 | function monitorNginx(){ 377 | echo `date +%H:%M:%S` `date +%P` active_connections handled_connections handled_handshake handled_requests reading writing waiting > $resDir/$filename"_nginx_"$time.txt 378 | python monitor_nginx.py $nginxURL $interval $endTime $resDir/$filename"_nginx_"$time.txt 379 | } 380 | 381 | systemType=`uname` 382 | case $systemType in 383 | Linux) 384 | echo "--------------------------------------------------" 385 | echo "|Starting Linux monitor...... |" 386 | echo "--------------------------------------------------" 387 | echo "please don't kill the monitor process which running in the background" 388 | 389 | ############################################# 390 | #monitor common resource 391 | ############################################# 392 | if [ $serverSourceFlag -eq 1 ];then 393 | sar $interval $count > $resDir/$filename"_server_cpu_"$time.txt & 394 | sar $interval $count -r > $resDir/$filename"_server_memory_"$time.txt & 395 | sar -B $interval $count > $resDir/$filename"_server_paging_"$time.txt & 396 | sar -dp $interval $count > $resDir/$filename"_server_block_"$time.txt & 397 | sar -n DEV $interval $count > $resDir/$filename"_server_network_"$time.txt & 398 | sar -n SOCK $interval $count > $resDir/$filename"_server_socket_"$time.txt & 399 | sar -W $interval $count > $resDir/$filename"_server_swapping_"$time.txt & 400 | sar -b $interval $count > $resDir/$filename"_server_io_rate_"$time.txt & 401 | sar -v $interval $count > $resDir/$filename"_server_inode_"$time.txt & 402 | sar -q $interval $count > $resDir/$filename"_server_queue_load_"$time.txt & 403 | fi 404 | 405 | if [ $netstatFlag -eq 1 ];then 406 | monitorNetstat & 407 | fi 408 | 409 | if [ $socketFlag -eq 1 ];then 410 | monitorSocketStat & 411 | fi 412 | 413 | if [ $processFlag -eq 1 ];then 414 | monitorProcess & 415 | fi 416 | 417 | if [ $mysqlFlag -eq 1 ];then 418 | monitorMysql & 419 | fi 420 | 421 | if [ $redisFlag -eq 1 ];then 422 | monitorRedis & 423 | fi 424 | 425 | if [ $memcachedFlag -eq 1 ];then 426 | monitorMemcached & 427 | fi 428 | 429 | if [ $mongodbFlag -eq 1 ];then 430 | monitorMongoDB & 431 | fi 432 | 433 | if [ $apacheFlag -eq 1 ];then 434 | monitorApache & 435 | fi 436 | 437 | if [ $tomcatFlag -eq 1 ];then 438 | monitorTomcat & 439 | fi 440 | 441 | if [ $nginxFlag -eq 1 ];then 442 | monitorNginx & 443 | fi 444 | ############################################# 445 | #wait for monitor finish 446 | ############################################# 447 | delay=$(($interval*$count)) 448 | sleep $delay 449 | runFlag=1 450 | while [ $runFlag -eq 1 ] 451 | do 452 | sleep $interval 453 | checkFlag=`ps -ef |grep -w $$ |grep -v grep |wc -l` 454 | if [ $checkFlag -lt 3 ];then 455 | runFlag=0 456 | else 457 | runFlag=1 458 | fi 459 | done 460 | 461 | 462 | ############################################# 463 | #split the network information into eth0/1 464 | ############################################# 465 | if [ $serverSourceFlag -eq 1 ];then 466 | if [ ! -f $interface1 ];then 467 | cat $resDir/$filename"_server_network_"$time.txt | head -3 > $resDir/$interface1.txt 468 | cat $resDir/$filename"_server_network_"$time.txt | grep -w $interface1 >> $resDir/$interface1.txt 469 | mv $resDir/$interface1.txt $resDir/$filename"_server_"$interface1"_"$time.txt 470 | fi 471 | 472 | if [ ! -f $interface2 ];then 473 | cat $resDir/$filename"_server_network_"$time.txt | head -3 > $resDir/$interface2.txt 474 | cat $resDir/$filename"_server_network_"$time.txt | grep -w $interface2 >> $resDir/$interface2.txt 475 | mv $resDir/$interface2.txt $resDir/$filename"_server_"$interface2"_"$time.txt 476 | fi 477 | fi 478 | 479 | 480 | ############################################# 481 | #analyse data 482 | ############################################# 483 | echo "Start analyse the data" 484 | endTime=`date +%Y%m%d%H%M` 485 | python analyse.py $filename $endTime 486 | 487 | echo "Finish analyse the data" 488 | echo "Check the data and graph in result directory" 489 | echo "Finish monitor at `date`" >> $historyLog 490 | exit 0 491 | ;; 492 | *) 493 | echo Unknow platform,please add this platform monitor into the script. 494 | exit 0 495 | ;; 496 | 497 | esac 498 | exit 0 499 | 500 | -------------------------------------------------------------------------------- /bin/monitor_stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #get the config 4 | source ../conf/config.ini 5 | 6 | systemType=`uname` 7 | case $systemType in 8 | Linux) 9 | PID=`cat $pidRecord` 10 | echo $PID 11 | PIDS=`ps -ef |grep $PID |grep -v grep |awk '{print $2}'` 12 | echo $PIDS 13 | PIDSNumber=`ps -ef |grep $PID |grep -v grep |awk '{print $2}'|wc -l` 14 | while [ $PIDSNumber -gt 0 ] 15 | do 16 | kill -9 $PIDS 17 | PIDSNumber=`ps -ef |grep $PID |grep -v grep |awk '{print $2}'|wc -l` 18 | done 19 | echo The performance monitor have stopped! 20 | exit 0 21 | ;; 22 | *) 23 | echo Unknow platform,please add this platform monitor into the script. 24 | exit 0 25 | ;; 26 | esac 27 | exit 0 28 | -------------------------------------------------------------------------------- /bin/monitor_tomcat.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | import sys 3 | import time 4 | import requests 5 | 6 | from util import get_parameter_lists 7 | 8 | 9 | class MonitorTomcat(): 10 | 11 | def __init__(self, url, interval, end_time, filename, monitor_sign, tomcat_type, tomcat_self_name, user, password): 12 | self.url = url 13 | self.interval = int(interval) 14 | self.end_time = float(end_time) 15 | self.filename = filename 16 | self.monitor_sign = monitor_sign 17 | self.tomcat_type = tomcat_type 18 | self.tomcat_self_name = tomcat_self_name 19 | self.user = user 20 | self.password = password 21 | 22 | def work(self): 23 | while time.time() < self.end_time: 24 | if self.user and self.password: 25 | r = requests.get(self.url, auth=(self.user, self.password)) 26 | else: 27 | r = requests.get(self.url) 28 | if r.status_code == 200: 29 | free_memory = r.text.split('Free memory:')[-1].split('Total memory:')[0].strip().replace(' ', '') 30 | total_memory = r.text.split('Total memory:')[-1].split('Max memory:')[0].strip().replace(' ', '') 31 | if self.tomcat_type == 'tomcat6': 32 | pass 33 | elif self.tomcat_type == 'tomcat7': 34 | ps_eden_space = r.text.split('PS Eden Space')[-1].split(r'%')[0].split('(')[-1] 35 | ps_old_gen = r.text.split('PS Old Gen')[-1].split(r'%')[0].split('(')[-1] 36 | ps_survivor_space = r.text.split('PS Survivor Space')[-1].split(r'%')[0].split('(')[-1] 37 | split_sign = self.monitor_sign 38 | max_threads = r.text.split(split_sign)[-1].split('Max threads:')[1].split('Current thread count:')[0].strip() 39 | current_thread_count = r.text.split(split_sign)[-1].split('Current thread count:')[1].split('Current thread busy:')[0].strip() 40 | current_thread_busy = r.text.split(split_sign)[-1].split('Current thread busy:')[1].split('
')[0].split()[0].strip() 41 | max_processing_time = r.text.split(split_sign)[-1].split('Max processing time:')[1].split('Processing time:')[0].strip().replace(' ', '') 42 | processing_time = r.text.split(split_sign)[-1].split('Processing time:')[1].split('Request count:')[0].strip().replace(' ', '') 43 | 44 | stats_time = time.strftime('%H:%M:%S %p', time.localtime(time.time())) 45 | if self.tomcat_type == 'tomcat6': 46 | stats_list = [stats_time, free_memory, total_memory, max_threads, current_thread_count, 47 | current_thread_busy, max_processing_time, processing_time] 48 | elif self.tomcat_type == 'tomcat7': 49 | stats_list = [stats_time, free_memory, total_memory, ps_eden_space, ps_old_gen, ps_survivor_space, 50 | max_threads, current_thread_count, current_thread_busy, max_processing_time, processing_time] 51 | with open(self.filename, 'a') as f: 52 | f.write(' '.join(stats_list)+'\n') 53 | time.sleep(self.interval) 54 | 55 | 56 | def main(): 57 | parameters = get_parameter_lists(sys.argv) 58 | if len(parameters) == 7: 59 | url = parameters[0] 60 | interval = parameters[1] 61 | end_time = parameters[2] 62 | filename = parameters[3] 63 | monitor_sign = parameters[4] 64 | tomcat_type = parameters[5] 65 | tomcat_self_name = parameters[6] 66 | user = None 67 | password = None 68 | if len(parameters) == 9: 69 | url = parameters[0] 70 | interval = parameters[1] 71 | end_time = parameters[2] 72 | filename = parameters[3] 73 | monitor_sign = parameters[4] 74 | tomcat_type = parameters[5] 75 | tomcat_self_name = parameters[6] 76 | user = parameters[7] 77 | password = parameters[8] 78 | monitor_apache_status = MonitorTomcat(url, interval, end_time, filename, monitor_sign, tomcat_type, tomcat_self_name, user, password) 79 | monitor_apache_status.work() 80 | 81 | if __name__ == "__main__": 82 | main() 83 | -------------------------------------------------------------------------------- /bin/plot.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | import os 3 | import sys 4 | import re 5 | import time 6 | import copy 7 | import platform 8 | import traceback 9 | 10 | import numpy as np 11 | import matplotlib 12 | matplotlib.use('Agg') 13 | import matplotlib.pyplot as plt 14 | 15 | import util 16 | import report 17 | 18 | zhFont = matplotlib.font_manager.FontProperties(fname='../lib/ukai.ttc') 19 | 20 | class ServerResource(): 21 | """server resource base class""" 22 | 23 | def __init__(self, type_list, result_prefix, file_path, granularity=10): 24 | self.type = copy.copy(type_list) 25 | self.prefix = copy.copy(result_prefix) 26 | self.datafile = copy.copy(file_path) 27 | self.granularity = copy.copy(granularity) 28 | self.data = {} 29 | self.timestamp = [] 30 | self.timestamp_ticks = {} 31 | self.calculate_data = {} 32 | for i in xrange(len(self.type)): 33 | self.data.setdefault(self.type[i], []) 34 | self.upload_data = {} 35 | 36 | def read_data(self): 37 | """read raw data from file, generate timestamp into list 38 | and data into dictionary""" 39 | f = open(self.datafile, 'r') 40 | raw_data = [] 41 | raw_timestamp = [] 42 | try: 43 | #skip the useless line from the head 44 | skip_line = f.readline() 45 | while skip_line.find(":") == -1: 46 | skip_line = f.readline() 47 | 48 | #get the titles and skip the first timestamp 49 | titles = skip_line.split()[2:] 50 | 51 | #init raw data with titles as list structure 52 | for i in xrange(len(titles)): 53 | raw_data.append([]) 54 | raw_data[i].append(titles[i]) 55 | 56 | #skip the useless last line and get the raw data 57 | lines = f.readlines() 58 | 59 | for line in lines[:-1]: 60 | line = line.split() 61 | #generate raw timestamp 62 | raw_timestamp.append(line[0]+"_"+line[1]) 63 | 64 | #generate raw data by filtering digital 65 | line = line[2:] 66 | 67 | for i in xrange(len(titles)): 68 | value_flag = 1 69 | for char in line[i]: 70 | value_flag = util.is_value(char) 71 | if not value_flag: 72 | break 73 | if value_flag: 74 | raw_data[i].append(float(line[i])) 75 | 76 | #using the raw data to generate self data and timestamp 77 | for i in xrange(len(raw_data)): 78 | if raw_data[i][0] in self.type: 79 | self.data[raw_data[i][0]] = raw_data[i][1:] 80 | if len(raw_data[i][1:]) == len(raw_timestamp): 81 | self.timestamp = raw_timestamp 82 | else: 83 | print "[ERROR]raw data error in generating timestamp" 84 | finally: 85 | f.close() 86 | 87 | def data_filter(self): 88 | """ 89 | filtering data by granularity (Particle size in seconds) 90 | """ 91 | #get the granularity from original data 92 | data_granularity = (int(self.timestamp[1].split("_")[0].split(":")[2]) - 93 | int(self.timestamp[0].split("_")[0].split(":")[2])) 94 | if self.granularity <= data_granularity: 95 | return 96 | 97 | #using the new granularity to filtering timestamp 98 | temp_timestamp = [] 99 | for i in xrange(0, len(self.timestamp), self.granularity): 100 | temp_timestamp.append(self.timestamp[i]) 101 | self.timestamp = temp_timestamp 102 | 103 | #using the new granularity to filtering data 104 | for i in xrange(len(self.type)): 105 | temp_data = [] 106 | for j in xrange(0, len(self.timestamp), self.granularity): 107 | temp_data.append(self.data[self.type[i]][j]) 108 | self.data[self.type[i]] = temp_data 109 | 110 | def adapter(self): 111 | """ 112 | use this method to adapter the data to display 113 | example: changing KB into MB 114 | """ 115 | pass 116 | 117 | def analyse_data(self): 118 | """ 119 | get min, max, avg, p9 value of each type, 120 | restore into calculate data with dictionary structure 121 | """ 122 | calculate_data = [] 123 | for i in xrange(len(self.type)): 124 | calculate_data.append(util.get_min_value(self.data[self.type[i]])) 125 | calculate_data.append(util.get_max_value(self.data[self.type[i]])) 126 | calculate_data.append(util.get_avg_value(self.data[self.type[i]])) 127 | calculate_data.append(util.get_p9_value(self.data[self.type[i]])) 128 | self.calculate_data.setdefault(self.type[i], calculate_data) 129 | calculate_data = [] 130 | 131 | def get_timestamp_ticks(self): 132 | """ 133 | analyse timestamp to use in x ticks 134 | """ 135 | temp_ticks = [] 136 | 137 | #get hour for x ticks 138 | for i in xrange(len(self.timestamp)): 139 | temp_ticks.append(self.timestamp[i].split(":")[0]) 140 | 141 | #if hour number is less than 1, get minute for x ticks 142 | if len(list(set(temp_ticks))) == 1: 143 | temp_ticks = [] 144 | for i in xrange(len(self.timestamp)): 145 | temp_ticks.append(self.timestamp[i].split(":")[1]) 146 | 147 | #uniq and sort 148 | ticks = list(set(temp_ticks)) 149 | ticks.sort(key=temp_ticks.index) 150 | self.timestamp_ticks.setdefault("ticks", ticks) 151 | 152 | #get the ticks coordinate 153 | ticks_coordinate = [] 154 | for i in xrange(len(ticks)): 155 | ticks_coordinate.append(temp_ticks.index(ticks[i])) 156 | self.timestamp_ticks.setdefault("coordinate", ticks_coordinate) 157 | 158 | def plot_data(self): 159 | """plot data of type, """ 160 | 161 | for i in xrange(len(self.type)): 162 | plt.figure(i, figsize=(12.8, 8)) 163 | plt.grid(True) 164 | 165 | #set max p9 avg min value as legend 166 | plt.plot([self.calculate_data[self.type[i]][1]] * 167 | len(self.data[self.type[i]]), linewidth=1) 168 | plt.plot([self.calculate_data[self.type[i]][3]] * 169 | len(self.data[self.type[i]]), linewidth=1) 170 | plt.plot([self.calculate_data[self.type[i]][2]] * 171 | len(self.data[self.type[i]]), linewidth=1) 172 | plt.plot([self.calculate_data[self.type[i]][0]] * 173 | len(self.data[self.type[i]]), linewidth=1) 174 | legend = [] 175 | legend.append('max=%0.2f' % self.calculate_data[self.type[i]][1]) 176 | legend.append('90%%<%0.2f' % self.calculate_data[self.type[i]][3]) 177 | legend.append('avg=%0.2f' % self.calculate_data[self.type[i]][2]) 178 | legend.append('Min=%0.2f' % self.calculate_data[self.type[i]][0]) 179 | plt.legend(legend, loc="best") 180 | 181 | #plot the type data into stack and line 182 | plt.stackplot(xrange(len(self.data[self.type[i]])), 183 | self.data[self.type[i]], colors=["g"]) 184 | plt.plot(self.data[self.type[i]], color="k", linewidth=1) 185 | 186 | #set the x ticks label and limit 187 | plt.xticks(self.timestamp_ticks.get("coordinate"), 188 | self.timestamp_ticks.get("ticks")) 189 | plt.xlabel(u"时间"+"("+self.timestamp[0]+"~"+ 190 | self.timestamp[len(self.timestamp)-1]+")", 191 | fontproperties=zhFont, fontsize=15, fontstretch=500) 192 | plt.xlim(0, len(self.data[self.type[i]])) 193 | 194 | #set the y label and limit 195 | plt.ylabel(self.type[i], fontsize=15, fontstretch=500) 196 | if self.calculate_data[self.type[i]][1] > 100: 197 | plt.ylim(0, self.calculate_data[self.type[i]][1]*1.2) 198 | elif self.type[i].find("%") != -1: 199 | plt.ylim(0, 100) 200 | else: 201 | plt.ylim(0, self.calculate_data[self.type[i]][1]*1.2) 202 | 203 | #set the title 204 | temp = self.datafile.split("/")[-1].split(".") 205 | temp.pop(-1) 206 | title = "" 207 | for j in xrange(len(temp)): 208 | title += temp[j] 209 | title += "." 210 | title = title[:-1] 211 | title += "-" + self.type[i] 212 | plt.title(title, fontsize=15, fontstretch=500) 213 | 214 | #save graph into png 215 | png_name = (self.datafile.split(".txt")[0] + "-" + 216 | self.type[i].replace(r"/s", "").replace("%", "") 217 | + ".png") 218 | #print png_name 219 | plt.savefig(png_name) 220 | plt.close() 221 | 222 | if self.type[i] in (r'%used', r'%iowait', r'%memused--', r'ldavg-1'): 223 | self.upload_data.setdefault(self.type[i], {'timestamp': self.timestamp, 224 | 'data': self.data[self.type[i]]}) 225 | 226 | def record(self): 227 | """ 228 | record the calculate_data into report object 229 | which is used to generate HTML report 230 | """ 231 | filename_decompose_list = self.datafile.split(r"/")[2].split("_") 232 | report.Report.datafile_prefix = filename_decompose_list[0] 233 | report.Report.start_time = filename_decompose_list[-1].split(".txt")[0] 234 | filename_decompose_list = filename_decompose_list[2:-1] 235 | 236 | resource_type = "" 237 | for i in xrange(len(filename_decompose_list)): 238 | if resource_type != "": 239 | resource_type += "_"+filename_decompose_list[i] 240 | else: 241 | resource_type = filename_decompose_list[i] 242 | report.Report.data_sum.setdefault(resource_type, self.calculate_data) 243 | report.Report.line_data.update(self.upload_data) 244 | 245 | def work(self): 246 | self.read_data() 247 | self.data_filter() 248 | self.adapter() 249 | self.analyse_data() 250 | self.get_timestamp_ticks() 251 | self.plot_data() 252 | self.record() 253 | 254 | 255 | class CPUResource(ServerResource): 256 | 257 | def adapter(self): 258 | """ 259 | change %idle to %used 260 | """ 261 | #change the self type %idle to %used 262 | self.type[self.type.index("%idle")] = "%used" 263 | 264 | #pop the %idle data, and add %used data 265 | temp_data = self.data.pop("%idle") 266 | for i in xrange(len(temp_data)): 267 | temp_data[i] = float("%0.2f" % (100 - temp_data[i])) 268 | self.data.setdefault("%used", temp_data) 269 | 270 | 271 | class MemoryResource(ServerResource): 272 | 273 | def adapter(self): 274 | """ 275 | change KB --> MB 276 | %memused --> %(memused - cached - buffer) 277 | """ 278 | #change %memused into %memused-- 279 | temp_memused = self.data.get("kbmemused") 280 | temp_cached = self.data.get("kbcached") 281 | temp_buffers = self.data.get("kbbuffers") 282 | temp_memfree = self.data.get("kbmemfree") 283 | temp_memory_percent = [] 284 | for i in xrange(len(self.data.get("%memused"))): 285 | temp_memory_percent.append(float("%0.2f" % (((temp_memused[i] 286 | - temp_buffers[i] 287 | - temp_cached[i]) * 100) 288 | / (temp_memused[i] + temp_memfree[i])))) 289 | self.data.setdefault("%memused--", temp_memory_percent) 290 | self.type.append("%memused--") 291 | 292 | #chang self data dictionary key with kb into MB 293 | for i in xrange(len(self.type)): 294 | if self.type[i].find("kb") != -1: 295 | temp_data = self.data.pop(self.type[i]) 296 | for j in xrange(len(temp_data)): 297 | temp_data[j] = float("%0.2f" % (temp_data[j] / 1024)) 298 | self.data.setdefault(self.type[i].replace("kb", "") + "(MB)", 299 | temp_data) 300 | #change self type with kb into MB 301 | for i in xrange(len(self.type)): 302 | if self.type[i].find("kb") != -1: 303 | self.type[i] = self.type[i].replace("kb", "") + "(MB)" 304 | 305 | 306 | class IOResource(ServerResource): 307 | 308 | def adapter(self): 309 | """ 310 | change bread/s, bwitn/s into MBread/s, MBwitn/s 311 | """ 312 | #chang self data dictionary key with bxxxx/s into MBxxxx/s 313 | for i in xrange(len(self.type)): 314 | if self.type[i].find("b") != -1: 315 | temp_data = self.data.pop(self.type[i]) 316 | for j in xrange(len(temp_data)): 317 | temp_data[j] = float("%0.2f" % (temp_data[j] / 2048)) 318 | self.data.setdefault(self.type[i].replace("b", "") + "(MB)", 319 | temp_data) 320 | 321 | #change self type with bxxxx/s into MBxxxx/s 322 | for i in xrange(len(self.type)): 323 | if self.type[i].find("b") != -1: 324 | self.type[i] = self.type[i].replace("b", "") + "(MB)" 325 | 326 | 327 | class EthResource(ServerResource): 328 | 329 | def adapter(self): 330 | """ 331 | change byte into MB or KB into MB 332 | """ 333 | #according system type to decide the keyword 334 | if platform.platform().find("Ubuntu") != -1: 335 | keyword = "kB" 336 | if platform.platform().find("debian") != -1: 337 | keyword = "kB" 338 | elif platform.platform().find("centos") != -1: 339 | keyword = "kB" 340 | elif platform.platform().find("redhat") != -1: 341 | keyword = "byt" 342 | else: 343 | print "[ERROR]unknow platform" 344 | 345 | #change self data dictionary key with byte/kb into MB 346 | for i in xrange(len(self.type)): 347 | if self.type[i].find(keyword) != -1: 348 | temp_data = self.data.pop(self.type[i]) 349 | for j in xrange(len(temp_data)): 350 | if keyword == "kB": 351 | temp_data[j] = float("%0.2f" % (temp_data[j] / 1024)) 352 | if keyword == "byt": 353 | temp_data[j] = float("%0.2f" % (temp_data[j] / 1048576)) 354 | self.data.setdefault(self.type[i].replace(keyword, "") + "(MB)", 355 | temp_data) 356 | #change self type with byte/kb into MB 357 | for i in xrange(len(self.type)): 358 | if self.type[i].find(keyword) != -1: 359 | self.type[i] = self.type[i].replace(keyword, "") + "(MB)" 360 | 361 | 362 | class LoadResource(ServerResource): 363 | """just inherit from ServerResource""" 364 | pass 365 | 366 | 367 | class SockResource(ServerResource): 368 | """just inherit from ServerResource""" 369 | pass 370 | 371 | 372 | class ProcessResource(ServerResource): 373 | """just inherit from ServerResource""" 374 | pass 375 | 376 | 377 | class MySQLResource(ServerResource): 378 | """just inherit from ServerResource""" 379 | pass 380 | 381 | 382 | class TCPPortResource(ServerResource): 383 | """just inherit from ServerResource""" 384 | pass 385 | 386 | 387 | class ThreadsResource(ServerResource): 388 | """just inherit from ServerResource""" 389 | pass 390 | 391 | 392 | class RedisResource(ServerResource): 393 | 394 | def adapter(self): 395 | for i in xrange(len(self.type)): 396 | if self.type[i].find("used_memory") != -1: 397 | temp_data = self.data.pop(self.type[i]) 398 | for j in xrange(len(temp_data)): 399 | temp_data[j] = float("%0.2f" % (temp_data[j] / 1048576)) 400 | self.data.setdefault(self.type[i] + '(MB)', temp_data) 401 | 402 | for i in xrange(len(self.type)): 403 | if self.type[i].find("used_memory") != -1: 404 | self.type[i] += "(MB)" 405 | 406 | 407 | class MemcachedResource(ServerResource): 408 | """just inherit from ServerResource""" 409 | pass 410 | 411 | 412 | class MongodbResource(ServerResource): 413 | 414 | def read_data(self): 415 | """read raw data from file, generate timestamp into list 416 | and data into dictionary""" 417 | f = open(self.datafile, 'r') 418 | raw_data = [] 419 | raw_timestamp = [] 420 | try: 421 | #skip the useless line from the head 422 | skip_line = f.readline() 423 | while skip_line.find(":") == -1: 424 | skip_line = f.readline() 425 | 426 | #get the titles and skip the first timestamp 427 | titles = skip_line.split()[2:] 428 | 429 | #pop special title for mongodb stats 430 | if self.datafile.find('mongodb') != -1 and self.datafile.find('process') == -1 and self.datafile.find('thread') == -1: 431 | try: 432 | titles.pop(titles.index('db')) 433 | titles.pop(titles.index(r'%')) 434 | titles.pop(titles.index('idx')) 435 | except Exception, e: 436 | pass 437 | 438 | #init raw data with titles as list structure 439 | for i in xrange(len(titles)): 440 | raw_data.append([]) 441 | raw_data[i].append(titles[i]) 442 | 443 | #skip the useless last line and get the raw data 444 | lines = f.readlines() 445 | 446 | for line in lines: 447 | line = line.split() 448 | #generate raw timestamp 449 | raw_timestamp.append(line[0]+"_"+line[1]) 450 | 451 | #generate raw data by filtering digital 452 | line = line[2:] 453 | 454 | for i in xrange(len(titles)): 455 | raw_data[i].append(line[i]) 456 | 457 | #using the raw data to generate self data and timestamp 458 | for i in xrange(len(raw_data)): 459 | if raw_data[i][0] in self.type: 460 | self.data[raw_data[i][0]] = raw_data[i][1:] 461 | if len(raw_data[i][1:]) == len(raw_timestamp): 462 | self.timestamp = raw_timestamp 463 | else: 464 | print "[ERROR]raw data error in generating timestamp" 465 | finally: 466 | f.close() 467 | 468 | def adapter(self): 469 | for i in xrange(len(self.type)): 470 | temp_type = self.type[i] 471 | temp_data = self.data.pop(temp_type) 472 | if temp_type.find('mapped') != -1 or temp_type.find('vsize') != -1 or temp_type.find('res') != -1 or temp_type.find('non-mapped') != -1: 473 | self.type[i] = temp_type+'(MB)' 474 | for j in xrange(len(temp_data)): 475 | data = temp_data[j] 476 | if data.find('g') != -1 or data.find('G') != -1: 477 | temp_data[j] = int(float(data[:-1])*1024) 478 | elif data.find('m') != -1 or data.find('M') != -1: 479 | temp_data[j] = int(float(data[:-1])) 480 | elif data.find('k') != -1 or data.find('K') != -1: 481 | temp_data[j] = int(float(data[:-1])/1024) 482 | else: 483 | temp_data[j] = int(float(data)/1048576) 484 | self.data.setdefault(self.type[i], temp_data) 485 | if temp_type.find('insert') != -1 or temp_type.find('query') != -1 or temp_type.find('update') != -1 or temp_type.find('delete') != -1: 486 | for j in xrange(len(temp_data)): 487 | if temp_data[j].find('*') != -1: 488 | temp_data[j] = int(temp_data[j].replace('*', '')) 489 | else: 490 | temp_data[j] = int(temp_data[j]) 491 | self.data.setdefault(self.type[i], temp_data) 492 | if temp_type.find('getmore') != -1 or temp_type.find('flushes') != -1 or temp_type.find('faults') != -1 or temp_type.find('conn') != -1: 493 | for j in xrange(len(temp_data)): 494 | temp_data[j] = int(temp_data[j]) 495 | self.data.setdefault(self.type[i], temp_data) 496 | 497 | 498 | class ApacheResource(ServerResource): 499 | """just inherit from ServerResource""" 500 | pass 501 | 502 | 503 | class TomcatResource(ServerResource): 504 | 505 | def read_data(self): 506 | """read raw data from file, generate timestamp into list 507 | and data into dictionary""" 508 | f = open(self.datafile, 'r') 509 | raw_data = [] 510 | raw_timestamp = [] 511 | try: 512 | #skip the useless line from the head 513 | skip_line = f.readline() 514 | while skip_line.find(":") == -1: 515 | skip_line = f.readline() 516 | 517 | #get the titles and skip the first timestamp 518 | titles = skip_line.split()[2:] 519 | 520 | #init raw data with titles as list structure 521 | for i in xrange(len(titles)): 522 | raw_data.append([]) 523 | raw_data[i].append(titles[i]) 524 | 525 | #skip the useless last line and get the raw data 526 | lines = f.readlines() 527 | 528 | for line in lines: 529 | line = line.split() 530 | #generate raw timestamp 531 | raw_timestamp.append(line[0]+"_"+line[1]) 532 | 533 | #generate raw data by filtering digital 534 | line = line[2:] 535 | 536 | for i in xrange(len(titles)): 537 | raw_data[i].append(line[i]) 538 | 539 | #using the raw data to generate self data and timestamp 540 | for i in xrange(len(raw_data)): 541 | if raw_data[i][0] in self.type: 542 | self.data[raw_data[i][0]] = raw_data[i][1:] 543 | if len(raw_data[i][1:]) == len(raw_timestamp): 544 | self.timestamp = raw_timestamp 545 | else: 546 | print "[ERROR]raw data error in generating timestamp" 547 | finally: 548 | f.close() 549 | 550 | def adapter(self): 551 | for i in xrange(len(self.type)): 552 | temp_type = self.type[i] 553 | temp_data = self.data.pop(temp_type) 554 | if temp_type.find('free_memory') != -1 or temp_type.find('total_memory') != -1: 555 | self.type[i] = temp_type+'(MB)' 556 | for j in xrange(len(temp_data)): 557 | data = temp_data[j] 558 | if data.find('G') != -1 or data.find('g') != -1: 559 | temp_data[j] = int(float(data[:-1])*1024) 560 | elif data.find('MB') != -1 or data.find('mb') != -1: 561 | temp_data[j] = float(data[:-2]) 562 | elif data.find('KB') != -1 or data.find('kb') != -1: 563 | temp_data[j] = int(float(data[:-2])/1024) 564 | else: 565 | temp_data[j] = int(float(data)/1048576) 566 | self.data.setdefault(self.type[i], temp_data) 567 | elif temp_type.find('max_processing_time') != -1 or temp_type.find('processing_time') != -1: 568 | self.type[i] = temp_type + '(s)' 569 | for j in xrange(len(temp_data)): 570 | data = temp_data[j] 571 | if data.find('ms') != -1 or data.find('MS') != -1: 572 | temp_data[j] = float("%0.3f" % float(float(data[:-2])/1024)) 573 | elif data.find('s') != -1 or data.find('S') != -1: 574 | temp_data[j] = float(data[:-1]) 575 | self.data.setdefault(self.type[i], temp_data) 576 | else: 577 | for j in xrange(len(temp_data)): 578 | temp_data[j] = int(temp_data[j]) 579 | self.data.setdefault(self.type[i], temp_data) 580 | 581 | 582 | class NginxResource(ServerResource): 583 | """just inherit from ServerResource""" 584 | pass 585 | 586 | 587 | class SocketStatResource(ServerResource): 588 | pass 589 | -------------------------------------------------------------------------------- /bin/report.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | import os 3 | import time 4 | import copy 5 | import json 6 | import commands 7 | import ConfigParser 8 | import requests 9 | from ftplib import FTP 10 | 11 | import util 12 | from jinja2 import Environment, FileSystemLoader 13 | 14 | env = Environment(loader=FileSystemLoader('./templates')) 15 | template = env.get_template('report.html') 16 | 17 | 18 | class Report: 19 | 20 | datafile_prefix = "" 21 | start_time = "" 22 | end_time = "" 23 | data_sum = {} 24 | system_information = {} 25 | result_dir = "" 26 | report_file = "" 27 | package_file = "" 28 | ftp_ip = "" 29 | ftp_user = "" 30 | ftp_password = "" 31 | ftp_flag = 0 32 | 33 | # 用于上传数据 34 | api_url = "" 35 | api_flag = 0 36 | api_monitor_type = "" 37 | summary_data = {} 38 | line_data = {} 39 | 40 | def __init__(self, result_dir): 41 | self.result_dir = copy.copy(result_dir) 42 | 43 | def get_conf(self): 44 | config = ConfigParser.ConfigParser() 45 | with open("../conf/report.ini", "r") as cfg_file: 46 | config.readfp(cfg_file) 47 | self.ftp_flag = int(config.get("ftp", "flag")) 48 | self.ftp_ip = config.get("ftp", "ip") 49 | self.ftp_user = config.get("ftp", "user") 50 | self.ftp_password = config.get("ftp", "password") 51 | 52 | self.api_url = config.get("api", "url") 53 | self.api_flag = int(config.get("api", "flag")) 54 | self.api_monitor_type = config.get('api', 'type') 55 | 56 | def get_system_information(self): 57 | """ 58 | get base system information for xls report 59 | include hostname, kernel version, cpuinfo, meminfo, filesystem 60 | """ 61 | system_command = [ 62 | ["hostname", "hostname"], 63 | ["kernel", "cat /proc/version |cut -f1 -d'('"], 64 | ["cpuinfo", "cat /proc/cpuinfo |grep name |cut -f2 -d: \ 65 | |uniq -c |sed -e 's/^[ \t]*//'"], 66 | ["meminfo", 67 | " cat /proc/meminfo |head -1|cut -f2- -d':'|sed -e 's/^[ \t]*//'"], 68 | ["filesystem", "df -h"]] 69 | for i in xrange(len(system_command)): 70 | status, output = commands.getstatusoutput(system_command[i][1]) 71 | if not status: 72 | self.system_information.setdefault(system_command[i][0], output) 73 | 74 | def set_file_name(self): 75 | self.report_file = (self.result_dir + "/" + self.datafile_prefix + 76 | "_" + self.system_information.get("hostname") + 77 | "_monitor_" + self.start_time + ".html") 78 | 79 | def generate_html_report(self): 80 | """ 81 | generate html sum report 82 | include system information and monitor sum data 83 | you should set the data_sum before using this method 84 | """ 85 | start_time = time.strftime("%Y-%m-%d %H:%M", 86 | time.strptime(self.start_time, "%Y%m%d%H%M")) 87 | end_time = time.strftime("%Y-%m-%d %H:%M", 88 | time.strptime(self.end_time, "%Y%m%d%H%M")) 89 | duration = start_time + ' ~ ' + end_time 90 | 91 | data_sum = copy.deepcopy(self.data_sum) 92 | for item, sub_type_dict in data_sum.iteritems(): 93 | for sub_type, sum_value in sub_type_dict.iteritems(): 94 | hyper_link = (os.path.basename(self.report_file).split(".html")[0].replace("monitor", item) + 95 | "-" + sub_type.replace("/s", "") + ".png").replace("%", "") 96 | # add hyper link 97 | self.data_sum[item][sub_type].append(hyper_link) 98 | # add len data 99 | self.data_sum[item][sub_type].append(len(sub_type_dict)) 100 | if sub_type.find("%") != -1: 101 | self.data_sum[item].setdefault(sub_type.replace('%', '')+'(%)', self.data_sum[item][sub_type]) 102 | self.data_sum[item].pop(sub_type) 103 | 104 | html_report = template.render(data_sum=self.data_sum, 105 | system_information=self.system_information, 106 | duration=duration, 107 | datafile_prefix=self.datafile_prefix) 108 | self.summary_data.update(self.data_sum) 109 | self.summary_data.update(self.system_information) 110 | self.summary_data['duration'] = duration 111 | self.summary_data['module'] = self.datafile_prefix.split('-')[0] 112 | self.summary_data['version'] = self.datafile_prefix.split('-')[1] 113 | self.summary_data['scenario_name'] = self.datafile_prefix.split('-')[2] 114 | self.summary_data['monitor_type'] = self.api_monitor_type 115 | 116 | f = open(self.report_file, "a+") 117 | try: 118 | f.write(html_report.encode('utf-8')) 119 | finally: 120 | f.close() 121 | 122 | def package_files(self): 123 | """ 124 | package result dictionary into tar.gz file 125 | and move tar file into result dictionary 126 | """ 127 | self.package_file = (self.report_file.split("/")[-1].split(".html")[0] + 128 | ".zip") 129 | status, output = commands.getstatusoutput( 130 | "zip -jr {0} {1}".format(self.package_file, self.result_dir)) 131 | if status: 132 | print "[ERROR]package up data file failed" 133 | else: 134 | status, output = commands.getstatusoutput( 135 | "mv {0} {1}".format(self.package_file, self.result_dir)) 136 | if status: 137 | print "[ERROR]mv package failed" 138 | else: 139 | self.package_file = self.result_dir + "/" + self.package_file 140 | 141 | def ftp_upload(self): 142 | ftp = FTP() 143 | ftp.set_debuglevel(0) 144 | ftp.connect(self.ftp_ip, '21') 145 | ftp.login(self.ftp_user, self.ftp_password) 146 | try: 147 | ftp.mkd(self.datafile_prefix.split("-")[0]) 148 | except Exception, e: 149 | print ("[INFO]ftp directory: %s existed" % 150 | self.datafile_prefix.split("-")[0]) 151 | print e 152 | ftp.cwd(self.datafile_prefix.split("-")[0]) 153 | try: 154 | ftp.mkd(self.datafile_prefix.split("-")[2]) 155 | except Exception, e: 156 | print ("[INFO]ftp directory: %s existed" % 157 | self.datafile_prefix.split("-")[2]) 158 | print e 159 | ftp.cwd(self.datafile_prefix.split("-")[2]) 160 | try: 161 | ftp.mkd(self.datafile_prefix.split("-")[1]) 162 | except Exception, e: 163 | print ("[INFO]ftp directory: %s existed" % 164 | self.datafile_prefix.split("-")[1]) 165 | print e 166 | ftp.cwd(self.datafile_prefix.split("-")[1]) 167 | try: 168 | ftp.mkd("monitor") 169 | except Exception, e: 170 | print "[INFO]ftp directory: monitor existed" 171 | print e 172 | ftp.cwd("monitor") 173 | ftp.mkd(os.path.basename(self.report_file).split(".html")[0]) 174 | ftp.cwd(os.path.basename(self.report_file).split(".html")[0]) 175 | buffer_size = 1024 176 | for datafile in util.get_dir_files(self.result_dir): 177 | file_handler = open(self.result_dir + "/" + datafile, "rb") 178 | ftp.storbinary("STOR %s" % datafile, file_handler, buffer_size) 179 | ftp.set_debuglevel(0) 180 | file_handler.close() 181 | ftp.quit() 182 | 183 | def api_upload(self): 184 | self.summary_data['line_data'] = self.line_data 185 | r = requests.post(self.api_url, json=json.dumps(self.summary_data)) 186 | if r.text == "200": 187 | print "[INFO]api upload success" 188 | else: 189 | print "[ERROR]api upload failed" 190 | 191 | def work(self): 192 | self.get_conf() 193 | self.get_system_information() 194 | self.set_file_name() 195 | self.generate_html_report() 196 | if self.api_flag: 197 | self.api_upload() 198 | self.package_files() 199 | if self.ftp_flag: 200 | self.ftp_upload() 201 | 202 | -------------------------------------------------------------------------------- /bin/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% block head %} 4 | 96 | 97 | 98 | 99 | {% endblock %} 100 | 101 | {% block content %} 102 | {% endblock %} 103 | 104 | {% block scripts %} 105 | {% endblock %} 106 | 107 | -------------------------------------------------------------------------------- /bin/templates/report.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |
6 |

服务器系统信息

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
监控时间段{{ duration }}
主机名{{ system_information['hostname'] }}
内核版本{{ system_information['kernel'] }}
CPU{{ system_information['cpuinfo'] }}
内存{{ system_information['meminfo'] }}
29 |

30 | 31 |

服务器资源使用情况汇总 ({{ datafile_prefix }})

32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | {% for item, sub_type_dict in data_sum.iteritems() %} 42 | {% for sub_type, sum_value in sub_type_dict.iteritems() %} 43 | {% if loop.first %} 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | {% else %} 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | {% endif %} 61 | {% endfor %} 62 | {% endfor %} 63 |
ItemTypeMinMaxAvg90%小于
{{ item }}{{ sub_type }}{{ sum_value[0] }}{{ sum_value[1] }}{{ sum_value[2] }}{{ sum_value[3] }}
{{ sub_type }}{{ sum_value[0] }}{{ sum_value[1] }}{{ sum_value[2] }}{{ sum_value[3] }}
64 |
65 | 66 | {% endblock%} 67 | -------------------------------------------------------------------------------- /bin/util.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | import os 3 | import sys 4 | import re 5 | import time 6 | import copy 7 | 8 | 9 | def get_parameter_lists(parameters): 10 | parameter_list = [] 11 | for i, each_arg in enumerate(parameters): 12 | if i != 0: 13 | parameter_list.append(each_arg) 14 | return parameter_list 15 | 16 | 17 | def get_dir_files(directory="../result"): 18 | return os.listdir(directory) 19 | 20 | 21 | def is_value(char): 22 | value_flag = 0 23 | if char in "0123456789.": 24 | value_flag = 1 25 | return value_flag 26 | 27 | 28 | def get_max_index(my_list): 29 | return my_list.index(max(my_list)) 30 | 31 | 32 | def get_max_value(my_list): 33 | return float(max(my_list)) 34 | 35 | 36 | def get_min_index(my_list): 37 | return my_list.index(min(my_list)) 38 | 39 | 40 | def get_min_value(my_list): 41 | return float(min(my_list)) 42 | 43 | 44 | def get_avg_value(my_list): 45 | sum_value = sum(my_list) 46 | avg_value = "%0.2f" % float(sum_value / len(my_list)) 47 | return float(avg_value) 48 | 49 | 50 | def get_p9_value(my_list): 51 | """return the value which is > 90% list value""" 52 | new_list = my_list[:] 53 | new_list.sort() 54 | p9_value = new_list[int(len(new_list) * 0.9)] 55 | return p9_value 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /conf/config.ini: -------------------------------------------------------------------------------- 1 | version=1.0.1 2 | serverSourceFlag=1 3 | rootFlag=1 4 | resDir=../result 5 | backupDir=../backup 6 | logDir=../log 7 | historyLog=../log/monitor_history.log 8 | pidRecord=../log/pid 9 | startTimeRecord=../log/starttime 10 | 11 | #支持分析eth0和eth1双网卡网速情况 12 | interface1=eth0 13 | interface2= 14 | 15 | #支持分析端口稳定连接数情况 16 | netstatFlag=0 17 | netstatPort=80 18 | 19 | #支持分析socket连接状态情况 20 | socketFlag=0 21 | 22 | #支持监控mysql数据库连接数情况,不区分库 23 | mysqlFlag=0 24 | mysqlPath=/usr/local/mysql/bin/mysql 25 | mysqlIP=127.0.0.1 26 | mysqlUser=test 27 | mysqlPassword=test 28 | mysqlPort=3306 29 | mysqlDatabase=test 30 | 31 | #支持监控mysql持有锁且阻塞别人的线程 32 | mysqlInnodeLockWaitsFlag=0 33 | 34 | #支持监控多个进程的资源消耗情况,包括线程数量 35 | processFlag=0 36 | #配置监控进程数量后,需按照序号x配置对应的processCommandx,processTopNamex,processSelfNamex参数 37 | processNumber=2 38 | #获取ps内容指令,过滤到单独的一条内容,并且第二列必须为PID号 39 | processCommand1='ps -ef |grep -v grep |grep java |grep api' 40 | #对应进程在top中的command名称 41 | processTopName1=java 42 | #自定义记录进程名称,文件名以该名称命名 43 | processSelfName1=api 44 | 45 | processCommand2='ps -ef |grep -v grep |grep java |grep ydh' 46 | processTopName2=java 47 | processSelfName2=ydh 48 | 49 | #监控redis info信息,若不需密码可不配置 50 | redisFlag=0 51 | redisPath=/usr/local/bin 52 | redisIP=127.0.0.1 53 | redisPort=6379 54 | redisPassword=123456 55 | 56 | #监控memcached stat信息 57 | memcachedFlag=0 58 | memcachedIP=127.0.0.1 59 | memcachedPort=11211 60 | memcachedUser=user 61 | memcachedPasswd=passwd 62 | 63 | #监控mongodb stat信息 64 | mongodbFlag=0 65 | mongodbPath=/usr/bin 66 | mongodbIP=127.0.0.1 67 | mongodbPort=27017 68 | mongodbUser=admin 69 | mongodbPassword=admin 70 | authenticationDatabase=admin 71 | 72 | #监控apache stat页面 73 | apacheFlag=0 74 | apacheURL=http://127.0.0.1/server-status 75 | apacheUser= 76 | apachePassword= 77 | 78 | #监控多个tomcat 状态页面数据 79 | tomcatFlag=0 80 | #配置监控tomcat数量后,需按照序号x配置对应参数: 81 | # tomcatTypex tomcat类型,支持tomcat6 和 tomcat7,注意tomcat6状态页面没有年老代,年轻代等内存信息 82 | # tomcatURLx 状态页面的URL 83 | # tomcatMonitorSignx 由于tomcat状态页面会有多个server的监控状态,需配置监控对应的server的状态 84 | # tomcatUserx 用户名 85 | # tomcatPasswordx 密码 86 | # tomcatSelfNamex 展示在报告中的名称,记录的文件名以该名称命名 87 | tomcatNumber=3 88 | 89 | tomcatType1=tomcat6 90 | tomcatURL1=http://127.0.0.1:8080/manager/status 91 | tomcatMonitorSign1=http-7016 92 | tomcatUser1=tomcat 93 | tomcatPassword1=tomcat 94 | tomcatSelfName1=api 95 | 96 | tomcatType2=tomcat6 97 | tomcatURL2=http://127.0.0.1:8081/manager/status 98 | tomcatMonitorSign2=http-7018 99 | tomcatUser2=tomcat 100 | tomcatPassword2=tomcat 101 | tomcatSelfName2=api1 102 | 103 | tomcatType3=tomcat7 104 | tomcatURL3=http://127.0.0.1:8082/manager/status 105 | tomcatMonitorSign3=http-nio-8080 106 | tomcatUser3=tomcat 107 | tomcatPassword3=tomcat 108 | tomcatSelfName3=webapp 109 | 110 | #监控nginx状态页面 111 | nginxFlag=0 112 | nginxURL=http://127.0.0.1/status 113 | 114 | -------------------------------------------------------------------------------- /conf/report.ini: -------------------------------------------------------------------------------- 1 | [common] 2 | resDir=../result 3 | monitor_type=performance_monitor 4 | 5 | [ftp] 6 | flag=0 7 | ip=127.0.0.1 8 | user=test 9 | password=123456 10 | 11 | [plot] 12 | granularity=1 13 | serverCPU=%user,%system,%iowait,%idle 14 | serverMemory=%memused,kbmemfree,kbmemused,kbbuffers,kbcached 15 | serverIORate=tps,bread/s,bwrtn/s 16 | ubuntuEth=rxkB/s,txkB/s 17 | redhatEth=rxbyt/s,txbyt/s 18 | serverQueueLoad=plist-sz,ldavg-1,ldavg-5,ldavg-15 19 | serverSock=totsck,tcpsck,udpsck 20 | processStatus=%CPU,%MEM,Threads 21 | TCPPort=ESTABLISHED 22 | socketStat=LISTEN,SYN-RECV,ESTAB,CLOSE-WAIT,LAST_ACK,FIN-WAIT-1,FIN-WAIT-2,CLOSING,TIME_WAIT 23 | mysql=Threads_connected 24 | redisStatus=connected_clients,used_memory,used_memory_peak,total_commands_processed,keyspace_hits,keyspace_misses,hit_rate,instantaneous_ops_per_sec 25 | memcachedStatus=curr_connections,cmd_get,cmd_set,cmd_flush,get_hits,get_misses,hit_rate,bytes_read,bytes_written,limit_maxbytes,accepting_conns,threads,bytes,curr_items,total_items,evictions 26 | mongodbStatus=insert,query,update,delete,getmore,flushes,mapped,vsize,res,non-mapped,faults,conn 27 | apacheStatus=currently_processed,idle_worker,waiting_for_connection,starting_up,reading_request,sending_reply,keepalive_read,dns_lookup,closing_connection,logging,gracefully_finishing,idle_cleanup_of_worker,open_slot_with_no_current_process 28 | tomcat6Status=free_memory,total_memory,max_threads,current_thread_count,current_thread_busy,max_processing_time,processing_time 29 | tomcat7Status=free_memory,total_memory,%ps_eden_space,%ps_old_gen,%ps_survivor_space,max_threads,current_thread_count,current_thread_busy,max_processing_time,processing_time 30 | nginxStatus=active_connections,handled_connections,handled_handshake,handled_requests,reading,writing,waiting 31 | 32 | [api] 33 | flag=0 34 | type=performance_monitor 35 | url=http://127.0.0.1:8000/performance/upload/record/monitor/ 36 | -------------------------------------------------------------------------------- /example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/example.png -------------------------------------------------------------------------------- /init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | apt-get install build-essential -y 4 | apt-get install libssl-dev -y 5 | 6 | wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz 7 | tar xvzf Python-2.7.10.tgz 8 | cd Python-2.7.10 9 | ./configure 10 | make && make install 11 | cd .. 12 | rm -rf Python-2.7.10 Python-2.7.10.tgz 13 | tar xvzf lib/setuptools-18.5.tar.gz 14 | cd setuptools-18.5 15 | python setup.py install 16 | cd .. 17 | rm -rf setuptools-18.5 18 | tar xvzf lib/pip-7.1.2.tar.gz 19 | cd pip-7.1.2 20 | python setup.py install 21 | cd .. 22 | rm -rf pip-7.1.2 23 | 24 | apt-get install libfreetype* -y 25 | apt-get install libpng* -y 26 | apt-get install sysstat -y 27 | apt-get install libmysqld-dev -y 28 | apt-get install zip -y 29 | pip2.7 install virtualenv 30 | pip2.7 install -r requirements.txt 31 | -------------------------------------------------------------------------------- /lib/ukai.ttc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/lib/ukai.ttc -------------------------------------------------------------------------------- /log/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/log/.gitkeep -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | cycler==0.9.0 2 | matplotlib==1.5.0 3 | MySQL-python==1.2.5 4 | numpy==1.10.1 5 | pyparsing==2.0.6 6 | python-dateutil==2.4.2 7 | python-memcached==1.57 8 | pytz==2015.7 9 | requests==2.8.1 10 | six==1.10.0 11 | wheel==0.24.0 12 | Jinja2==2.8 13 | python-binary-memcached==0.24.6 -------------------------------------------------------------------------------- /result/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/result/.gitkeep -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_monitor_statistical_data_201511192006.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 |
20 |

服务器系统信息

21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
监控时间段2015-11-19_20:06~2015-11-19_20:08
主机名performanceTest
内核版本Linux version 2.6.32-5-amd64
CPU2 Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
内存4048224 kB
43 |

44 | 45 |

服务器资源使用情况汇总 (test-v1.0-api)

46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 |
ItemTypeMinMaxAvg90%小于
server_cpuiowait(%)0.07.50.070.0
system(%)12.521.1116.4218.09
used(%)13.4326.3417.3419.31
user(%)0.08.060.851.98
server_eth0rx/s(MB)0.00.00.00.0
tx/s(MB)0.00.010.00.01
server_io_rateread/s(MB)0.00.00.00.0
tps0.043.04.2415.0
wrtn/s(MB)0.00.20.020.09
server_memorymemused(%)97.6697.6997.6797.68
memused--(%)82.4882.582.4982.5
buffers(MB)35.6235.8235.7235.81
cached(MB)564.32564.43564.37564.41
memfree(MB)91.5192.4891.9492.18
memused(MB)3860.863861.843861.43861.74
server_queue_loadldavg-10.020.190.080.15
ldavg-150.010.020.010.02
ldavg-50.030.060.050.05
plist-sz623.0633.0632.92633.0
server_sockettcpsck38.038.038.038.0
totsck573.0579.0578.95579.0
udpsck6.06.06.06.0
239 | 240 | 241 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_block_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 4 | 08:06:39 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 5 | 6 | 08:06:39 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 7 | 08:06:40 HKT sda 15.00 0.00 384.00 25.60 0.00 0.27 0.27 0.40 8 | 9 | 08:06:40 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 10 | 08:06:41 HKT sda 2.97 0.00 31.68 10.67 0.00 0.00 0.00 0.00 11 | 12 | 08:06:41 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 13 | 08:06:42 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 14 | 15 | 08:06:42 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 16 | 08:06:43 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 17 | 18 | 08:06:43 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 19 | 08:06:44 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 20 | 21 | 08:06:44 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 22 | 08:06:45 HKT sda 16.00 0.00 192.00 12.00 0.00 0.00 0.00 0.00 23 | 24 | 08:06:45 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 25 | 08:06:46 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 26 | 27 | 08:06:46 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 28 | 08:06:47 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 29 | 30 | 08:06:47 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 31 | 08:06:48 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 32 | 33 | 08:06:48 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 34 | 08:06:49 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 35 | 36 | 08:06:49 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 37 | 08:06:50 HKT sda 12.00 0.00 128.00 10.67 0.00 0.33 0.33 0.40 38 | 39 | 08:06:50 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 40 | 08:06:51 HKT sda 31.00 0.00 280.00 9.03 0.02 0.52 0.13 0.40 41 | 42 | 08:06:51 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 43 | 08:06:52 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 44 | 45 | 08:06:52 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 46 | 08:06:53 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 47 | 48 | 08:06:53 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 49 | 08:06:54 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 50 | 51 | 08:06:54 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 52 | 08:06:55 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 53 | 54 | 08:06:55 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 55 | 08:06:56 HKT sda 22.00 0.00 256.00 11.64 0.00 0.00 0.00 0.00 56 | 57 | 08:06:56 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 58 | 08:06:57 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 59 | 60 | 08:06:57 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 61 | 08:06:58 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 62 | 63 | 08:06:58 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 64 | 08:06:59 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 65 | 66 | 08:06:59 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 67 | 08:07:00 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 68 | 69 | 08:07:00 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 70 | 08:07:01 HKT sda 14.00 0.00 168.00 12.00 0.05 3.43 0.29 0.40 71 | 72 | 08:07:01 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 73 | 08:07:02 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 74 | 75 | 08:07:02 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 76 | 08:07:03 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 77 | 78 | 08:07:03 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 79 | 08:07:04 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 80 | 81 | 08:07:04 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 82 | 08:07:05 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 83 | 84 | 08:07:05 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 85 | 08:07:06 HKT sda 25.00 0.00 304.00 12.16 0.06 2.40 0.32 0.80 86 | 87 | 08:07:06 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 88 | 08:07:07 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 89 | 90 | 08:07:07 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 91 | 08:07:08 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 92 | 93 | 08:07:08 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 94 | 08:07:09 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 95 | 96 | 08:07:09 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 97 | 08:07:10 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 98 | 99 | 08:07:10 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 100 | 08:07:11 HKT sda 20.79 0.00 213.86 10.29 0.04 2.10 0.19 0.40 101 | 102 | 08:07:11 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 103 | 08:07:12 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 104 | 105 | 08:07:12 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 106 | 08:07:13 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 107 | 108 | 08:07:13 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 109 | 08:07:14 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 110 | 111 | 08:07:14 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 112 | 08:07:15 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 113 | 114 | 08:07:15 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 115 | 08:07:16 HKT sda 17.00 0.00 192.00 11.29 0.00 0.00 0.00 0.00 116 | 117 | 08:07:16 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 118 | 08:07:17 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 119 | 120 | 08:07:17 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 121 | 08:07:18 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 122 | 123 | 08:07:18 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 124 | 08:07:19 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 125 | 126 | 08:07:19 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 127 | 08:07:20 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 128 | 129 | 08:07:20 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 130 | 08:07:21 HKT sda 14.00 0.00 168.00 12.00 0.04 3.14 0.29 0.40 131 | 132 | 08:07:21 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 133 | 08:07:22 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 134 | 135 | 08:07:22 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 136 | 08:07:23 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 137 | 138 | 08:07:23 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 139 | 08:07:24 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 140 | 141 | 08:07:24 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 142 | 08:07:25 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 143 | 144 | 08:07:25 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 145 | 08:07:26 HKT sda 3.00 0.00 24.00 8.00 0.00 0.00 0.00 0.00 146 | 147 | 08:07:26 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 148 | 08:07:27 HKT sda 16.00 0.00 216.00 13.50 0.06 3.50 0.25 0.40 149 | 150 | 08:07:27 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 151 | 08:07:28 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 152 | 153 | 08:07:28 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 154 | 08:07:29 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 155 | 156 | 08:07:29 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 157 | 08:07:30 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 158 | 159 | 08:07:30 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 160 | 08:07:31 HKT sda 3.00 0.00 32.00 10.67 0.00 0.00 0.00 0.00 161 | 162 | 08:07:31 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 163 | 08:07:32 HKT sda 13.00 0.00 160.00 12.31 0.04 3.38 0.31 0.40 164 | 165 | 08:07:32 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 166 | 08:07:33 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 167 | 168 | 08:07:33 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 169 | 08:07:34 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 170 | 171 | 08:07:34 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 172 | 08:07:35 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 173 | 174 | 08:07:35 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 175 | 08:07:36 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 176 | 177 | 08:07:36 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 178 | 08:07:37 HKT sda 15.00 0.00 184.00 12.27 0.00 0.27 0.27 0.40 179 | 180 | 08:07:37 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 181 | 08:07:38 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 182 | 183 | 08:07:38 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 184 | 08:07:39 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 185 | 186 | 08:07:39 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 187 | 08:07:40 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 188 | 189 | 08:07:40 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 190 | 08:07:41 HKT sda 9.00 0.00 112.00 12.44 0.00 0.00 0.00 0.00 191 | 192 | 08:07:41 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 193 | 08:07:42 HKT sda 13.00 0.00 168.00 12.92 0.00 0.31 0.31 0.40 194 | 195 | 08:07:42 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 196 | 08:07:43 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 197 | 198 | 08:07:43 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 199 | 08:07:44 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 200 | 201 | 08:07:44 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 202 | 08:07:45 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 203 | 204 | 08:07:45 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 205 | 08:07:46 HKT sda 12.00 0.00 104.00 8.67 0.00 0.00 0.00 0.00 206 | 207 | 08:07:46 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 208 | 08:07:47 HKT sda 9.00 0.00 152.00 16.89 0.00 0.00 0.00 0.00 209 | 210 | 08:07:47 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 211 | 08:07:48 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 212 | 213 | 08:07:48 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 214 | 08:07:49 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 215 | 216 | 08:07:49 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 217 | 08:07:50 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 218 | 219 | 08:07:50 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 220 | 08:07:51 HKT sda 3.00 0.00 32.00 10.67 0.07 24.00 8.00 2.40 221 | 222 | 08:07:51 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 223 | 08:07:52 HKT sda 18.00 0.00 208.00 11.56 0.72 40.22 6.89 12.40 224 | 225 | 08:07:52 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 226 | 08:07:53 HKT sda 15.00 0.00 176.00 11.73 0.02 1.33 0.27 0.40 227 | 228 | 08:07:53 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 229 | 08:07:54 HKT sda 18.00 0.00 248.00 13.78 0.00 0.22 0.22 0.40 230 | 231 | 08:07:54 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 232 | 08:07:55 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 233 | 234 | 08:07:55 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 235 | 08:07:56 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 236 | 237 | 08:07:56 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 238 | 08:07:57 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 239 | 240 | 08:07:57 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 241 | 08:07:58 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 242 | 243 | 08:07:58 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 244 | 08:07:59 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 245 | 246 | 08:07:59 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 247 | 08:08:00 HKT sda 13.00 0.00 160.00 12.31 0.00 0.31 0.31 0.40 248 | 249 | 08:08:00 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 250 | 08:08:01 HKT sda 9.00 0.00 72.00 8.00 0.00 0.00 0.00 0.00 251 | 252 | 08:08:01 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 253 | 08:08:02 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 254 | 255 | 08:08:02 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 256 | 08:08:03 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 257 | 258 | 08:08:03 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 259 | 08:08:04 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 260 | 261 | 08:08:04 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 262 | 08:08:05 HKT sda 16.83 0.00 213.86 12.71 0.00 0.00 0.00 0.00 263 | 264 | 08:08:05 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 265 | 08:08:06 HKT sda 3.00 0.00 32.00 10.67 0.00 0.00 0.00 0.00 266 | 267 | 08:08:06 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 268 | 08:08:07 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 269 | 270 | 08:08:07 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 271 | 08:08:08 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 272 | 273 | 08:08:08 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 274 | 08:08:09 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 275 | 276 | 08:08:09 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 277 | 08:08:10 HKT sda 13.00 0.00 152.00 11.69 0.00 0.00 0.00 0.00 278 | 279 | 08:08:10 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 280 | 08:08:11 HKT sda 7.00 0.00 80.00 11.43 0.00 0.00 0.00 0.00 281 | 282 | 08:08:11 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 283 | 08:08:12 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 284 | 285 | 08:08:12 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 286 | 08:08:13 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 287 | 288 | 08:08:13 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 289 | 08:08:14 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 290 | 291 | 08:08:14 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 292 | 08:08:15 HKT sda 14.00 0.00 160.00 11.43 0.04 3.14 0.29 0.40 293 | 294 | 08:08:15 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 295 | 08:08:16 HKT sda 3.00 0.00 32.00 10.67 0.00 0.00 0.00 0.00 296 | 297 | 08:08:16 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 298 | 08:08:17 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 299 | 300 | 08:08:17 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 301 | 08:08:18 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 302 | 303 | 08:08:18 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 304 | 08:08:19 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 305 | 306 | 08:08:19 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 307 | 08:08:20 HKT sda 15.00 0.00 168.00 11.20 0.00 0.00 0.00 0.00 308 | 309 | 08:08:20 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 310 | 08:08:21 HKT sda 10.00 0.00 80.00 8.00 0.00 0.00 0.00 0.00 311 | 312 | 08:08:21 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 313 | 08:08:22 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 314 | 315 | 08:08:22 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 316 | 08:08:23 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 317 | 318 | 08:08:23 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 319 | 08:08:24 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 320 | 321 | 08:08:24 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 322 | 08:08:25 HKT sda 17.00 0.00 216.00 12.71 0.00 0.00 0.00 0.00 323 | 324 | 08:08:25 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 325 | 08:08:26 HKT sda 3.00 0.00 32.00 10.67 0.00 0.00 0.00 0.00 326 | 327 | 08:08:26 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 328 | 08:08:27 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 329 | 330 | 08:08:27 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 331 | 08:08:28 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 332 | 333 | 08:08:28 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 334 | 08:08:29 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 335 | 336 | 08:08:29 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 337 | 08:08:30 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 338 | 339 | 08:08:30 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 340 | 08:08:31 HKT sda 15.00 0.00 168.00 11.20 0.01 0.53 0.27 0.40 341 | 342 | 08:08:31 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 343 | 08:08:32 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 344 | 345 | 08:08:32 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 346 | 08:08:33 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 347 | 348 | 08:08:33 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 349 | 08:08:34 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 350 | 351 | 08:08:34 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 352 | 08:08:35 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 353 | 354 | 08:08:35 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 355 | 08:08:36 HKT sda 33.00 0.00 376.00 11.39 0.06 1.82 0.12 0.40 356 | 357 | 08:08:36 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 358 | 08:08:37 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 359 | 360 | 08:08:37 HKT DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 361 | 08:08:38 HKT sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 362 | 363 | Average: DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 364 | Average: sda 4.24 0.00 50.61 11.94 0.01 2.48 0.43 0.18 365 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_cpu_201511192006-iowait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_cpu_201511192006-iowait.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_cpu_201511192006-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_cpu_201511192006-system.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_cpu_201511192006-used.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_cpu_201511192006-used.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_cpu_201511192006-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_cpu_201511192006-user.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_cpu_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT CPU %user %nice %system %iowait %steal %idle 4 | 08:06:39 HKT all 0.00 0.00 15.00 0.00 0.00 85.00 5 | 08:06:40 HKT all 0.50 0.00 17.59 0.00 0.00 81.91 6 | 08:06:41 HKT all 1.01 0.00 17.59 0.00 0.00 81.41 7 | 08:06:42 HKT all 0.50 0.00 17.50 0.00 0.00 82.00 8 | 08:06:43 HKT all 1.00 0.00 14.43 0.00 0.00 84.58 9 | 08:06:44 HKT all 1.50 0.00 15.00 0.00 0.00 83.50 10 | 08:06:45 HKT all 1.00 0.00 16.00 0.00 0.00 83.00 11 | 08:06:46 HKT all 1.00 0.00 17.41 0.00 0.00 81.59 12 | 08:06:47 HKT all 4.04 0.00 19.19 0.00 0.00 76.77 13 | 08:06:48 HKT all 0.50 0.00 18.50 0.00 0.00 81.00 14 | 08:06:49 HKT all 1.00 0.00 15.92 0.00 0.00 83.08 15 | 08:06:50 HKT all 0.50 0.00 18.00 0.00 0.00 81.50 16 | 08:06:51 HKT all 0.51 0.00 15.66 0.00 0.00 83.84 17 | 08:06:52 HKT all 0.99 0.00 17.33 0.00 0.00 81.68 18 | 08:06:53 HKT all 0.51 0.00 16.16 0.00 0.00 83.33 19 | 08:06:54 HKT all 0.50 0.00 17.41 0.00 0.00 82.09 20 | 08:06:55 HKT all 0.00 0.00 16.50 0.00 0.00 83.50 21 | 08:06:56 HKT all 1.00 0.00 16.50 0.00 0.00 82.50 22 | 08:06:57 HKT all 0.00 0.00 15.00 0.00 0.00 85.00 23 | 08:06:58 HKT all 0.00 0.00 15.00 0.00 0.00 85.00 24 | 08:06:59 HKT all 0.50 0.00 17.00 0.00 0.00 82.50 25 | 08:07:00 HKT all 1.50 0.00 16.50 0.00 0.00 82.00 26 | 08:07:01 HKT all 1.00 0.00 17.00 0.00 0.00 82.00 27 | 08:07:02 HKT all 1.51 0.00 19.10 0.00 0.00 79.40 28 | 08:07:03 HKT all 0.50 0.00 16.58 0.00 0.00 82.91 29 | 08:07:04 HKT all 0.00 0.00 15.92 0.00 0.00 84.08 30 | 08:07:05 HKT all 0.00 0.00 17.50 0.00 0.00 82.50 31 | 08:07:06 HKT all 0.00 0.00 17.17 0.00 0.00 82.83 32 | 08:07:07 HKT all 0.99 0.00 18.32 0.00 0.00 80.69 33 | 08:07:08 HKT all 0.00 0.00 17.00 0.00 0.00 83.00 34 | 08:07:09 HKT all 0.50 0.00 18.50 0.00 0.00 81.00 35 | 08:07:10 HKT all 0.50 0.00 16.58 0.00 0.00 82.91 36 | 08:07:11 HKT all 4.02 0.00 18.09 0.00 0.00 77.89 37 | 08:07:12 HKT all 3.02 0.00 15.58 0.00 0.00 81.41 38 | 08:07:13 HKT all 0.99 0.00 18.32 0.00 0.00 80.69 39 | 08:07:14 HKT all 0.00 0.00 15.15 0.00 0.00 84.85 40 | 08:07:15 HKT all 1.00 0.00 16.42 0.00 0.00 82.59 41 | 08:07:16 HKT all 1.01 0.00 15.58 0.00 0.00 83.42 42 | 08:07:17 HKT all 1.98 0.00 16.83 0.00 0.00 81.19 43 | 08:07:18 HKT all 0.00 0.00 18.00 0.00 0.00 82.00 44 | 08:07:19 HKT all 0.50 0.00 16.50 0.00 0.00 83.00 45 | 08:07:20 HKT all 0.50 0.00 15.92 0.00 0.00 83.58 46 | 08:07:21 HKT all 0.50 0.00 18.09 0.00 0.00 81.41 47 | 08:07:22 HKT all 2.54 0.00 16.75 0.51 0.00 80.20 48 | 08:07:23 HKT all 0.50 0.00 15.50 0.00 0.00 84.00 49 | 08:07:24 HKT all 1.01 0.00 16.58 0.00 0.00 82.41 50 | 08:07:25 HKT all 0.00 0.00 17.00 0.00 0.00 83.00 51 | 08:07:26 HKT all 0.50 0.00 16.08 0.00 0.00 83.42 52 | 08:07:27 HKT all 0.50 0.00 16.92 0.00 0.00 82.59 53 | 08:07:28 HKT all 0.50 0.00 15.00 0.00 0.00 84.50 54 | 08:07:29 HKT all 1.00 0.00 12.50 0.00 0.00 86.50 55 | 08:07:30 HKT all 0.50 0.00 14.43 0.00 0.00 85.07 56 | 08:07:31 HKT all 6.19 0.00 15.46 0.00 0.00 78.35 57 | 08:07:32 HKT all 1.00 0.00 14.00 0.00 0.00 85.00 58 | 08:07:33 HKT all 0.00 0.00 13.43 0.00 0.00 86.57 59 | 08:07:34 HKT all 0.50 0.00 16.08 0.00 0.00 83.42 60 | 08:07:35 HKT all 0.50 0.00 13.00 0.00 0.00 86.50 61 | 08:07:36 HKT all 1.00 0.00 15.00 0.00 0.00 84.00 62 | 08:07:37 HKT all 0.50 0.00 16.00 0.00 0.00 83.50 63 | 08:07:38 HKT all 1.00 0.00 16.50 0.00 0.00 82.50 64 | 08:07:39 HKT all 0.00 0.00 15.08 0.00 0.00 84.92 65 | 08:07:40 HKT all 0.00 0.00 16.42 0.00 0.00 83.58 66 | 08:07:41 HKT all 1.00 0.00 18.00 0.00 0.00 81.00 67 | 08:07:42 HKT all 0.00 0.00 14.93 0.00 0.00 85.07 68 | 08:07:43 HKT all 1.01 0.00 14.57 0.00 0.00 84.42 69 | 08:07:44 HKT all 0.00 0.00 14.80 0.00 0.00 85.20 70 | 08:07:45 HKT all 2.53 0.00 16.16 0.00 0.00 81.31 71 | 08:07:46 HKT all 0.50 0.00 15.50 0.00 0.00 84.00 72 | 08:07:47 HKT all 2.22 0.00 21.11 0.00 0.00 76.67 73 | 08:07:48 HKT all 0.50 0.00 15.92 0.00 0.00 83.58 74 | 08:07:49 HKT all 0.00 0.00 17.00 0.00 0.00 83.00 75 | 08:07:50 HKT all 1.00 0.00 18.50 0.00 0.00 80.50 76 | 08:07:51 HKT all 0.50 0.00 16.92 0.00 0.00 82.59 77 | 08:07:52 HKT all 0.50 0.00 14.50 7.50 0.00 77.50 78 | 08:07:53 HKT all 0.00 0.00 15.15 0.00 0.00 84.85 79 | 08:07:54 HKT all 1.00 0.00 14.43 0.00 0.00 84.58 80 | 08:07:55 HKT all 0.50 0.00 17.09 0.00 0.00 82.41 81 | 08:07:56 HKT all 0.99 0.00 16.83 0.00 0.00 82.18 82 | 08:07:57 HKT all 0.00 0.00 15.74 0.00 0.00 84.26 83 | 08:07:58 HKT all 1.00 0.00 17.91 0.00 0.00 81.09 84 | 08:07:59 HKT all 0.00 0.00 15.50 0.00 0.00 84.50 85 | 08:08:00 HKT all 2.00 0.00 16.50 0.00 0.00 81.50 86 | 08:08:01 HKT all 1.00 0.00 16.92 0.00 0.00 82.09 87 | 08:08:02 HKT all 8.06 0.00 18.28 0.00 0.00 73.66 88 | 08:08:03 HKT all 0.00 0.00 16.50 0.00 0.00 83.50 89 | 08:08:04 HKT all 1.00 0.00 14.93 0.00 0.00 84.08 90 | 08:08:05 HKT all 0.00 0.00 16.08 0.00 0.00 83.92 91 | 08:08:06 HKT all 0.50 0.00 18.00 0.00 0.00 81.50 92 | 08:08:07 HKT all 0.00 0.00 16.00 0.00 0.00 84.00 93 | 08:08:08 HKT all 0.50 0.00 17.50 0.00 0.00 82.00 94 | 08:08:09 HKT all 0.00 0.00 17.82 0.00 0.00 82.18 95 | 08:08:10 HKT all 0.50 0.00 17.50 0.00 0.00 82.00 96 | 08:08:11 HKT all 0.00 0.00 15.58 0.00 0.00 84.42 97 | 08:08:12 HKT all 0.00 0.00 16.00 0.00 0.00 84.00 98 | 08:08:13 HKT all 1.00 0.00 15.92 0.00 0.00 83.08 99 | 08:08:14 HKT all 0.00 0.00 15.08 0.00 0.00 84.92 100 | 08:08:15 HKT all 0.50 0.00 16.00 0.00 0.00 83.50 101 | 08:08:16 HKT all 1.49 0.00 15.92 0.00 0.00 82.59 102 | 08:08:17 HKT all 1.51 0.00 17.59 0.00 0.00 80.90 103 | 08:08:18 HKT all 1.00 0.00 15.92 0.00 0.00 83.08 104 | 08:08:19 HKT all 0.00 0.00 16.58 0.00 0.00 83.42 105 | 08:08:20 HKT all 0.50 0.00 17.00 0.00 0.00 82.50 106 | 08:08:21 HKT all 1.48 0.00 16.26 0.00 0.00 82.27 107 | 08:08:22 HKT all 0.00 0.00 15.08 0.00 0.00 84.92 108 | 08:08:23 HKT all 0.50 0.00 14.93 0.00 0.00 84.58 109 | 08:08:24 HKT all 1.01 0.00 17.68 0.00 0.00 81.31 110 | 08:08:25 HKT all 0.50 0.00 17.50 0.00 0.00 82.00 111 | 08:08:26 HKT all 3.50 0.00 18.50 0.00 0.00 78.00 112 | 08:08:27 HKT all 0.00 0.00 16.50 0.00 0.00 83.50 113 | 08:08:28 HKT all 1.00 0.00 15.92 0.00 0.00 83.08 114 | 08:08:29 HKT all 0.00 0.00 16.00 0.00 0.00 84.00 115 | 08:08:30 HKT all 1.50 0.00 15.50 0.00 0.00 83.00 116 | 08:08:31 HKT all 0.50 0.00 17.00 0.00 0.00 82.50 117 | 08:08:32 HKT all 0.50 0.00 17.59 0.00 0.00 81.91 118 | 08:08:33 HKT all 0.50 0.00 18.00 0.00 0.00 81.50 119 | 08:08:34 HKT all 0.50 0.00 13.50 0.00 0.00 86.00 120 | 08:08:35 HKT all 0.00 0.00 16.92 0.00 0.00 83.08 121 | 08:08:36 HKT all 0.50 0.00 16.00 0.00 0.00 83.50 122 | 08:08:37 HKT all 3.05 0.00 18.27 0.00 0.00 78.68 123 | 08:08:38 HKT all 0.00 0.00 16.58 0.00 0.00 83.42 124 | Average: all 0.84 0.00 16.42 0.07 0.00 82.67 125 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_eth0_201511192006-rx(MB).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_eth0_201511192006-rx(MB).png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_eth0_201511192006-tx(MB).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_eth0_201511192006-tx(MB).png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_eth0_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s 4 | 08:06:39 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 5 | 08:06:40 HKT eth0 5.00 10.00 0.29 9.38 0.00 0.00 0.00 6 | 08:06:41 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 7 | 08:06:42 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 8 | 08:06:43 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 9 | 08:06:44 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10 | 08:06:45 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 11 | 08:06:46 HKT eth0 4.00 7.00 0.23 9.15 0.00 0.00 0.00 12 | 08:06:47 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 13 | 08:06:48 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 14 | 08:06:49 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 15 | 08:06:50 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 16 | 08:06:51 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 17 | 08:06:52 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 18 | 08:06:53 HKT eth0 1.00 1.00 0.09 0.05 0.00 0.00 0.00 19 | 08:06:54 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 20 | 08:06:55 HKT eth0 2.00 4.00 0.12 5.22 0.00 0.00 0.00 21 | 08:06:56 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 22 | 08:06:57 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 23 | 08:06:58 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 24 | 08:06:59 HKT eth0 1.00 1.00 0.06 0.04 0.00 0.00 0.00 25 | 08:07:00 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 26 | 08:07:01 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 27 | 08:07:02 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 28 | 08:07:03 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 29 | 08:07:04 HKT eth0 1.98 3.96 0.12 4.76 0.00 0.00 0.00 30 | 08:07:05 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 31 | 08:07:06 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 32 | 08:07:07 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 33 | 08:07:08 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 34 | 08:07:09 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 35 | 08:07:10 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 36 | 08:07:11 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 37 | 08:07:12 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 38 | 08:07:13 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 39 | 08:07:14 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 40 | 08:07:15 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 41 | 08:07:16 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 42 | 08:07:17 HKT eth0 0.99 0.99 0.09 0.05 0.00 0.00 0.00 43 | 08:07:18 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 44 | 08:07:19 HKT eth0 4.00 8.00 0.23 9.15 0.00 0.00 0.00 45 | 08:07:20 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 46 | 08:07:21 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 47 | 08:07:22 HKT eth0 2.00 4.00 0.12 5.00 0.00 0.00 0.00 48 | 08:07:23 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 49 | 08:07:24 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 50 | 08:07:25 HKT eth0 3.00 5.00 0.18 5.32 0.00 0.00 0.00 51 | 08:07:26 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 52 | 08:07:27 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 53 | 08:07:28 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 54 | 08:07:29 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 55 | 08:07:30 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 56 | 08:07:31 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 57 | 08:07:32 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 58 | 08:07:33 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 59 | 08:07:34 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 60 | 08:07:35 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 61 | 08:07:36 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 62 | 08:07:37 HKT eth0 2.00 4.00 0.12 4.43 0.00 0.00 0.00 63 | 08:07:38 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 64 | 08:07:39 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 65 | 08:07:40 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 66 | 08:07:41 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 67 | 08:07:42 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 68 | 08:07:43 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 69 | 08:07:44 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 70 | 08:07:45 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 71 | 08:07:46 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 72 | 08:07:47 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 73 | 08:07:48 HKT eth0 0.99 0.99 0.06 0.04 0.00 0.00 0.00 74 | 08:07:49 HKT eth0 2.00 4.00 0.12 4.80 0.00 0.00 0.00 75 | 08:07:50 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 76 | 08:07:51 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 77 | 08:07:52 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 78 | 08:07:53 HKT eth0 1.00 1.00 0.09 0.05 0.00 0.00 0.00 79 | 08:07:54 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 80 | 08:07:55 HKT eth0 2.00 4.00 0.12 4.81 0.00 0.00 0.00 81 | 08:07:56 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 82 | 08:07:57 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 83 | 08:07:58 HKT eth0 4.00 7.00 0.28 7.47 0.00 0.00 0.00 84 | 08:07:59 HKT eth0 2.00 2.00 0.16 0.16 0.00 0.00 0.00 85 | 08:08:00 HKT eth0 1.98 1.98 0.16 1.26 0.00 0.00 0.00 86 | 08:08:01 HKT eth0 3.00 5.00 0.18 6.27 0.00 0.00 0.00 87 | 08:08:02 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 88 | 08:08:03 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 89 | 08:08:04 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 90 | 08:08:05 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 91 | 08:08:06 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 92 | 08:08:07 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 93 | 08:08:08 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 94 | 08:08:09 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 95 | 08:08:10 HKT eth0 4.00 7.00 0.23 8.88 0.00 0.00 0.00 96 | 08:08:11 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 97 | 08:08:12 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 98 | 08:08:13 HKT eth0 3.00 5.00 0.18 5.87 0.00 0.00 0.00 99 | 08:08:14 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100 | 08:08:15 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 101 | 08:08:16 HKT eth0 2.97 5.94 0.17 7.74 0.00 0.00 0.00 102 | 08:08:17 HKT eth0 1.00 1.00 0.09 0.05 0.00 0.00 0.00 103 | 08:08:18 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 104 | 08:08:19 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 105 | 08:08:20 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 106 | 08:08:21 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 107 | 08:08:22 HKT eth0 4.00 7.00 0.23 9.10 0.00 0.00 0.00 108 | 08:08:23 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 109 | 08:08:24 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 110 | 08:08:25 HKT eth0 3.00 7.00 0.18 8.87 0.00 0.00 0.00 111 | 08:08:26 HKT eth0 1.00 0.00 0.06 0.00 0.00 0.00 0.00 112 | 08:08:27 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 113 | 08:08:28 HKT eth0 4.00 8.00 0.23 8.97 0.00 0.00 0.00 114 | 08:08:29 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 115 | 08:08:30 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 116 | 08:08:31 HKT eth0 4.00 8.00 0.23 9.20 0.00 0.00 0.00 117 | 08:08:32 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 118 | 08:08:33 HKT eth0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 119 | 08:08:34 HKT eth0 3.00 7.00 0.18 9.10 0.00 0.00 0.00 120 | 08:08:35 HKT eth0 1.00 0.00 0.06 0.00 0.00 0.00 0.00 121 | 08:08:36 HKT eth0 1.00 1.00 0.06 0.04 0.00 0.00 0.00 122 | 08:08:37 HKT eth0 3.00 7.00 0.18 9.10 0.00 0.00 0.00 123 | 08:08:38 HKT eth0 2.00 1.00 0.12 0.68 0.00 0.00 0.00 124 | Average: eth0 1.31 2.27 0.08 2.72 0.00 0.00 0.00 125 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_inode_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT dentunusd file-nr inode-nr pty-nr 4 | 08:06:39 HKT 19220 1792 13236 234 5 | 08:06:40 HKT 19276 1792 13292 234 6 | 08:06:41 HKT 19276 1792 13291 234 7 | 08:06:42 HKT 19276 1792 13291 234 8 | 08:06:43 HKT 19276 1792 13291 234 9 | 08:06:44 HKT 19276 1792 13291 234 10 | 08:06:45 HKT 19276 1792 13292 234 11 | 08:06:46 HKT 19276 1792 13291 234 12 | 08:06:47 HKT 19276 1792 13292 234 13 | 08:06:48 HKT 19276 1792 13292 234 14 | 08:06:49 HKT 19276 1792 13291 234 15 | 08:06:50 HKT 19276 1792 13293 234 16 | 08:06:51 HKT 19276 1792 13293 234 17 | 08:06:52 HKT 19276 1792 13291 234 18 | 08:06:53 HKT 19276 1792 13292 234 19 | 08:06:54 HKT 19276 1792 13292 234 20 | 08:06:55 HKT 19276 1792 13292 234 21 | 08:06:56 HKT 19276 1792 13293 234 22 | 08:06:57 HKT 19276 1792 13292 234 23 | 08:06:58 HKT 19276 1792 13292 234 24 | 08:06:59 HKT 19276 1792 13292 234 25 | 08:07:00 HKT 19276 1792 13292 234 26 | 08:07:01 HKT 19276 1792 13292 234 27 | 08:07:02 HKT 19276 1792 13292 234 28 | 08:07:03 HKT 19276 1792 13293 234 29 | 08:07:04 HKT 19276 1792 13292 234 30 | 08:07:05 HKT 19276 1792 13293 234 31 | 08:07:06 HKT 19276 1792 13293 234 32 | 08:07:07 HKT 19276 1792 13292 234 33 | 08:07:08 HKT 19276 1792 13291 234 34 | 08:07:09 HKT 19276 1792 13292 234 35 | 08:07:10 HKT 19276 1792 13292 234 36 | 08:07:11 HKT 19276 1792 13292 234 37 | 08:07:12 HKT 19276 1792 13293 234 38 | 08:07:13 HKT 19276 1792 13291 234 39 | 08:07:14 HKT 19276 1696 13291 234 40 | 08:07:15 HKT 19276 1696 13292 234 41 | 08:07:16 HKT 19276 1696 13292 234 42 | 08:07:17 HKT 19276 1696 13292 234 43 | 08:07:18 HKT 19276 1696 13292 234 44 | 08:07:19 HKT 19276 1696 13292 234 45 | 08:07:20 HKT 19276 1696 13293 234 46 | 08:07:21 HKT 19276 1696 13291 234 47 | 08:07:22 HKT 19276 1696 13292 234 48 | 08:07:23 HKT 19276 1696 13292 234 49 | 08:07:24 HKT 19276 1696 13292 234 50 | 08:07:25 HKT 19276 1696 13292 234 51 | 08:07:26 HKT 19276 1696 13292 234 52 | 08:07:27 HKT 19276 1696 13293 234 53 | 08:07:28 HKT 19276 1696 13293 234 54 | 08:07:29 HKT 19276 1696 13292 234 55 | 08:07:30 HKT 19276 1696 13292 234 56 | 08:07:31 HKT 19276 1696 13292 234 57 | 08:07:32 HKT 19276 1696 13292 234 58 | 08:07:33 HKT 19276 1696 13291 234 59 | 08:07:34 HKT 19276 1696 13291 234 60 | 08:07:35 HKT 19276 1696 13292 234 61 | 08:07:36 HKT 19276 1696 13292 234 62 | 08:07:37 HKT 19276 1696 13291 234 63 | 08:07:38 HKT 19276 1696 13292 234 64 | 08:07:39 HKT 19276 1696 13293 234 65 | 08:07:40 HKT 19276 1696 13291 234 66 | 08:07:41 HKT 19276 1696 13291 234 67 | 08:07:42 HKT 19276 1696 13291 234 68 | 08:07:43 HKT 19276 1696 13292 234 69 | 08:07:44 HKT 19276 1696 13292 234 70 | 08:07:45 HKT 19276 1696 13291 234 71 | 08:07:46 HKT 19276 1696 13291 234 72 | 08:07:47 HKT 19276 1696 13292 234 73 | 08:07:48 HKT 19276 1728 13291 234 74 | 08:07:49 HKT 19276 1728 13291 234 75 | 08:07:50 HKT 19276 1728 13291 234 76 | 08:07:51 HKT 19276 1728 13291 234 77 | 08:07:52 HKT 19276 1728 13291 234 78 | 08:07:53 HKT 19276 1728 13293 234 79 | 08:07:54 HKT 19276 1728 13292 234 80 | 08:07:55 HKT 19276 1728 13292 234 81 | 08:07:56 HKT 19276 1728 13292 234 82 | 08:07:57 HKT 19276 1728 13291 234 83 | 08:07:58 HKT 19276 1728 13291 234 84 | 08:07:59 HKT 19276 1728 13292 234 85 | 08:08:00 HKT 19276 1728 13292 234 86 | 08:08:01 HKT 19276 1728 13291 234 87 | 08:08:02 HKT 19276 1728 13292 234 88 | 08:08:03 HKT 19276 1728 13292 234 89 | 08:08:04 HKT 19276 1728 13292 234 90 | 08:08:05 HKT 19276 1728 13292 234 91 | 08:08:06 HKT 19276 1728 13292 234 92 | 08:08:07 HKT 19276 1728 13292 234 93 | 08:08:08 HKT 19276 1696 13292 234 94 | 08:08:09 HKT 19276 1696 13292 234 95 | 08:08:10 HKT 19276 1696 13291 234 96 | 08:08:11 HKT 19276 1696 13291 234 97 | 08:08:12 HKT 19276 1696 13292 234 98 | 08:08:13 HKT 19276 1696 13292 234 99 | 08:08:14 HKT 19276 1696 13291 234 100 | 08:08:15 HKT 19276 1696 13292 234 101 | 08:08:16 HKT 19276 1696 13291 234 102 | 08:08:17 HKT 19276 1696 13291 234 103 | 08:08:18 HKT 19276 1696 13291 234 104 | 08:08:19 HKT 19276 1696 13291 234 105 | 08:08:20 HKT 19276 1696 13291 234 106 | 08:08:21 HKT 19276 1696 13291 234 107 | 08:08:22 HKT 19276 1696 13292 234 108 | 08:08:23 HKT 19276 1696 13292 234 109 | 08:08:24 HKT 19276 1696 13291 234 110 | 08:08:25 HKT 19276 1696 13291 234 111 | 08:08:26 HKT 19276 1696 13292 234 112 | 08:08:27 HKT 19276 1696 13292 234 113 | 08:08:28 HKT 19276 1696 13291 234 114 | 08:08:29 HKT 19276 1696 13291 234 115 | 08:08:30 HKT 19276 1696 13291 234 116 | 08:08:31 HKT 19276 1696 13291 234 117 | 08:08:32 HKT 19276 1696 13292 234 118 | 08:08:33 HKT 19276 1696 13291 234 119 | 08:08:34 HKT 19276 1696 13291 234 120 | 08:08:35 HKT 19276 1696 13291 234 121 | 08:08:36 HKT 19276 1696 13287 234 122 | 08:08:37 HKT 19276 1696 13290 234 123 | 08:08:38 HKT 19248 1664 13249 234 124 | Average: 19275 1729 13291 234 125 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_io_rate_201511192006-read(MB).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_io_rate_201511192006-read(MB).png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_io_rate_201511192006-tps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_io_rate_201511192006-tps.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_io_rate_201511192006-wrtn(MB).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_io_rate_201511192006-wrtn(MB).png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_io_rate_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT tps rtps wtps bread/s bwrtn/s 4 | 08:06:39 HKT 0.00 0.00 0.00 0.00 0.00 5 | 08:06:40 HKT 15.00 0.00 15.00 0.00 384.00 6 | 08:06:41 HKT 3.00 0.00 3.00 0.00 32.00 7 | 08:06:42 HKT 0.00 0.00 0.00 0.00 0.00 8 | 08:06:43 HKT 0.00 0.00 0.00 0.00 0.00 9 | 08:06:44 HKT 0.00 0.00 0.00 0.00 0.00 10 | 08:06:45 HKT 16.00 0.00 16.00 0.00 192.00 11 | 08:06:46 HKT 0.00 0.00 0.00 0.00 0.00 12 | 08:06:47 HKT 0.00 0.00 0.00 0.00 0.00 13 | 08:06:48 HKT 0.00 0.00 0.00 0.00 0.00 14 | 08:06:49 HKT 0.00 0.00 0.00 0.00 0.00 15 | 08:06:50 HKT 0.00 0.00 0.00 0.00 0.00 16 | 08:06:51 HKT 43.00 0.00 43.00 0.00 408.00 17 | 08:06:52 HKT 0.00 0.00 0.00 0.00 0.00 18 | 08:06:53 HKT 0.00 0.00 0.00 0.00 0.00 19 | 08:06:54 HKT 0.00 0.00 0.00 0.00 0.00 20 | 08:06:55 HKT 0.00 0.00 0.00 0.00 0.00 21 | 08:06:56 HKT 21.78 0.00 21.78 0.00 253.47 22 | 08:06:57 HKT 0.00 0.00 0.00 0.00 0.00 23 | 08:06:58 HKT 0.00 0.00 0.00 0.00 0.00 24 | 08:06:59 HKT 0.00 0.00 0.00 0.00 0.00 25 | 08:07:00 HKT 0.00 0.00 0.00 0.00 0.00 26 | 08:07:01 HKT 14.00 0.00 14.00 0.00 168.00 27 | 08:07:02 HKT 0.00 0.00 0.00 0.00 0.00 28 | 08:07:03 HKT 0.00 0.00 0.00 0.00 0.00 29 | 08:07:04 HKT 0.00 0.00 0.00 0.00 0.00 30 | 08:07:05 HKT 0.00 0.00 0.00 0.00 0.00 31 | 08:07:06 HKT 25.00 0.00 25.00 0.00 304.00 32 | 08:07:07 HKT 0.00 0.00 0.00 0.00 0.00 33 | 08:07:08 HKT 0.00 0.00 0.00 0.00 0.00 34 | 08:07:09 HKT 0.00 0.00 0.00 0.00 0.00 35 | 08:07:10 HKT 0.00 0.00 0.00 0.00 0.00 36 | 08:07:11 HKT 21.00 0.00 21.00 0.00 216.00 37 | 08:07:12 HKT 0.00 0.00 0.00 0.00 0.00 38 | 08:07:13 HKT 0.00 0.00 0.00 0.00 0.00 39 | 08:07:14 HKT 0.00 0.00 0.00 0.00 0.00 40 | 08:07:15 HKT 0.00 0.00 0.00 0.00 0.00 41 | 08:07:16 HKT 17.00 0.00 17.00 0.00 192.00 42 | 08:07:17 HKT 0.00 0.00 0.00 0.00 0.00 43 | 08:07:18 HKT 0.00 0.00 0.00 0.00 0.00 44 | 08:07:19 HKT 0.00 0.00 0.00 0.00 0.00 45 | 08:07:20 HKT 0.00 0.00 0.00 0.00 0.00 46 | 08:07:21 HKT 14.00 0.00 14.00 0.00 168.00 47 | 08:07:22 HKT 0.00 0.00 0.00 0.00 0.00 48 | 08:07:23 HKT 0.00 0.00 0.00 0.00 0.00 49 | 08:07:24 HKT 0.00 0.00 0.00 0.00 0.00 50 | 08:07:25 HKT 0.00 0.00 0.00 0.00 0.00 51 | 08:07:26 HKT 3.00 0.00 3.00 0.00 24.00 52 | 08:07:27 HKT 16.00 0.00 16.00 0.00 216.00 53 | 08:07:28 HKT 0.00 0.00 0.00 0.00 0.00 54 | 08:07:29 HKT 0.00 0.00 0.00 0.00 0.00 55 | 08:07:30 HKT 0.00 0.00 0.00 0.00 0.00 56 | 08:07:31 HKT 3.00 0.00 3.00 0.00 32.00 57 | 08:07:32 HKT 12.87 0.00 12.87 0.00 158.42 58 | 08:07:33 HKT 0.00 0.00 0.00 0.00 0.00 59 | 08:07:34 HKT 0.00 0.00 0.00 0.00 0.00 60 | 08:07:35 HKT 0.00 0.00 0.00 0.00 0.00 61 | 08:07:36 HKT 0.00 0.00 0.00 0.00 0.00 62 | 08:07:37 HKT 15.00 0.00 15.00 0.00 184.00 63 | 08:07:38 HKT 0.00 0.00 0.00 0.00 0.00 64 | 08:07:39 HKT 0.00 0.00 0.00 0.00 0.00 65 | 08:07:40 HKT 0.00 0.00 0.00 0.00 0.00 66 | 08:07:41 HKT 9.00 0.00 9.00 0.00 112.00 67 | 08:07:42 HKT 13.00 0.00 13.00 0.00 168.00 68 | 08:07:43 HKT 0.00 0.00 0.00 0.00 0.00 69 | 08:07:44 HKT 0.00 0.00 0.00 0.00 0.00 70 | 08:07:45 HKT 0.00 0.00 0.00 0.00 0.00 71 | 08:07:46 HKT 12.00 0.00 12.00 0.00 104.00 72 | 08:07:47 HKT 9.00 0.00 9.00 0.00 152.00 73 | 08:07:48 HKT 0.00 0.00 0.00 0.00 0.00 74 | 08:07:49 HKT 0.00 0.00 0.00 0.00 0.00 75 | 08:07:50 HKT 0.00 0.00 0.00 0.00 0.00 76 | 08:07:51 HKT 3.00 0.00 3.00 0.00 32.00 77 | 08:07:52 HKT 18.00 0.00 18.00 0.00 208.00 78 | 08:07:53 HKT 15.00 0.00 15.00 0.00 176.00 79 | 08:07:54 HKT 18.00 0.00 18.00 0.00 248.00 80 | 08:07:55 HKT 0.00 0.00 0.00 0.00 0.00 81 | 08:07:56 HKT 0.00 0.00 0.00 0.00 0.00 82 | 08:07:57 HKT 0.00 0.00 0.00 0.00 0.00 83 | 08:07:58 HKT 0.00 0.00 0.00 0.00 0.00 84 | 08:07:59 HKT 0.00 0.00 0.00 0.00 0.00 85 | 08:08:00 HKT 13.00 0.00 13.00 0.00 160.00 86 | 08:08:01 HKT 9.00 0.00 9.00 0.00 72.00 87 | 08:08:02 HKT 0.00 0.00 0.00 0.00 0.00 88 | 08:08:03 HKT 0.00 0.00 0.00 0.00 0.00 89 | 08:08:04 HKT 0.00 0.00 0.00 0.00 0.00 90 | 08:08:05 HKT 17.00 0.00 17.00 0.00 216.00 91 | 08:08:06 HKT 3.00 0.00 3.00 0.00 32.00 92 | 08:08:07 HKT 0.00 0.00 0.00 0.00 0.00 93 | 08:08:08 HKT 0.00 0.00 0.00 0.00 0.00 94 | 08:08:09 HKT 0.00 0.00 0.00 0.00 0.00 95 | 08:08:10 HKT 13.00 0.00 13.00 0.00 152.00 96 | 08:08:11 HKT 7.00 0.00 7.00 0.00 80.00 97 | 08:08:12 HKT 0.00 0.00 0.00 0.00 0.00 98 | 08:08:13 HKT 0.00 0.00 0.00 0.00 0.00 99 | 08:08:14 HKT 0.00 0.00 0.00 0.00 0.00 100 | 08:08:15 HKT 14.00 0.00 14.00 0.00 160.00 101 | 08:08:16 HKT 3.00 0.00 3.00 0.00 32.00 102 | 08:08:17 HKT 0.00 0.00 0.00 0.00 0.00 103 | 08:08:18 HKT 0.00 0.00 0.00 0.00 0.00 104 | 08:08:19 HKT 0.00 0.00 0.00 0.00 0.00 105 | 08:08:20 HKT 15.00 0.00 15.00 0.00 168.00 106 | 08:08:21 HKT 10.00 0.00 10.00 0.00 80.00 107 | 08:08:22 HKT 0.00 0.00 0.00 0.00 0.00 108 | 08:08:23 HKT 0.00 0.00 0.00 0.00 0.00 109 | 08:08:24 HKT 0.00 0.00 0.00 0.00 0.00 110 | 08:08:25 HKT 15.00 0.00 15.00 0.00 120.00 111 | 08:08:26 HKT 5.00 0.00 5.00 0.00 128.00 112 | 08:08:27 HKT 0.00 0.00 0.00 0.00 0.00 113 | 08:08:28 HKT 0.00 0.00 0.00 0.00 0.00 114 | 08:08:29 HKT 0.00 0.00 0.00 0.00 0.00 115 | 08:08:30 HKT 0.00 0.00 0.00 0.00 0.00 116 | 08:08:31 HKT 15.00 0.00 15.00 0.00 168.00 117 | 08:08:32 HKT 0.00 0.00 0.00 0.00 0.00 118 | 08:08:33 HKT 0.00 0.00 0.00 0.00 0.00 119 | 08:08:34 HKT 0.00 0.00 0.00 0.00 0.00 120 | 08:08:35 HKT 0.00 0.00 0.00 0.00 0.00 121 | 08:08:36 HKT 33.00 0.00 33.00 0.00 376.00 122 | 08:08:37 HKT 0.00 0.00 0.00 0.00 0.00 123 | 08:08:38 HKT 0.00 0.00 0.00 0.00 0.00 124 | Average: 4.24 0.00 4.24 0.00 50.61 125 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_memory_201511192006-buffers(MB).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_memory_201511192006-buffers(MB).png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_memory_201511192006-cached(MB).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_memory_201511192006-cached(MB).png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_memory_201511192006-memfree(MB).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_memory_201511192006-memfree(MB).png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_memory_201511192006-memused(MB).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_memory_201511192006-memused(MB).png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_memory_201511192006-memused--.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_memory_201511192006-memused--.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_memory_201511192006-memused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_memory_201511192006-memused.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_memory_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit 4 | 08:06:39 HKT 94388 3953836 97.67 36476 577872 6451372 80.23 5 | 08:06:40 HKT 94292 3953932 97.67 36484 577872 6451372 80.23 6 | 08:06:41 HKT 94196 3954028 97.67 36484 577872 6451372 80.23 7 | 08:06:42 HKT 94388 3953836 97.67 36484 577872 6451372 80.23 8 | 08:06:43 HKT 94388 3953836 97.67 36484 577872 6451372 80.23 9 | 08:06:44 HKT 94388 3953836 97.67 36484 577872 6451372 80.23 10 | 08:06:45 HKT 94292 3953932 97.67 36492 577864 6451372 80.23 11 | 08:06:46 HKT 94292 3953932 97.67 36492 577872 6451372 80.23 12 | 08:06:47 HKT 94388 3953836 97.67 36492 577872 6451372 80.23 13 | 08:06:48 HKT 94388 3953836 97.67 36492 577872 6451372 80.23 14 | 08:06:49 HKT 94072 3954152 97.68 36492 577872 6451372 80.23 15 | 08:06:50 HKT 94264 3953960 97.67 36500 577864 6451372 80.23 16 | 08:06:51 HKT 94264 3953960 97.67 36500 577872 6451372 80.23 17 | 08:06:52 HKT 94168 3954056 97.67 36500 577872 6451372 80.23 18 | 08:06:53 HKT 94264 3953960 97.67 36500 577872 6451372 80.23 19 | 08:06:54 HKT 94264 3953960 97.67 36500 577876 6451372 80.23 20 | 08:06:55 HKT 94264 3953960 97.67 36500 577876 6451372 80.23 21 | 08:06:56 HKT 94264 3953960 97.67 36508 577876 6451372 80.23 22 | 08:06:57 HKT 94264 3953960 97.67 36508 577876 6451372 80.23 23 | 08:06:58 HKT 94264 3953960 97.67 36508 577876 6451372 80.23 24 | 08:06:59 HKT 94264 3953960 97.67 36508 577880 6451372 80.23 25 | 08:07:00 HKT 94264 3953960 97.67 36508 577880 6451372 80.23 26 | 08:07:01 HKT 94168 3954056 97.67 36516 577880 6451372 80.23 27 | 08:07:02 HKT 94264 3953960 97.67 36516 577880 6451372 80.23 28 | 08:07:03 HKT 94264 3953960 97.67 36516 577880 6451372 80.23 29 | 08:07:04 HKT 94264 3953960 97.67 36516 577880 6451372 80.23 30 | 08:07:05 HKT 94264 3953960 97.67 36516 577880 6451372 80.23 31 | 08:07:06 HKT 94168 3954056 97.67 36524 577880 6451372 80.23 32 | 08:07:07 HKT 94264 3953960 97.67 36524 577880 6451372 80.23 33 | 08:07:08 HKT 94072 3954152 97.68 36524 577884 6451372 80.23 34 | 08:07:09 HKT 94168 3954056 97.67 36524 577884 6451372 80.23 35 | 08:07:10 HKT 94168 3954056 97.67 36524 577884 6451372 80.23 36 | 08:07:11 HKT 94388 3953836 97.67 36532 577884 6451372 80.23 37 | 08:07:12 HKT 94388 3953836 97.67 36532 577884 6451372 80.23 38 | 08:07:13 HKT 94388 3953836 97.67 36532 577884 6451372 80.23 39 | 08:07:14 HKT 94388 3953836 97.67 36532 577884 6451372 80.23 40 | 08:07:15 HKT 94300 3953924 97.67 36532 577884 6451372 80.23 41 | 08:07:16 HKT 94396 3953828 97.67 36540 577884 6451372 80.23 42 | 08:07:17 HKT 94300 3953924 97.67 36540 577888 6451372 80.23 43 | 08:07:18 HKT 94396 3953828 97.67 36540 577888 6451372 80.23 44 | 08:07:19 HKT 94396 3953828 97.67 36540 577892 6451372 80.23 45 | 08:07:20 HKT 94396 3953828 97.67 36540 577892 6451372 80.23 46 | 08:07:21 HKT 94428 3953796 97.67 36548 577884 6451372 80.23 47 | 08:07:22 HKT 94428 3953796 97.67 36548 577892 6451372 80.23 48 | 08:07:23 HKT 94428 3953796 97.67 36548 577896 6451372 80.23 49 | 08:07:24 HKT 94428 3953796 97.67 36548 577896 6451372 80.23 50 | 08:07:25 HKT 94428 3953796 97.67 36548 577896 6451372 80.23 51 | 08:07:26 HKT 94428 3953796 97.67 36556 577888 6451372 80.23 52 | 08:07:27 HKT 94428 3953796 97.67 36556 577900 6451372 80.23 53 | 08:07:28 HKT 94428 3953796 97.67 36556 577904 6451372 80.23 54 | 08:07:29 HKT 94428 3953796 97.67 36556 577904 6451372 80.23 55 | 08:07:30 HKT 94428 3953796 97.67 36556 577904 6451372 80.23 56 | 08:07:31 HKT 94304 3953920 97.67 36556 577904 6451372 80.23 57 | 08:07:32 HKT 94304 3953920 97.67 36564 577904 6451372 80.23 58 | 08:07:33 HKT 94304 3953920 97.67 36564 577908 6451372 80.23 59 | 08:07:34 HKT 94304 3953920 97.67 36564 577908 6451372 80.23 60 | 08:07:35 HKT 94304 3953920 97.67 36564 577908 6451372 80.23 61 | 08:07:36 HKT 94180 3954044 97.67 36564 577908 6451372 80.23 62 | 08:07:37 HKT 94180 3954044 97.67 36572 577908 6451372 80.23 63 | 08:07:38 HKT 94180 3954044 97.67 36572 577916 6451372 80.23 64 | 08:07:39 HKT 94180 3954044 97.67 36572 577916 6451372 80.23 65 | 08:07:40 HKT 94180 3954044 97.67 36572 577916 6451372 80.23 66 | 08:07:41 HKT 94180 3954044 97.67 36572 577916 6451372 80.23 67 | 08:07:42 HKT 94180 3954044 97.67 36580 577924 6451372 80.23 68 | 08:07:43 HKT 94180 3954044 97.67 36580 577924 6451372 80.23 69 | 08:07:44 HKT 94180 3954044 97.67 36580 577924 6451372 80.23 70 | 08:07:45 HKT 94180 3954044 97.67 36580 577924 6451372 80.23 71 | 08:07:46 HKT 94180 3954044 97.67 36580 577924 6451372 80.23 72 | 08:07:47 HKT 94180 3954044 97.67 36588 577924 6451372 80.23 73 | 08:07:48 HKT 94180 3954044 97.67 36588 577924 6451372 80.23 74 | 08:07:49 HKT 94180 3954044 97.67 36588 577924 6451372 80.23 75 | 08:07:50 HKT 94180 3954044 97.67 36588 577924 6451372 80.23 76 | 08:07:51 HKT 94180 3954044 97.67 36588 577924 6451372 80.23 77 | 08:07:52 HKT 94180 3954044 97.67 36596 577928 6451372 80.23 78 | 08:07:53 HKT 94180 3954044 97.67 36604 577928 6451372 80.23 79 | 08:07:54 HKT 94180 3954044 97.67 36620 577932 6451372 80.23 80 | 08:07:55 HKT 94180 3954044 97.67 36620 577932 6451372 80.23 81 | 08:07:56 HKT 94180 3954044 97.67 36620 577932 6451372 80.23 82 | 08:07:57 HKT 94180 3954044 97.67 36620 577936 6451372 80.23 83 | 08:07:58 HKT 94180 3954044 97.67 36620 577940 6451372 80.23 84 | 08:07:59 HKT 94180 3954044 97.67 36628 577932 6451372 80.23 85 | 08:08:00 HKT 94048 3954176 97.68 36628 577940 6451252 80.23 86 | 08:08:01 HKT 94048 3954176 97.68 36628 577940 6451252 80.23 87 | 08:08:02 HKT 93924 3954300 97.68 36628 577940 6451252 80.23 88 | 08:08:03 HKT 93924 3954300 97.68 36628 577940 6451252 80.23 89 | 08:08:04 HKT 93924 3954300 97.68 36636 577932 6451252 80.23 90 | 08:08:05 HKT 93924 3954300 97.68 36636 577940 6451252 80.23 91 | 08:08:06 HKT 93924 3954300 97.68 36636 577940 6451252 80.23 92 | 08:08:07 HKT 93924 3954300 97.68 36636 577944 6451252 80.23 93 | 08:08:08 HKT 93924 3954300 97.68 36636 577944 6451252 80.23 94 | 08:08:09 HKT 93924 3954300 97.68 36636 577944 6451252 80.23 95 | 08:08:10 HKT 93924 3954300 97.68 36644 577944 6451252 80.23 96 | 08:08:11 HKT 93924 3954300 97.68 36644 577944 6451252 80.23 97 | 08:08:12 HKT 93924 3954300 97.68 36644 577944 6451252 80.23 98 | 08:08:13 HKT 93924 3954300 97.68 36644 577944 6451252 80.23 99 | 08:08:14 HKT 93924 3954300 97.68 36644 577944 6451252 80.23 100 | 08:08:15 HKT 93924 3954300 97.68 36652 577944 6451252 80.23 101 | 08:08:16 HKT 93924 3954300 97.68 36652 577948 6451252 80.23 102 | 08:08:17 HKT 93924 3954300 97.68 36652 577948 6451252 80.23 103 | 08:08:18 HKT 93924 3954300 97.68 36652 577952 6451252 80.23 104 | 08:08:19 HKT 93800 3954424 97.68 36652 577956 6451252 80.23 105 | 08:08:20 HKT 93800 3954424 97.68 36660 577956 6451252 80.23 106 | 08:08:21 HKT 93800 3954424 97.68 36660 577956 6451252 80.23 107 | 08:08:22 HKT 93800 3954424 97.68 36660 577960 6451252 80.23 108 | 08:08:23 HKT 93800 3954424 97.68 36660 577960 6451252 80.23 109 | 08:08:24 HKT 93800 3954424 97.68 36660 577960 6451252 80.23 110 | 08:08:25 HKT 93800 3954424 97.68 36668 577952 6451252 80.23 111 | 08:08:26 HKT 93800 3954424 97.68 36668 577960 6451252 80.23 112 | 08:08:27 HKT 93800 3954424 97.68 36668 577960 6451252 80.23 113 | 08:08:28 HKT 93800 3954424 97.68 36668 577960 6451252 80.23 114 | 08:08:29 HKT 93800 3954424 97.68 36668 577960 6451252 80.23 115 | 08:08:30 HKT 93800 3954424 97.68 36676 577956 6451252 80.23 116 | 08:08:31 HKT 93800 3954424 97.68 36676 577964 6451252 80.23 117 | 08:08:32 HKT 93704 3954520 97.69 36676 577964 6451252 80.23 118 | 08:08:33 HKT 93800 3954424 97.68 36676 577968 6451252 80.23 119 | 08:08:34 HKT 93800 3954424 97.68 36676 577968 6451252 80.23 120 | 08:08:35 HKT 93800 3954424 97.68 36684 577960 6451252 80.23 121 | 08:08:36 HKT 93800 3954424 97.68 36684 577972 6451252 80.23 122 | 08:08:37 HKT 93800 3954424 97.68 36684 577976 6451252 80.23 123 | 08:08:38 HKT 94700 3953524 97.66 36684 577980 6448912 80.20 124 | Average: 94148 3954076 97.67 36580 577914 6451314 80.23 125 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_paging_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s pgscand/s pgsteal/s %vmeff 4 | 08:06:39 HKT 0.00 0.00 1147.00 0.00 672.00 0.00 0.00 0.00 0.00 5 | 08:06:40 HKT 0.00 190.10 397.03 0.00 735.64 0.00 0.00 0.00 0.00 6 | 08:06:41 HKT 0.00 16.00 425.00 0.00 960.00 0.00 0.00 0.00 0.00 7 | 08:06:42 HKT 0.00 0.00 244.00 0.00 491.00 0.00 0.00 0.00 0.00 8 | 08:06:43 HKT 0.00 0.00 293.14 0.00 644.12 0.00 0.00 0.00 0.00 9 | 08:06:44 HKT 0.00 0.00 364.00 0.00 819.00 0.00 0.00 0.00 0.00 10 | 08:06:45 HKT 0.00 96.00 377.00 0.00 837.00 0.00 0.00 0.00 0.00 11 | 08:06:46 HKT 0.00 0.00 283.17 0.00 606.93 0.00 0.00 0.00 0.00 12 | 08:06:47 HKT 0.00 0.00 294.00 0.00 636.00 0.00 0.00 0.00 0.00 13 | 08:06:48 HKT 0.00 0.00 379.00 0.00 818.00 0.00 0.00 0.00 0.00 14 | 08:06:49 HKT 0.00 0.00 283.17 0.00 632.67 0.00 0.00 0.00 0.00 15 | 08:06:50 HKT 0.00 64.00 294.00 0.00 588.00 0.00 0.00 0.00 0.00 16 | 08:06:51 HKT 0.00 140.00 298.00 0.00 676.00 0.00 0.00 0.00 0.00 17 | 08:06:52 HKT 0.00 0.00 339.00 0.00 767.00 0.00 0.00 0.00 0.00 18 | 08:06:53 HKT 0.00 0.00 238.00 0.00 504.00 0.00 0.00 0.00 0.00 19 | 08:06:54 HKT 0.00 0.00 388.00 0.00 850.00 0.00 0.00 0.00 0.00 20 | 08:06:55 HKT 0.00 0.00 292.08 0.00 648.51 0.00 0.00 0.00 0.00 21 | 08:06:56 HKT 0.00 128.00 379.00 0.00 824.00 0.00 0.00 0.00 0.00 22 | 08:06:57 HKT 0.00 0.00 292.00 0.00 620.00 0.00 0.00 0.00 0.00 23 | 08:06:58 HKT 0.00 0.00 253.00 0.00 571.00 0.00 0.00 0.00 0.00 24 | 08:06:59 HKT 0.00 0.00 331.00 0.00 713.00 0.00 0.00 0.00 0.00 25 | 08:07:00 HKT 0.00 0.00 326.00 0.00 659.00 0.00 0.00 0.00 0.00 26 | 08:07:01 HKT 0.00 84.00 290.00 0.00 629.00 0.00 0.00 0.00 0.00 27 | 08:07:02 HKT 0.00 0.00 339.00 0.00 726.00 0.00 0.00 0.00 0.00 28 | 08:07:03 HKT 0.00 0.00 339.60 0.00 728.71 0.00 0.00 0.00 0.00 29 | 08:07:04 HKT 0.00 0.00 274.00 0.00 625.00 0.00 0.00 0.00 0.00 30 | 08:07:05 HKT 0.00 0.00 356.00 0.00 815.00 0.00 0.00 0.00 0.00 31 | 08:07:06 HKT 0.00 152.00 346.00 0.00 747.00 0.00 0.00 0.00 0.00 32 | 08:07:07 HKT 0.00 0.00 250.00 0.00 488.00 0.00 0.00 0.00 0.00 33 | 08:07:08 HKT 0.00 0.00 294.06 0.00 688.12 0.00 0.00 0.00 0.00 34 | 08:07:09 HKT 0.00 0.00 396.00 0.00 857.00 0.00 0.00 0.00 0.00 35 | 08:07:10 HKT 0.00 0.00 316.00 0.00 707.00 0.00 0.00 0.00 0.00 36 | 08:07:11 HKT 0.00 108.00 220.00 0.00 482.00 0.00 0.00 0.00 0.00 37 | 08:07:12 HKT 0.00 0.00 328.00 0.00 706.00 0.00 0.00 0.00 0.00 38 | 08:07:13 HKT 0.00 0.00 344.00 0.00 765.00 0.00 0.00 0.00 0.00 39 | 08:07:14 HKT 0.00 0.00 298.00 0.00 609.00 0.00 0.00 0.00 0.00 40 | 08:07:15 HKT 0.00 0.00 395.05 0.00 889.11 0.00 0.00 0.00 0.00 41 | 08:07:16 HKT 0.00 96.00 264.00 0.00 555.00 0.00 0.00 0.00 0.00 42 | 08:07:17 HKT 0.00 0.00 263.00 0.00 553.00 0.00 0.00 0.00 0.00 43 | 08:07:18 HKT 0.00 0.00 366.00 0.00 812.00 0.00 0.00 0.00 0.00 44 | 08:07:19 HKT 0.00 0.00 295.00 0.00 644.00 0.00 0.00 0.00 0.00 45 | 08:07:20 HKT 0.00 0.00 307.92 0.00 687.13 0.00 0.00 0.00 0.00 46 | 08:07:21 HKT 0.00 84.00 327.00 0.00 711.00 0.00 0.00 0.00 0.00 47 | 08:07:22 HKT 0.00 0.00 323.00 0.00 708.00 0.00 0.00 0.00 0.00 48 | 08:07:23 HKT 0.00 0.00 351.00 0.00 803.00 0.00 0.00 0.00 0.00 49 | 08:07:24 HKT 0.00 0.00 333.00 0.00 732.00 0.00 0.00 0.00 0.00 50 | 08:07:25 HKT 0.00 0.00 297.00 0.00 651.00 0.00 0.00 0.00 0.00 51 | 08:07:26 HKT 0.00 118.81 310.89 0.00 665.35 0.00 0.00 0.00 0.00 52 | 08:07:27 HKT 0.00 0.00 282.00 0.00 590.00 0.00 0.00 0.00 0.00 53 | 08:07:28 HKT 0.00 0.00 315.00 0.00 698.00 0.00 0.00 0.00 0.00 54 | 08:07:29 HKT 0.00 0.00 347.00 0.00 789.00 0.00 0.00 0.00 0.00 55 | 08:07:30 HKT 0.00 0.00 337.00 0.00 737.00 0.00 0.00 0.00 0.00 56 | 08:07:31 HKT 0.00 96.00 316.00 0.00 649.00 0.00 0.00 0.00 0.00 57 | 08:07:32 HKT 0.00 0.00 312.00 0.00 634.00 0.00 0.00 0.00 0.00 58 | 08:07:33 HKT 0.00 0.00 321.78 0.00 726.73 0.00 0.00 0.00 0.00 59 | 08:07:34 HKT 0.00 0.00 312.00 0.00 687.00 0.00 0.00 0.00 0.00 60 | 08:07:35 HKT 0.00 0.00 298.00 0.00 667.00 0.00 0.00 0.00 0.00 61 | 08:07:36 HKT 0.00 0.00 365.00 0.00 812.00 0.00 0.00 0.00 0.00 62 | 08:07:37 HKT 0.00 91.09 267.33 0.00 566.34 0.00 0.00 0.00 0.00 63 | 08:07:38 HKT 0.00 0.00 321.00 0.00 696.00 0.00 0.00 0.00 0.00 64 | 08:07:39 HKT 0.00 0.00 318.00 0.00 713.00 0.00 0.00 0.00 0.00 65 | 08:07:40 HKT 0.00 0.00 302.00 0.00 668.00 0.00 0.00 0.00 0.00 66 | 08:07:41 HKT 0.00 56.00 324.00 0.00 685.00 0.00 0.00 0.00 0.00 67 | 08:07:42 HKT 0.00 84.00 312.00 0.00 686.00 0.00 0.00 0.00 0.00 68 | 08:07:43 HKT 0.00 0.00 277.00 0.00 605.00 0.00 0.00 0.00 0.00 69 | 08:07:44 HKT 0.00 0.00 315.00 0.00 685.00 0.00 0.00 0.00 0.00 70 | 08:07:45 HKT 0.00 0.00 378.22 0.00 869.31 0.00 0.00 0.00 0.00 71 | 08:07:46 HKT 0.00 52.00 308.00 0.00 648.00 0.00 0.00 0.00 0.00 72 | 08:07:47 HKT 0.00 76.00 331.00 0.00 709.00 0.00 0.00 0.00 0.00 73 | 08:07:48 HKT 0.00 0.00 314.00 0.00 669.00 0.00 0.00 0.00 0.00 74 | 08:07:49 HKT 0.00 0.00 294.00 0.00 647.00 0.00 0.00 0.00 0.00 75 | 08:07:50 HKT 0.00 0.00 329.00 0.00 736.00 0.00 0.00 0.00 0.00 76 | 08:07:51 HKT 0.00 16.00 320.00 0.00 691.00 0.00 0.00 0.00 0.00 77 | 08:07:52 HKT 0.00 102.97 315.84 0.00 674.26 0.00 0.00 0.00 0.00 78 | 08:07:53 HKT 0.00 88.00 283.00 0.00 600.00 0.00 0.00 0.00 0.00 79 | 08:07:54 HKT 0.00 124.00 350.00 0.00 773.00 0.00 0.00 0.00 0.00 80 | 08:07:55 HKT 0.00 0.00 312.00 0.00 688.00 0.00 0.00 0.00 0.00 81 | 08:07:56 HKT 0.00 0.00 315.00 0.00 675.00 0.00 0.00 0.00 0.00 82 | 08:07:57 HKT 0.00 0.00 300.00 0.00 648.51 0.00 0.00 0.00 0.00 83 | 08:07:58 HKT 0.00 0.00 309.00 0.00 683.00 0.00 0.00 0.00 0.00 84 | 08:07:59 HKT 0.00 80.00 302.00 0.00 664.00 0.00 0.00 0.00 0.00 85 | 08:08:00 HKT 0.00 0.00 846.00 0.00 863.00 0.00 0.00 0.00 0.00 86 | 08:08:01 HKT 0.00 36.00 316.00 0.00 667.00 0.00 0.00 0.00 0.00 87 | 08:08:02 HKT 0.00 0.00 335.00 0.00 746.00 0.00 0.00 0.00 0.00 88 | 08:08:03 HKT 0.00 0.00 309.90 0.00 677.23 0.00 0.00 0.00 0.00 89 | 08:08:04 HKT 0.00 108.00 306.00 0.00 680.00 0.00 0.00 0.00 0.00 90 | 08:08:05 HKT 0.00 0.00 311.00 0.00 683.00 0.00 0.00 0.00 0.00 91 | 08:08:06 HKT 0.00 16.00 320.00 0.00 689.00 0.00 0.00 0.00 0.00 92 | 08:08:07 HKT 0.00 0.00 308.00 0.00 682.00 0.00 0.00 0.00 0.00 93 | 08:08:08 HKT 0.00 0.00 321.00 0.00 702.00 0.00 0.00 0.00 0.00 94 | 08:08:09 HKT 0.00 43.56 308.91 0.00 676.24 0.00 0.00 0.00 0.00 95 | 08:08:10 HKT 0.00 32.00 310.00 0.00 686.00 0.00 0.00 0.00 0.00 96 | 08:08:11 HKT 0.00 40.00 318.00 0.00 689.00 0.00 0.00 0.00 0.00 97 | 08:08:12 HKT 0.00 0.00 307.00 0.00 675.00 0.00 0.00 0.00 0.00 98 | 08:08:13 HKT 0.00 0.00 316.00 0.00 691.00 0.00 0.00 0.00 0.00 99 | 08:08:14 HKT 0.00 0.00 311.00 0.00 680.00 0.00 0.00 0.00 0.00 100 | 08:08:15 HKT 0.00 80.00 309.00 0.00 677.00 0.00 0.00 0.00 0.00 101 | 08:08:16 HKT 0.00 16.00 332.00 0.00 689.00 0.00 0.00 0.00 0.00 102 | 08:08:17 HKT 0.00 0.00 320.79 0.00 681.19 0.00 0.00 0.00 0.00 103 | 08:08:18 HKT 0.00 0.00 321.00 0.00 692.00 0.00 0.00 0.00 0.00 104 | 08:08:19 HKT 0.00 0.00 310.00 0.00 686.00 0.00 0.00 0.00 0.00 105 | 08:08:20 HKT 0.00 84.00 312.00 0.00 685.00 0.00 0.00 0.00 0.00 106 | 08:08:21 HKT 0.00 40.00 317.00 0.00 697.00 0.00 0.00 0.00 0.00 107 | 08:08:22 HKT 0.00 0.00 315.00 0.00 689.00 0.00 0.00 0.00 0.00 108 | 08:08:23 HKT 0.00 0.00 320.79 0.00 723.76 0.00 0.00 0.00 0.00 109 | 08:08:24 HKT 0.00 0.00 306.00 0.00 645.00 0.00 0.00 0.00 0.00 110 | 08:08:25 HKT 0.00 108.00 311.00 0.00 687.00 0.00 0.00 0.00 0.00 111 | 08:08:26 HKT 0.00 16.00 318.00 0.00 712.00 0.00 0.00 0.00 0.00 112 | 08:08:27 HKT 0.00 0.00 311.00 0.00 682.00 0.00 0.00 0.00 0.00 113 | 08:08:28 HKT 0.00 0.00 309.00 0.00 684.00 0.00 0.00 0.00 0.00 114 | 08:08:29 HKT 0.00 0.00 301.00 0.00 671.00 0.00 0.00 0.00 0.00 115 | 08:08:30 HKT 0.00 76.00 322.00 0.00 689.00 0.00 0.00 0.00 0.00 116 | 08:08:31 HKT 0.00 7.92 315.84 0.00 679.21 0.00 0.00 0.00 0.00 117 | 08:08:32 HKT 0.00 0.00 311.00 0.00 675.00 0.00 0.00 0.00 0.00 118 | 08:08:33 HKT 0.00 0.00 325.00 0.00 699.00 0.00 0.00 0.00 0.00 119 | 08:08:34 HKT 0.00 0.00 312.00 0.00 686.00 0.00 0.00 0.00 0.00 120 | 08:08:35 HKT 0.00 128.00 310.00 0.00 685.00 0.00 0.00 0.00 0.00 121 | 08:08:36 HKT 0.00 60.00 282.00 0.00 664.00 0.00 0.00 0.00 0.00 122 | 08:08:37 HKT 0.00 0.00 346.00 0.00 715.00 0.00 0.00 0.00 0.00 123 | 08:08:38 HKT 0.00 0.00 637.00 0.00 1367.00 0.00 0.00 0.00 0.00 124 | Average: 0.00 25.29 330.49 0.00 696.42 0.00 0.00 0.00 0.00 125 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-1.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-15.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_queue_load_201511192006-ldavg-5.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_queue_load_201511192006-plist-sz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_queue_load_201511192006-plist-sz.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_queue_load_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 4 | 08:06:39 HKT 9 633 0.19 0.06 0.02 5 | 08:06:40 HKT 9 633 0.18 0.06 0.02 6 | 08:06:41 HKT 10 633 0.18 0.06 0.02 7 | 08:06:42 HKT 9 633 0.18 0.06 0.02 8 | 08:06:43 HKT 10 633 0.18 0.06 0.02 9 | 08:06:44 HKT 9 633 0.18 0.06 0.02 10 | 08:06:45 HKT 9 633 0.16 0.06 0.02 11 | 08:06:46 HKT 10 633 0.16 0.06 0.02 12 | 08:06:47 HKT 9 633 0.16 0.06 0.02 13 | 08:06:48 HKT 9 633 0.16 0.06 0.02 14 | 08:06:49 HKT 9 633 0.16 0.06 0.02 15 | 08:06:50 HKT 8 633 0.15 0.05 0.02 16 | 08:06:51 HKT 9 633 0.15 0.05 0.02 17 | 08:06:52 HKT 8 633 0.15 0.05 0.02 18 | 08:06:53 HKT 9 633 0.15 0.05 0.02 19 | 08:06:54 HKT 9 633 0.15 0.05 0.02 20 | 08:06:55 HKT 11 633 0.14 0.05 0.02 21 | 08:06:56 HKT 9 633 0.14 0.05 0.02 22 | 08:06:57 HKT 9 633 0.14 0.05 0.02 23 | 08:06:58 HKT 9 633 0.14 0.05 0.02 24 | 08:06:59 HKT 9 633 0.14 0.05 0.02 25 | 08:07:00 HKT 10 633 0.13 0.05 0.02 26 | 08:07:01 HKT 10 633 0.13 0.05 0.02 27 | 08:07:02 HKT 9 633 0.13 0.05 0.02 28 | 08:07:03 HKT 7 633 0.13 0.05 0.02 29 | 08:07:04 HKT 9 633 0.13 0.05 0.02 30 | 08:07:05 HKT 9 633 0.12 0.05 0.02 31 | 08:07:06 HKT 9 633 0.12 0.05 0.02 32 | 08:07:07 HKT 11 633 0.12 0.05 0.02 33 | 08:07:08 HKT 9 633 0.12 0.05 0.02 34 | 08:07:09 HKT 7 633 0.12 0.05 0.02 35 | 08:07:10 HKT 9 633 0.11 0.05 0.01 36 | 08:07:11 HKT 10 633 0.11 0.05 0.01 37 | 08:07:12 HKT 10 633 0.11 0.05 0.01 38 | 08:07:13 HKT 7 633 0.11 0.05 0.01 39 | 08:07:14 HKT 7 633 0.11 0.05 0.01 40 | 08:07:15 HKT 7 633 0.10 0.05 0.01 41 | 08:07:16 HKT 7 633 0.10 0.05 0.01 42 | 08:07:17 HKT 8 633 0.10 0.05 0.01 43 | 08:07:18 HKT 7 633 0.10 0.05 0.01 44 | 08:07:19 HKT 7 633 0.10 0.05 0.01 45 | 08:07:20 HKT 8 633 0.09 0.05 0.01 46 | 08:07:21 HKT 7 633 0.09 0.05 0.01 47 | 08:07:22 HKT 7 633 0.09 0.05 0.01 48 | 08:07:23 HKT 7 633 0.09 0.05 0.01 49 | 08:07:24 HKT 7 633 0.09 0.05 0.01 50 | 08:07:25 HKT 7 633 0.08 0.05 0.01 51 | 08:07:26 HKT 7 633 0.08 0.05 0.01 52 | 08:07:27 HKT 12 633 0.08 0.05 0.01 53 | 08:07:28 HKT 6 633 0.08 0.05 0.01 54 | 08:07:29 HKT 7 633 0.08 0.05 0.01 55 | 08:07:30 HKT 8 633 0.08 0.05 0.01 56 | 08:07:31 HKT 5 633 0.08 0.05 0.01 57 | 08:07:32 HKT 8 633 0.08 0.05 0.01 58 | 08:07:33 HKT 4 633 0.08 0.05 0.01 59 | 08:07:34 HKT 4 633 0.08 0.05 0.01 60 | 08:07:35 HKT 5 633 0.07 0.05 0.01 61 | 08:07:36 HKT 4 633 0.07 0.05 0.01 62 | 08:07:37 HKT 2 633 0.07 0.05 0.01 63 | 08:07:38 HKT 3 633 0.07 0.05 0.01 64 | 08:07:39 HKT 2 633 0.07 0.05 0.01 65 | 08:07:40 HKT 3 633 0.06 0.04 0.01 66 | 08:07:41 HKT 3 633 0.06 0.04 0.01 67 | 08:07:42 HKT 6 633 0.06 0.04 0.01 68 | 08:07:43 HKT 11 633 0.06 0.04 0.01 69 | 08:07:44 HKT 5 633 0.06 0.04 0.01 70 | 08:07:45 HKT 4 633 0.06 0.04 0.01 71 | 08:07:46 HKT 8 633 0.06 0.04 0.01 72 | 08:07:47 HKT 6 633 0.06 0.04 0.01 73 | 08:07:48 HKT 4 633 0.06 0.04 0.01 74 | 08:07:49 HKT 6 633 0.06 0.04 0.01 75 | 08:07:50 HKT 4 633 0.05 0.04 0.01 76 | 08:07:51 HKT 4 633 0.05 0.04 0.01 77 | 08:07:52 HKT 10 633 0.05 0.04 0.01 78 | 08:07:53 HKT 6 633 0.05 0.04 0.01 79 | 08:07:54 HKT 4 633 0.05 0.04 0.01 80 | 08:07:55 HKT 4 633 0.05 0.04 0.01 81 | 08:07:56 HKT 6 633 0.05 0.04 0.01 82 | 08:07:57 HKT 5 633 0.05 0.04 0.01 83 | 08:07:58 HKT 4 633 0.05 0.04 0.01 84 | 08:07:59 HKT 4 633 0.05 0.04 0.01 85 | 08:08:00 HKT 6 633 0.04 0.04 0.01 86 | 08:08:01 HKT 5 633 0.04 0.04 0.01 87 | 08:08:02 HKT 2 633 0.04 0.04 0.01 88 | 08:08:03 HKT 3 633 0.04 0.04 0.01 89 | 08:08:04 HKT 3 633 0.04 0.04 0.01 90 | 08:08:05 HKT 2 633 0.04 0.04 0.01 91 | 08:08:06 HKT 3 633 0.04 0.04 0.01 92 | 08:08:07 HKT 4 633 0.04 0.04 0.01 93 | 08:08:08 HKT 2 633 0.04 0.04 0.01 94 | 08:08:09 HKT 2 633 0.04 0.04 0.01 95 | 08:08:10 HKT 1 633 0.04 0.04 0.01 96 | 08:08:11 HKT 2 633 0.04 0.04 0.01 97 | 08:08:12 HKT 2 633 0.04 0.04 0.01 98 | 08:08:13 HKT 1 633 0.04 0.04 0.01 99 | 08:08:14 HKT 1 633 0.04 0.04 0.01 100 | 08:08:15 HKT 1 633 0.03 0.04 0.01 101 | 08:08:16 HKT 1 633 0.03 0.04 0.01 102 | 08:08:17 HKT 1 633 0.03 0.04 0.01 103 | 08:08:18 HKT 1 633 0.03 0.04 0.01 104 | 08:08:19 HKT 2 633 0.03 0.04 0.01 105 | 08:08:20 HKT 2 633 0.03 0.04 0.01 106 | 08:08:21 HKT 2 633 0.03 0.04 0.01 107 | 08:08:22 HKT 2 633 0.03 0.04 0.01 108 | 08:08:23 HKT 7 633 0.03 0.04 0.01 109 | 08:08:24 HKT 4 633 0.03 0.04 0.01 110 | 08:08:25 HKT 2 633 0.03 0.04 0.01 111 | 08:08:26 HKT 2 633 0.03 0.04 0.01 112 | 08:08:27 HKT 1 633 0.03 0.04 0.01 113 | 08:08:28 HKT 1 633 0.03 0.04 0.01 114 | 08:08:29 HKT 0 633 0.03 0.04 0.01 115 | 08:08:30 HKT 0 633 0.03 0.04 0.01 116 | 08:08:31 HKT 0 633 0.03 0.04 0.01 117 | 08:08:32 HKT 2 633 0.03 0.04 0.01 118 | 08:08:33 HKT 0 633 0.03 0.04 0.01 119 | 08:08:34 HKT 0 633 0.03 0.04 0.01 120 | 08:08:35 HKT 0 633 0.02 0.03 0.01 121 | 08:08:36 HKT 6 633 0.02 0.03 0.01 122 | 08:08:37 HKT 1 633 0.02 0.03 0.01 123 | 08:08:38 HKT 2 623 0.02 0.03 0.01 124 | Average: 6 633 0.08 0.05 0.01 125 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_socket_201511192006-tcpsck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_socket_201511192006-tcpsck.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_socket_201511192006-totsck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_socket_201511192006-totsck.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_socket_201511192006-udpsck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JeffXue/performance-monitor/f9f7e29885c0a4a21a78664654d3abf86d03a590/sample/test-v1.0-api_performanceTest_server_socket_201511192006-udpsck.png -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_socket_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT totsck tcpsck udpsck rawsck ip-frag tcp-tw 4 | 08:06:39 HKT 579 38 6 0 0 42 5 | 08:06:40 HKT 579 38 6 0 0 42 6 | 08:06:41 HKT 579 38 6 0 0 43 7 | 08:06:42 HKT 579 38 6 0 0 43 8 | 08:06:43 HKT 579 38 6 0 0 43 9 | 08:06:44 HKT 579 38 6 0 0 43 10 | 08:06:45 HKT 579 38 6 0 0 43 11 | 08:06:46 HKT 579 38 6 0 0 42 12 | 08:06:47 HKT 579 38 6 0 0 48 13 | 08:06:48 HKT 579 38 6 0 0 48 14 | 08:06:49 HKT 579 38 6 0 0 48 15 | 08:06:50 HKT 579 38 6 0 0 48 16 | 08:06:51 HKT 579 38 6 0 0 48 17 | 08:06:52 HKT 579 38 6 0 0 48 18 | 08:06:53 HKT 579 38 6 0 0 48 19 | 08:06:54 HKT 579 38 6 0 0 43 20 | 08:06:55 HKT 579 38 6 0 0 43 21 | 08:06:56 HKT 579 38 6 0 0 43 22 | 08:06:57 HKT 579 38 6 0 0 43 23 | 08:06:58 HKT 579 38 6 0 0 43 24 | 08:06:59 HKT 579 38 6 0 0 43 25 | 08:07:00 HKT 579 38 6 0 0 43 26 | 08:07:01 HKT 579 38 6 0 0 37 27 | 08:07:02 HKT 579 38 6 0 0 38 28 | 08:07:03 HKT 579 38 6 0 0 38 29 | 08:07:04 HKT 579 38 6 0 0 38 30 | 08:07:05 HKT 579 38 6 0 0 38 31 | 08:07:06 HKT 579 38 6 0 0 38 32 | 08:07:07 HKT 579 38 6 0 0 38 33 | 08:07:08 HKT 579 38 6 0 0 38 34 | 08:07:09 HKT 579 38 6 0 0 22 35 | 08:07:10 HKT 579 38 6 0 0 22 36 | 08:07:11 HKT 579 38 6 0 0 28 37 | 08:07:12 HKT 579 38 6 0 0 28 38 | 08:07:13 HKT 579 38 6 0 0 28 39 | 08:07:14 HKT 579 38 6 0 0 28 40 | 08:07:15 HKT 579 38 6 0 0 28 41 | 08:07:16 HKT 579 38 6 0 0 27 42 | 08:07:17 HKT 579 38 6 0 0 28 43 | 08:07:18 HKT 579 38 6 0 0 28 44 | 08:07:19 HKT 579 38 6 0 0 28 45 | 08:07:20 HKT 579 38 6 0 0 28 46 | 08:07:21 HKT 579 38 6 0 0 28 47 | 08:07:22 HKT 579 38 6 0 0 33 48 | 08:07:23 HKT 579 38 6 0 0 33 49 | 08:07:24 HKT 579 38 6 0 0 21 50 | 08:07:25 HKT 579 38 6 0 0 21 51 | 08:07:26 HKT 579 38 6 0 0 22 52 | 08:07:27 HKT 579 38 6 0 0 22 53 | 08:07:28 HKT 579 38 6 0 0 22 54 | 08:07:29 HKT 579 38 6 0 0 22 55 | 08:07:30 HKT 579 38 6 0 0 27 56 | 08:07:31 HKT 579 38 6 0 0 36 57 | 08:07:32 HKT 579 38 6 0 0 37 58 | 08:07:33 HKT 579 38 6 0 0 37 59 | 08:07:34 HKT 579 38 6 0 0 37 60 | 08:07:35 HKT 579 38 6 0 0 37 61 | 08:07:36 HKT 579 38 6 0 0 37 62 | 08:07:37 HKT 579 38 6 0 0 37 63 | 08:07:38 HKT 579 38 6 0 0 37 64 | 08:07:39 HKT 579 38 6 0 0 36 65 | 08:07:40 HKT 579 38 6 0 0 36 66 | 08:07:41 HKT 579 38 6 0 0 38 67 | 08:07:42 HKT 579 38 6 0 0 38 68 | 08:07:43 HKT 579 38 6 0 0 38 69 | 08:07:44 HKT 579 38 6 0 0 38 70 | 08:07:45 HKT 579 38 6 0 0 48 71 | 08:07:46 HKT 579 38 6 0 0 42 72 | 08:07:47 HKT 579 38 6 0 0 43 73 | 08:07:48 HKT 579 38 6 0 0 43 74 | 08:07:49 HKT 579 38 6 0 0 43 75 | 08:07:50 HKT 579 38 6 0 0 43 76 | 08:07:51 HKT 579 38 6 0 0 43 77 | 08:07:52 HKT 579 38 6 0 0 43 78 | 08:07:53 HKT 579 38 6 0 0 43 79 | 08:07:54 HKT 579 38 6 0 0 43 80 | 08:07:55 HKT 579 38 6 0 0 43 81 | 08:07:56 HKT 579 38 6 0 0 43 82 | 08:07:57 HKT 579 38 6 0 0 43 83 | 08:07:58 HKT 579 38 6 0 0 43 84 | 08:07:59 HKT 579 38 6 0 0 43 85 | 08:08:00 HKT 579 38 6 0 0 43 86 | 08:08:01 HKT 579 38 6 0 0 42 87 | 08:08:02 HKT 579 38 6 0 0 48 88 | 08:08:03 HKT 579 38 6 0 0 48 89 | 08:08:04 HKT 579 38 6 0 0 48 90 | 08:08:05 HKT 579 38 6 0 0 48 91 | 08:08:06 HKT 579 38 6 0 0 48 92 | 08:08:07 HKT 579 38 6 0 0 48 93 | 08:08:08 HKT 579 38 6 0 0 48 94 | 08:08:09 HKT 579 38 6 0 0 42 95 | 08:08:10 HKT 579 38 6 0 0 42 96 | 08:08:11 HKT 579 38 6 0 0 43 97 | 08:08:12 HKT 579 38 6 0 0 43 98 | 08:08:13 HKT 579 38 6 0 0 43 99 | 08:08:14 HKT 579 38 6 0 0 43 100 | 08:08:15 HKT 579 38 6 0 0 43 101 | 08:08:16 HKT 579 38 6 0 0 37 102 | 08:08:17 HKT 579 38 6 0 0 38 103 | 08:08:18 HKT 579 38 6 0 0 38 104 | 08:08:19 HKT 579 38 6 0 0 38 105 | 08:08:20 HKT 579 38 6 0 0 38 106 | 08:08:21 HKT 579 38 6 0 0 38 107 | 08:08:22 HKT 579 38 6 0 0 38 108 | 08:08:23 HKT 579 38 6 0 0 38 109 | 08:08:24 HKT 579 38 6 0 0 22 110 | 08:08:25 HKT 579 38 6 0 0 22 111 | 08:08:26 HKT 579 38 6 0 0 28 112 | 08:08:27 HKT 579 38 6 0 0 28 113 | 08:08:28 HKT 579 38 6 0 0 28 114 | 08:08:29 HKT 579 38 6 0 0 28 115 | 08:08:30 HKT 579 38 6 0 0 28 116 | 08:08:31 HKT 579 38 6 0 0 27 117 | 08:08:32 HKT 579 38 6 0 0 28 118 | 08:08:33 HKT 579 38 6 0 0 28 119 | 08:08:34 HKT 579 38 6 0 0 28 120 | 08:08:35 HKT 579 38 6 0 0 28 121 | 08:08:36 HKT 573 38 6 0 0 33 122 | 08:08:37 HKT 579 38 6 0 0 33 123 | 08:08:38 HKT 579 38 6 0 0 33 124 | Average: 579 38 6 0 0 37 125 | -------------------------------------------------------------------------------- /sample/test-v1.0-api_performanceTest_server_swapping_201511192006.txt: -------------------------------------------------------------------------------- 1 | Linux 2.6.32-5-amd64 (performanceTest) Thursday, November 19, 2015 _x86_64_ (2 CPU) 2 | 3 | 08:06:38 HKT pswpin/s pswpout/s 4 | 08:06:39 HKT 0.00 0.00 5 | 08:06:40 HKT 0.00 0.00 6 | 08:06:41 HKT 0.00 0.00 7 | 08:06:42 HKT 0.00 0.00 8 | 08:06:43 HKT 0.00 0.00 9 | 08:06:44 HKT 0.00 0.00 10 | 08:06:45 HKT 0.00 0.00 11 | 08:06:46 HKT 0.00 0.00 12 | 08:06:47 HKT 0.00 0.00 13 | 08:06:48 HKT 0.00 0.00 14 | 08:06:49 HKT 0.00 0.00 15 | 08:06:50 HKT 0.00 0.00 16 | 08:06:51 HKT 0.00 0.00 17 | 08:06:52 HKT 0.00 0.00 18 | 08:06:53 HKT 0.00 0.00 19 | 08:06:54 HKT 0.00 0.00 20 | 08:06:55 HKT 0.00 0.00 21 | 08:06:56 HKT 0.00 0.00 22 | 08:06:57 HKT 0.00 0.00 23 | 08:06:58 HKT 0.00 0.00 24 | 08:06:59 HKT 0.00 0.00 25 | 08:07:00 HKT 0.00 0.00 26 | 08:07:01 HKT 0.00 0.00 27 | 08:07:02 HKT 0.00 0.00 28 | 08:07:03 HKT 0.00 0.00 29 | 08:07:04 HKT 0.00 0.00 30 | 08:07:05 HKT 0.00 0.00 31 | 08:07:06 HKT 0.00 0.00 32 | 08:07:07 HKT 0.00 0.00 33 | 08:07:08 HKT 0.00 0.00 34 | 08:07:09 HKT 0.00 0.00 35 | 08:07:10 HKT 0.00 0.00 36 | 08:07:11 HKT 0.00 0.00 37 | 08:07:12 HKT 0.00 0.00 38 | 08:07:13 HKT 0.00 0.00 39 | 08:07:14 HKT 0.00 0.00 40 | 08:07:15 HKT 0.00 0.00 41 | 08:07:16 HKT 0.00 0.00 42 | 08:07:17 HKT 0.00 0.00 43 | 08:07:18 HKT 0.00 0.00 44 | 08:07:19 HKT 0.00 0.00 45 | 08:07:20 HKT 0.00 0.00 46 | 08:07:21 HKT 0.00 0.00 47 | 08:07:22 HKT 0.00 0.00 48 | 08:07:23 HKT 0.00 0.00 49 | 08:07:24 HKT 0.00 0.00 50 | 08:07:25 HKT 0.00 0.00 51 | 08:07:26 HKT 0.00 0.00 52 | 08:07:27 HKT 0.00 0.00 53 | 08:07:28 HKT 0.00 0.00 54 | 08:07:29 HKT 0.00 0.00 55 | 08:07:30 HKT 0.00 0.00 56 | 08:07:31 HKT 0.00 0.00 57 | 08:07:32 HKT 0.00 0.00 58 | 08:07:33 HKT 0.00 0.00 59 | 08:07:34 HKT 0.00 0.00 60 | 08:07:35 HKT 0.00 0.00 61 | 08:07:36 HKT 0.00 0.00 62 | 08:07:37 HKT 0.00 0.00 63 | 08:07:38 HKT 0.00 0.00 64 | 08:07:39 HKT 0.00 0.00 65 | 08:07:40 HKT 0.00 0.00 66 | 08:07:41 HKT 0.00 0.00 67 | 08:07:42 HKT 0.00 0.00 68 | 08:07:43 HKT 0.00 0.00 69 | 08:07:44 HKT 0.00 0.00 70 | 08:07:45 HKT 0.00 0.00 71 | 08:07:46 HKT 0.00 0.00 72 | 08:07:47 HKT 0.00 0.00 73 | 08:07:48 HKT 0.00 0.00 74 | 08:07:49 HKT 0.00 0.00 75 | 08:07:50 HKT 0.00 0.00 76 | 08:07:51 HKT 0.00 0.00 77 | 08:07:52 HKT 0.00 0.00 78 | 08:07:53 HKT 0.00 0.00 79 | 08:07:54 HKT 0.00 0.00 80 | 08:07:55 HKT 0.00 0.00 81 | 08:07:56 HKT 0.00 0.00 82 | 08:07:57 HKT 0.00 0.00 83 | 08:07:58 HKT 0.00 0.00 84 | 08:07:59 HKT 0.00 0.00 85 | 08:08:00 HKT 0.00 0.00 86 | 08:08:01 HKT 0.00 0.00 87 | 08:08:02 HKT 0.00 0.00 88 | 08:08:03 HKT 0.00 0.00 89 | 08:08:04 HKT 0.00 0.00 90 | 08:08:05 HKT 0.00 0.00 91 | 08:08:06 HKT 0.00 0.00 92 | 08:08:07 HKT 0.00 0.00 93 | 08:08:08 HKT 0.00 0.00 94 | 08:08:09 HKT 0.00 0.00 95 | 08:08:10 HKT 0.00 0.00 96 | 08:08:11 HKT 0.00 0.00 97 | 08:08:12 HKT 0.00 0.00 98 | 08:08:13 HKT 0.00 0.00 99 | 08:08:14 HKT 0.00 0.00 100 | 08:08:15 HKT 0.00 0.00 101 | 08:08:16 HKT 0.00 0.00 102 | 08:08:17 HKT 0.00 0.00 103 | 08:08:18 HKT 0.00 0.00 104 | 08:08:19 HKT 0.00 0.00 105 | 08:08:20 HKT 0.00 0.00 106 | 08:08:21 HKT 0.00 0.00 107 | 08:08:22 HKT 0.00 0.00 108 | 08:08:23 HKT 0.00 0.00 109 | 08:08:24 HKT 0.00 0.00 110 | 08:08:25 HKT 0.00 0.00 111 | 08:08:26 HKT 0.00 0.00 112 | 08:08:27 HKT 0.00 0.00 113 | 08:08:28 HKT 0.00 0.00 114 | 08:08:29 HKT 0.00 0.00 115 | 08:08:30 HKT 0.00 0.00 116 | 08:08:31 HKT 0.00 0.00 117 | 08:08:32 HKT 0.00 0.00 118 | 08:08:33 HKT 0.00 0.00 119 | 08:08:34 HKT 0.00 0.00 120 | 08:08:35 HKT 0.00 0.00 121 | 08:08:36 HKT 0.00 0.00 122 | 08:08:37 HKT 0.00 0.00 123 | 08:08:38 HKT 0.00 0.00 124 | Average: 0.00 0.00 125 | --------------------------------------------------------------------------------