当前位置:网站首页>数据的收集
数据的收集
2022-06-12 14:18:00 【小小微的博客】
性能测试数据收集:
CPU、memory数据:
使用Linux自带的top命令收集即可,详细用法如下
每5秒刷新一次,更新2次:top –d 5 -n 2 –b > toplog.txt
top -b > $(date -d "today" +"%Y%m%d_%H%M%S").txt
网卡利用率查看,使用nicstat工具收集数据,nicstat工具非Linux自带,需独立安装。
安装方式如:https://blog.csdn.net/lxw198902165221/article/details/100540005
使用命令如下
nicstat.sh -i eth0 1
nmon工具,nmon可以收集cpu、磁盘IO、memory等多个数据,nmon也需要单独安装
nmon安装完成后,直接在Linux执行nmon,即可看到nmon的信息,如下图

使用命令如下, -f 表示生成的数据文件名中有时间; -s 10 表示每 10 秒采集一次数据;-c 6表示采集 6次,10*6=60 秒,
也就是一共收集了一分钟的数据
nmon -f -s 10 -c 6收集数据,收集后在当前目录下生成一个nmon格式的文件,如下图

收集到的数据使用nmon analyser v33g.xls去打开,即可生成各个数据的图型文件
![]()
打开后的文件如下图所示

GC数据:通过JDK自带的工具jstat收集,
jstat详细用法参考:
http://blog.csdn.net/zhaozheng7758/article/details/8623549
GC收集到的数据的详细解释参考:
http://www.cnblogs.com/qmfsun/p/5601734.html
简单用法如下:每1S显示一次进程号为1655的GC情况,一共显示5次,如不指定次数则持续收集
jstat -gcutil 1655 1s 5
分析内存占用
生成heap dump文件的方法:使用jdk的jmap命令,在运行中的JVM生成Dump文件,命令如下:
jmap -dump:format=b,file=/path/heap.bin 进程ID
![]()
使用eclipse的插件MAT打开前面二进制文件,
MAT详细的安装方法和使用方法如下
http://lxw198902165221.blog.163.com/blog/static/258950022201711623830721
打开后文件内容的详细分析方法如下:
http://www.cnblogs.com/AloneSword/p/3821569.html
Javacore信息收集和分析
使用kill -3 pid,即可主动生成Javacore日志文件
使用IBM Thread and Monitor Dump Analyzer for Java进行分析
下载工具对应的jar文件,直接在jar文件所在目录执行如下命令即可启动该工具
java -jar jca456.jar
启动后的界面如下图

用此工具打开Javacore分析出来的文件,效果如下图所示

右键选择相应的文件列表即可查看相应的详细信息

来自 <http://lxw198902165221.blog.163.com/blog/static/2589500222017116103712108/>
边栏推荐
- Socket model of punctual atom stm32f429 core board
- 我愿称之为史上最全的深度学习面经总结(附答案详解)
- Solve the problem that IEEE latex template cannot display Chinese
- 工业机械臂(机器人)视觉定位引导系统
- Easygui query the company name in the document
- Machine learning learning notes
- Common DOS commands
- Player actual combat 16 xdecode class
- Word insert picture blocked by text
- Player practice 19 xaudio turn on audio
猜你喜欢

In C language, the main function calls another function, which is understood by assembly code

Redis核心配置和高级数据类型

C语言中主函数调用另外一个函数,汇编代码理解

Program analysis and Optimization - 6 loop optimization

工业机械臂(机器人)视觉定位引导系统

Player practice 11 audio resampling

Llvm pass-- virtual function protection

Pay attention to click and pursue more users to enter the website. What bidding strategy can you choose?

程序分析与优化 - 6 循环优化

Huawei equipment is configured with H virtual private network
随机推荐
高考回忆录
Player actual combat 25 unpacking module add close
Array one
Lua callinfo structure, stkid structure resolution
Appnium (I) basic use of appnium
Recursive summary of learning function
Introduction to functions (inline functions and function overloading)
华为设备配置BGP AS号替换
Player actual combat 21 audio and video synchronization
In C language, the main function calls another function, which is understood by assembly code
你敢信?开发一个管理系统我只用了两天
Player actual combat 13 create qtopengl project to promote window control and reload qoopenglwedge
Tcp/ip network communication knowledge record
How to use Android studio to create an Alibaba cloud Internet of things app
QT multi thread drawing and real-time refreshing method
[OCR] aspriseocr C # English, number recognition (not Chinese)
C magic skill Chapter 4 (detailed explanation of memory function)
C secret script Chapter 3 (detailed explanation of string function) (Section 1)
Lua tvalue structure
Sizeof calculation space size summary