u**********e 发帖数: 282 | 1 向老板推荐用JMX, 他让我justify一下为什么用它。
我知道它很流行 (所以想用它,也算掌握一门技能),但说不清楚它powerful在什么地
方。
比如我有一个比较大的 web application, 如果我把它所包含的几个service改写成
MBean, JMX 所能monitor到的部分似乎只限于MBean们所暴露的界面。 大部分
application运行并监控不到。
想请有经验的朋友谈谈它如何powerful, 我该如何说服老板。
谢谢 |
|
p***p 发帖数: 559 | 2 谢谢回答,意思是不应该是在APP里面搜集情况,而是编写搜集系统信息的MBean?
我开始想是写个Mbean不断统计流量。 |
|
c******n 发帖数: 4965 | 3 I tried to listen to notifications from all mbeans ,
by calling
mbsc.addNotificationListener(new ObjectName("*:*")......)
but at run time it gave me an error:
>>> Perform operations on Hello MBean <<<
Add notification listener...
Exception in thread "main" javax.management.InstanceNotFoundException:
*:type=Hello
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMB
eanServerInterceptor.java:1094)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getClassLoade... 阅读全帖 |
|
e*****0 发帖数: 82 | 4 Senior Engineer - Performance Development
Responsibilities:
Monitor and respond to trends in production performance before they become
a problem
Work with our development teams to design and tune their products for
optimal performance and scalability
Work with our operations staff to triage and resolve production performance
issues
Monitor database performance and usage, optimizing both queries and the
code that generates them
Required Skills:
-7+ years of solid practical experience in the tunin... 阅读全帖 |
|
Q********3 发帖数: 143 | 5 非大牛
jprofiler, jconsole可以
JNI可能造成泄露,强引用无用的对象会造成内存浪费
OOM一般分为两大类
一是heap OOM,
1.用jprofiler看是那些对象占用了大部分内存,然后分析这些地方是否可以优化
2.调整jvm的内存参数Xms,Xmx
二是permgen space OOM
调整jvm参数,permsize 和maxpermsize
监视内存使用情况可以用MBean,很多大公司都有一套系统去监控CPU,内存,硬盘使用
情况 |
|
|
|
u**********e 发帖数: 282 | 8 实际上我们的SERVER 并不是distributed 的。 是在一台HOST上。
我主要是考虑对software development 有好处。 比如目前QA发现bug后, 我们只能通
过log file 诊断。 若不行,就得在自己的developer environment 里重复,很麻烦。
况且QA用的是large scale environment, 有时死活重复不出来。
还有一般客户出了问题, 我们往往要远程登陆到客户机子上搜来找去。
我想JMX是不是可以用来更快更好的发现问题。
you
我是指如果软件很大,SERVICE很复杂, 好像很难用单一MBean service界面就把各个
component的状态都抓过来monitoring。
你也用vmware? 也算我们公司产品:) |
|
r**o 发帖数: 481 | 9 A bit more complicated, e.g. the server just hang up there ( of course, we
can kill -9 always ), we don't know when and why the server hung, not to
say to identify which code/application made that happen.
I see the jmx statistics and info mbeans, but they are not enough to provide
information pin down the error... we are desperate for some real tool here. |
|
g*****g 发帖数: 34805 | 10 I have a program which is an email server, we want to embed a web console
and do configuration on the fly.
I can use an embeded jetty as web server. Now between email server and web
console, how can I do communication?
For example, I finish configuration in web console, new configuration data
available in database, how do I inform the the email server to pick up the
configuration?
MBean? Appreicate it if someone can tell me how to communite with
an embeded jetty. |
|
A**o 发帖数: 1550 | 11 if you are in a hurry, just have the email server
scan for config update every minute.
then, you have test other solutions maybe mbeans. |
|
m******t 发帖数: 2416 | 12
I thought the whole point of you _embedding_ jetty
was to have it running in the same jvm as the email server.
So looks to me like you just need to wrap the email server
config api in mbeans, and deploy them into jetty, which just
needs to host a jmx console.
Another idea that might sound crazy but I think actually
would work is sending the config changes to the email
server in, well, emails. The sender can just digitally
sign the email for authentication. The email can further
have a special |
|
p***p 发帖数: 559 | 13 用户要求是能够监视Jboss里面一个应用的
service load peak
sevice load averge
service alarm
请问是不是要开发MBean?有什么经验可以分享么。另外如何算load peak呢,每一秒钟
算一下? |
|
t*******e 发帖数: 684 | 14 Try connecting JConsole with JBoss, there might be existing runtime mbeans
meeting your needs. |
|
c******n 发帖数: 4965 | 15 many java applications are written as JMX MBeans
but EC2 presents many problems for JMX
1) normally you have only port 22 open, changing security group is a hassle
if you are just debugging for one shot.
2) the second port used by JMX is determined dynamically, so you don't know
which port to open
3) JMX is going to figure out the *internal* ip of EC2 and let your JMX
client to connect to RMI on that IP, which can not be reached.
so to solve these
1) use ssh tunnel, + iptables on client
2) http:... 阅读全帖 |
|
g*****g 发帖数: 34805 | 16 Actually iterating over methods and find the desired ones is being used too.
e.g.
MBean. In JMX client, getXXX are treated as attributes and all other
functions
are treated as operations.
after |
|
z****e 发帖数: 54598 | 17 胶水是把数据从a拿出来,交给b去处理
java是把数据从a拿出来,自己处理完,交给b
最核心的部分都应该由java来做,越复杂越应该交给java做
而胶水则相反,最核心的部分都不应该交给脚本去做
越复杂越 不 应该交给脚本去做
ejb当初发明的时候,就是打算弱化各个层面的逻辑处理
包括web和db,取代store proc这些痛苦的东西,store proc.就是脚本写的逻辑处理
巨繁琐,legacy code这些东西都很难维护
相比之下,web还算好了,wwzz它们做的就是不在php上下太多功夫
然后把逻辑剥离交给java去做,其核心思想也是弱化脚本的逻辑,强化java的逻辑
包括jsf这种东西,mbean的逻辑也是建议尽量少做,核心逻辑处理交给ejb或者spring
去做
以前struts也是如此,action只负责封装form数据,然后包装成对象,交给ejb等
service去做
spring mvc其实也差不多
三层模型,中间层其实是凭空做出来的一层,对于小项目,中间这一层其实可以不需要
但是一旦做大,中间这一层的作用就很明显 |
|
c******n 发帖数: 4965 | 18 【 以下文字转载自 Java 讨论区 】
发信人: creation (努力自由泳50m/45sec !), 信区: Java
标 题: trick to use JMX on EC2
发信站: BBS 未名空间站 (Fri Sep 16 01:46:21 2011, 美东)
many java applications are written as JMX MBeans
but EC2 presents many problems for JMX
1) normally you have only port 22 open, changing security group is a hassle
if you are just debugging for one shot.
2) the second port used by JMX is determined dynamically, so you don't know
which port to open
3) JMX is going to figure out the *internal* ip of EC2 and le... 阅读全帖 |
|
g*****g 发帖数: 34805 | 19 大点的公司,这个模块是必然有的。但通常都是专门的team写的,同时有很多第三方的
类库专门干这个,特别是显示到dashboard上。做应用开发的,基本上只需要调用写的
API就行了。或者直接实现成MBean,通过JMX来获取数据。他没写过也不奇怪。 |
|
w**z 发帖数: 8232 | 20 俺们用Ganglia +Nagios, 自己加mbean, 读jmx populate graph. |
|