Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5bf6ef7

Browse files
author
Martin
committed
commit message
0 parents  commit5bf6ef7

File tree

380 files changed

+23825
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+23825
-0
lines changed

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.csslinguist-language=java

‎.gitignore‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Example user template template
3+
### Example user template
4+
5+
# IntelliJ project files
6+
.idea
7+
*.iml
8+
out
9+
gen
10+
target

‎JavaMonitor/README.md‎

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
#Java应用性能监控系统 - 单机版(JM)
2+
3+
##1.简介
4+
5+
JM(Java应用监控系统)是基于Java8制作而成的一款在线监控系统。
6+
7+
JM适用于监控所有Java应用,具有堆内存监控、方法区监控、GC监控、类加载监控、类编译监控与线程监控等,提供堆快照下载,线程快照下载等功能。
8+
9+
JM的使用非常简单,只需要把它扔在你的服务器上执行即可,它会立即检测当前机器上的所有Java应用并进行监控。
10+
11+
JM使用webSocket建立客户端与服务端通信,大大降低了客户端流量与服务器负载。
12+
13+
##2.环境
14+
15+
基于Java8开发,低于Java8不支持,无Java环境变量或Java环境变量冲突不支持。
16+
17+
##3.使用
18+
19+
打包为Jar包直接执行即可
20+
21+
```
22+
java -jar java_monitor-0.0.x-SNAPSHOT.jar
23+
```
24+
25+
26+
启动成功后默认访问端口8888
27+
28+
##4.运行界面
29+
30+
![](./picture/1000.png)
31+
32+
![](./picture/1001.png)
33+
34+
![](./picture/1002.png)
35+
36+
![](./picture/1003.png)
37+
38+
![](./picture/1004.png)
39+
40+
##5.自定义应用端口
41+
42+
在执行jar包时追加参数
43+
44+
```
45+
--server.port=9999
46+
```
47+
48+
##6.自定义监控周期
49+
50+
默认监控频率为60秒,并且只记录当天产生的监控数据。
51+
52+
如果需要自定义监控频率与监控时长,只需要在jar包所在目录下新建application.properties文件,修改下列字段即可
53+
54+
```
55+
monitor.rate=60 #监控频率/秒
56+
monitor.cron=0 0 0 * * ? #每日的0:00:00时刻清空数据
57+
```
58+
59+
连续监控1个月,示例
60+
61+
```
62+
monitor.cron=0 0 0 1 * ?
63+
```
64+
65+
连续监控1年,示例
66+
67+
```
68+
monitor.cron=0 0 0 1 1 ? *
69+
```
70+
71+
不新建文件,使用追加参数的方法也是可以的。
72+
73+
##7.使用MySQL
74+
75+
JM内嵌H2数据库,有诸多限制,不过JM提供MySQL数据库的支持。
76+
77+
使用方法很简单,新建application.properties文本文件放在jar包目录下,修改下列参数即可。
78+
79+
```
80+
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
81+
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false
82+
spring.datasource.username=root
83+
spring.datasource.password=123456
84+
spring.jpa.hibernate.ddl-auto=update
85+
```
86+
87+
##7.监控参数
88+
89+
监控参数的含义如下:
90+
91+
- S0C:s0(from)的大小
92+
93+
- S1C:s1(from)的大小
94+
95+
- S0U:s0(from)已使用的空间
96+
97+
- S1U:s1(from)已经使用的空间
98+
99+
- EC:eden区的大小
100+
101+
- EU:eden区已经使用的空间
102+
103+
- OC:老年代大小
104+
105+
- OU:老年代已经使用的空间
106+
107+
- MC:元空间的大小(Metaspace)
108+
109+
- MU:元空间已使用大小
110+
111+
- CCSC:压缩类空间大小(compressed class space)
112+
113+
- CCSU:压缩类空间已使用大小
114+
115+
- YGC:新生代gc次数
116+
117+
- YGCT:新生代gc耗时
118+
119+
- FGC:Full gc次数
120+
121+
- FGCT:Full gc耗时
122+
123+
- GCT:gc总耗时
124+
125+
- Loaded:表示载入了类的数量
126+
127+
- Unloaded:表示卸载类的数量
128+
129+
- Compiled:表示编译任务执行的次数
130+
131+
- Failed:表示编译失败的次数
132+
133+
- Total:线程总数
134+
135+
- Runnable:正在运行的线程数
136+
137+
- Sleeping:休眠的线程数
138+
139+
- Waiting:等待的线程数
140+
141+
##8.技术栈
142+
143+
| Maven| layui|
144+
| ---------------------| ---------------|
145+
| Spring Boot 2.0| Spring data jpa|
146+
| spring boot websocket| H2 (DataBase)|
147+
| Quartz| lombok|
148+
| Thymeleaf| ECharts 3|
149+
150+
##9.更新日志
151+
152+
2018-11-14:
153+
154+
- 正式发布
155+
156+
2018-11-15:
157+
158+
- 新增堆快照、线程快照下载
159+
160+
- 修复下载堆快照找不到文件的bug
161+
162+
- 数据库文件转储至~/wyDataBase/目录下,Linux为~目录下,Windows目录为C:\Users\Administrator
163+
164+
- 解决socket客户端连接bug
165+
166+
- 重构客户端页面
167+
168+
2018-11-16:
169+
170+
- 新增类加载大小监控
171+
172+
- 新增设置客户端通信频率
173+
174+
2018-11-27:
175+
- 0.0.5及以后数据库文件转储至~/JMDataBase/目录下
176+
177+
2018-12-1:
178+
- 0.0.6及以后支持MySQL数据库的扩展
179+
180+
2018-12-30:
181+
- 0.0.7版本精简发布,若报错请检验java环境变量

‎JavaMonitor/picture/1000.png‎

39.8 KB
Loading

‎JavaMonitor/picture/1001.png‎

72.4 KB
Loading

‎JavaMonitor/picture/1002.png‎

50.9 KB
Loading

‎JavaMonitor/picture/1003.png‎

50 KB
Loading

‎JavaMonitor/picture/1004.png‎

61.5 KB
Loading
9.82 KB
Loading

‎JavaMonitor/picture/logo.png‎

12 KB
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp