Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
6f1b4e87
C
cat
项目概览
梦中观雨
/
cat
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6f1b4e87
编写于
9月 06, 2012
作者:
Y
Yiming Liu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
ssh://192.168.8.22:58422/cat
上级
69cd436e
954f68a4
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
80 addition
and
140 deletion
+80
-140
bee-engine/pom.xml
bee-engine/pom.xml
+1
-1
cat-consumer/pom.xml
cat-consumer/pom.xml
+16
-104
cat-core/pom.xml
cat-core/pom.xml
+1
-1
cat-core/src/main/java/com/dianping/cat/configuration/ClientConfigManager.java
...a/com/dianping/cat/configuration/ClientConfigManager.java
+12
-5
cat-core/src/main/java/com/dianping/cat/status/StatusInfoCollector.java
...ain/java/com/dianping/cat/status/StatusInfoCollector.java
+18
-3
cat-core/src/main/java/com/dianping/cat/status/StatusUpdateTask.java
...c/main/java/com/dianping/cat/status/StatusUpdateTask.java
+21
-18
cat-core/src/main/resources/META-INF/dal/model/client-codegen.xml
.../src/main/resources/META-INF/dal/model/client-codegen.xml
+1
-0
cat-core/src/main/resources/com/dianping/cat/configuration/client/config.xsd
...esources/com/dianping/cat/configuration/client/config.xsd
+1
-0
cat-data/pom.xml
cat-data/pom.xml
+1
-1
cat-hadoop/pom.xml
cat-hadoop/pom.xml
+1
-1
cat-home/pom.xml
cat-home/pom.xml
+1
-1
cat-home/src/main/webapp/jsp/report/home.jsp
cat-home/src/main/webapp/jsp/report/home.jsp
+1
-0
cat-job/pom.xml
cat-job/pom.xml
+1
-1
cat-notify/pom.xml
cat-notify/pom.xml
+1
-1
dog-gateway/pom.xml
dog-gateway/pom.xml
+1
-1
dog-home/pom.xml
dog-home/pom.xml
+1
-1
pom.xml
pom.xml
+1
-1
未找到文件。
bee-engine/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.dianping.bee
</groupId>
...
...
cat-consumer/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-consumer
</artifactId>
...
...
@@ -30,116 +30,28 @@
<plugin>
<groupId>
org.unidal.maven.plugins
</groupId>
<artifactId>
codegen-maven-plugin
</artifactId>
<version>
1.1.
5
</version>
<version>
1.1.
6
</version>
<executions>
<execution>
<id>
generate
database report model
</id>
<id>
generate
report models
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/database-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate sql report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/sql-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate month report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/month-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate common report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/common-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate cross report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/cross-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate matrix report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/matrix-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate heartbeat report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/heartbeat-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate problem report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/problem-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate transaction report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/transaction-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate event report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/event-report-manifest.xml
</manifest>
</configuration>
</execution>
<execution>
<id>
generate IP report model
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
dal-model
</goal>
</goals>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/ip-report-manifest.xml
</manifest>
<manifest>
${basedir}/src/main/resources/META-INF/dal/model/database-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/sql-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/month-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/common-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/cross-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/matrix-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/heartbeat-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/problem-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/transaction-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/event-report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/model/ip-report-manifest.xml,
</manifest>
</configuration>
</execution>
<execution>
...
...
cat-core/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-core
</artifactId>
...
...
cat-core/src/main/java/com/dianping/cat/configuration/ClientConfigManager.java
浏览文件 @
6f1b4e87
...
...
@@ -36,6 +36,10 @@ public class ClientConfigManager implements LogEnabled {
}
}
public
ClientConfig
getClientConfig
()
{
return
m_config
;
}
public
Domain
getFirstDomain
()
{
if
(
m_config
==
null
)
{
return
new
Domain
(
"UNKNOWN"
).
setEnabled
(
false
);
...
...
@@ -54,10 +58,6 @@ public class ClientConfigManager implements LogEnabled {
return
m_config
.
getServers
();
}
}
public
ClientConfig
getClientConfig
(){
return
m_config
;
}
public
void
initialize
(
File
configFile
)
throws
Exception
{
ClientConfig
globalConfig
=
null
;
...
...
@@ -117,8 +117,15 @@ public class ClientConfigManager implements LogEnabled {
}
}
public
boolean
isDumpLocked
()
{
if
(
m_config
==
null
)
{
return
false
;
}
else
{
return
m_config
.
isDumpLocked
();
}
}
public
boolean
isInitialized
()
{
return
m_config
!=
null
;
}
}
cat-core/src/main/java/com/dianping/cat/status/StatusInfoCollector.java
浏览文件 @
6f1b4e87
...
...
@@ -27,6 +27,8 @@ import com.dianping.cat.status.model.transform.BaseVisitor;
class
StatusInfoCollector
extends
BaseVisitor
{
private
MessageStatistics
m_statistics
;
private
boolean
m_dumpLocked
;
public
StatusInfoCollector
(
MessageStatistics
statistics
)
{
m_statistics
=
statistics
;
}
...
...
@@ -94,6 +96,11 @@ class StatusInfoCollector extends BaseVisitor {
return
isInstanceOfInterface
(
clazz
.
getSuperclass
(),
interfaceName
);
}
public
StatusInfoCollector
setDumpLocked
(
boolean
dumpLocked
)
{
m_dumpLocked
=
dumpLocked
;
return
this
;
}
@Override
public
void
visitDisk
(
DiskInfo
disk
)
{
File
[]
roots
=
File
.
listRoots
();
...
...
@@ -205,15 +212,23 @@ class StatusInfoCollector extends BaseVisitor {
@Override
public
void
visitThread
(
ThreadsInfo
thread
)
{
ThreadMXBean
bean
=
ManagementFactory
.
getThreadMXBean
();
ThreadInfo
[]
threads
=
bean
.
dumpAllThreads
(
true
,
true
);
bean
.
setThreadContentionMonitoringEnabled
(
true
);
ThreadInfo
[]
threads
;
if
(
m_dumpLocked
)
{
threads
=
bean
.
dumpAllThreads
(
true
,
true
);
}
else
{
threads
=
bean
.
dumpAllThreads
(
false
,
false
);
}
thread
.
setCount
(
bean
.
getThreadCount
());
thread
.
setDaemonCount
(
bean
.
getDaemonThreadCount
());
thread
.
setPeekCount
(
bean
.
getPeakThreadCount
());
thread
.
setTotalStartedCount
((
int
)
bean
.
getTotalStartedThreadCount
());
thread
.
setCatThreadCount
(
countThreadsByPrefix
(
threads
,
"Cat-"
));
thread
.
setPigeonThreadCount
(
countThreadsByPrefix
(
threads
,
"Pigeon-"
,
"DPSF-"
,
"Netty-"
,
"Client-ResponseProcessor"
));
thread
.
setPigeonThreadCount
(
countThreadsByPrefix
(
threads
,
"Pigeon-"
,
"DPSF-"
,
"Netty-"
,
"Client-ResponseProcessor"
));
int
jbossThreadsCount
=
countThreadsByPrefix
(
threads
,
"http-"
);
int
jettyThreadsCount
=
countThreadsBySubstring
(
threads
,
"@qtp"
);
...
...
cat-core/src/main/java/com/dianping/cat/status/StatusUpdateTask.java
浏览文件 @
6f1b4e87
...
...
@@ -21,7 +21,7 @@ import com.site.lookup.annotation.Inject;
public
class
StatusUpdateTask
implements
Task
,
Initializable
{
@Inject
private
MessageStatistics
m_statistics
;
@Inject
private
ClientConfigManager
m_manager
;
...
...
@@ -69,23 +69,26 @@ public class StatusUpdateTask implements Task, Initializable {
while
(
m_active
)
{
long
start
=
MilliSecondTimer
.
currentTimeMillis
();
if
(
m_manager
.
isCatEnabled
())
{
Transaction
t
=
cat
.
newTransaction
(
"System"
,
"Status"
);
Heartbeat
h
=
cat
.
newHeartbeat
(
"Heartbeat"
,
m_ipAddress
);
StatusInfo
status
=
new
StatusInfo
();
try
{
status
.
accept
(
new
StatusInfoCollector
(
m_statistics
));
h
.
addData
(
status
.
toString
());
h
.
setStatus
(
Message
.
SUCCESS
);
}
catch
(
Throwable
e
)
{
h
.
setStatus
(
e
);
cat
.
logError
(
e
);
}
finally
{
h
.
complete
();
}
t
.
setStatus
(
Message
.
SUCCESS
);
t
.
complete
();
}
Transaction
t
=
cat
.
newTransaction
(
"System"
,
"Status"
);
Heartbeat
h
=
cat
.
newHeartbeat
(
"Heartbeat"
,
m_ipAddress
);
StatusInfo
status
=
new
StatusInfo
();
t
.
addData
(
"dumpLocked"
,
m_manager
.
isDumpLocked
());
try
{
status
.
accept
(
new
StatusInfoCollector
(
m_statistics
).
setDumpLocked
(
m_manager
.
isDumpLocked
()));
h
.
addData
(
status
.
toString
());
h
.
setStatus
(
Message
.
SUCCESS
);
}
catch
(
Throwable
e
)
{
h
.
setStatus
(
e
);
cat
.
logError
(
e
);
}
finally
{
h
.
complete
();
}
t
.
setStatus
(
Message
.
SUCCESS
);
t
.
complete
();
}
long
elapsed
=
MilliSecondTimer
.
currentTimeMillis
()
-
start
;
if
(
elapsed
<
m_interval
)
{
...
...
cat-core/src/main/resources/META-INF/dal/model/client-codegen.xml
浏览文件 @
6f1b4e87
...
...
@@ -3,6 +3,7 @@
<entity
name=
"config"
root=
"true"
>
<attribute
name=
"mode"
value-type=
"String"
/>
<attribute
name=
"enabled"
value-type=
"boolean"
/>
<attribute
name=
"dump-locked"
value-type=
"boolean"
/>
<entity-ref
name=
"server"
type=
"list"
names=
"servers"
xml-indent=
"true"
/>
<entity-ref
name=
"domain"
type=
"list"
names=
"domains"
/>
<entity-ref
name=
"bind"
/>
...
...
cat-core/src/main/resources/com/dianping/cat/configuration/client/config.xsd
浏览文件 @
6f1b4e87
...
...
@@ -23,6 +23,7 @@
</xs:sequence>
<xs:attribute
name=
"mode"
type=
"xs:string"
use=
"required"
/>
<xs:attribute
name=
"enabled"
type=
"xs:boolean"
default=
"true"
/>
<xs:attribute
name=
"dump-locked"
type=
"xs:boolean"
/>
<xs:anyAttribute
processContents=
"lax"
/>
</xs:complexType>
<xs:complexType
name=
"ServerType"
>
...
...
cat-data/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-data
</artifactId>
...
...
cat-hadoop/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-hadoop
</artifactId>
...
...
cat-home/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-home
</artifactId>
...
...
cat-home/src/main/webapp/jsp/report/home.jsp
浏览文件 @
6f1b4e87
...
...
@@ -26,6 +26,7 @@ Welcome to <b>Central Application Tracking (CAT)</b>.
<br>
<table
class=
'version'
>
<tr
class=
"odd"
><td>
版本
</td><td>
说明
</td><td>
发布时间
</td></tr>
<tr
class=
"even"
><td>
0.4.1
</td><td>
1、默认禁止心跳线程获取线程锁信息,以降低对业务线程的影响。
</td><td>
2012-09-06
</td></tr>
<tr
class=
"even"
><td>
0.4.0
</td><td>
1、支持开关动态关闭。2、支持分布式Logview的查看(关联pigeon的call)。
</td><td>
2012-08-20
</td></tr>
<tr
class=
"odd"
><td>
0.3.4
</td><td>
1、规范了CAT客户端的日志。2、规范了后台模块的加载顺序。3、统一服务端配置存取。4、新增心跳报表的Http线程
</td><td>
2012-07-25
</td></tr>
<tr
class=
"even"
><td>
0.3.3
</td><td>
1、修改CAT线程为后台Dameon线程。2、减少CAT的日志输出。3、修复了极端情况客户端丢失部分消息。4、支持CAT的延迟加载。5、修复了0.3.2一个getLog的bug
</td><td>
2012-07-17
</td></tr>
...
...
cat-job/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-job
</artifactId>
...
...
cat-notify/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<inceptionYear>
2012
</inceptionYear>
...
...
dog-gateway/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
dog-gateway
</artifactId>
...
...
dog-home/pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
dog-home
</artifactId>
...
...
pom.xml
浏览文件 @
6f1b4e87
...
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.4.
1
</version>
<version>
0.4.
2
</version>
<name>
arch-cat
</name>
<description>
Central Application Tracking
</description>
<packaging>
pom
</packaging>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录