Samuel Learning

  • 联系
  •  
  • 管理

文章分类(203)

  • 01 ASP/HTML(6)
  • 02 Script/CSS(16)
  • 03 C/C++
  • 04 XML(4)
  • 05 微软编程(26)
  • 06 J2EE(60)
  • 09 Linux(14)
  • 10 Database(27)
  • 11 报表打印
  • 12 打包安装(1)
  • 13 模式重构(2)
  • 14 系统架构
  • 15 敏捷开发(11)
  • 16 案例分析(30)
  • 17 Workflow(1)
  • 18 配置管理(1)
  • 19 项目管理
  • 20 英语(4)

新闻分类(52)

  • CXF学习
  • Hibernate学习(1)
  • iBatis学习(16)
  • Struts1学习(1)
  • Struts2学习(34)

.NET资源

  • adxmenu
  • C# Open Source
  • DNN Directory
  • M2Land
  • Windows Form FAQ
  • 中国DNN
  • 中国DNN联盟

Ajax

  • DoJo
  • GWT
  • JQuery
  • jquery autocomplete
  • jquery flexgrid
  • JQuery Form
  • jquery masked input
  • JQuery UI
  • jquery validation
  • Jquery 图表
  • jquery报表
  • jquery插件集合
  • Qooxdoo
  • Tibco GI
  • YUI
  • YUI-EXT
  • ZeroKode

Java开源

  • ABLE
  • Agile Tao
  • Ajax4JSF
  • Alfresco
  • AppFuse
  • Compiere
  • Equinox
  • Findbugs
  • Geronimo
  • Grails
  • Harmony
  • Hibernate论坛
  • JAG
  • Java开源大全
  • Java视线论坛
  • jBPM工作流
  • JSFTutorials
  • Nereide ERP
  • Ofbiz ERP
  • Opentaps ERP
  • operamasks
  • Petstore
  • Prototype.js
  • RIFE
  • Runa
  • SpringSide
  • Struts Menu
  • Sun Glassfish
  • Trails
  • YUI4JSF
  • 满江红

Mobile

  • Sencha

WEB资源

  • DHTML中心
  • DHTML参考手册
  • DHTML文档
  • EclipsePlugin
  • Firebug
  • GRO Clinux
  • jMaki
  • JSTL文档
  • LoadIcon
  • Openlaszlo
  • Struts Menu 展示
  • Web Test Tools
  • WebCtrs
  • Webdeveloper
  • 中国RIA开发者论坛

Workflow

  • E-Workflow
  • JBPM
  • OpenWFE
  • OSWorkflow
  • WFMC
  • Workflow Research

其他连接

  • confach
  • CPP
  • ejay
  • Giovanni
  • 丹佛
  • 交大e-learning
  • 交大研究生院
  • 可恶的猫
  • 天天@blog
  • 我的相册
  • 阿飞

大牛人

  • 32篇JBPM
  • David.Turing
  • HongSoft@业务集成
  • Joel
  • Koen Aers
  • Martinfowler
  • Raible Matt
  • Raible Wiki
  • Scott W.Ambler
  • Tom Baeyens
  • Uncle Bob
  • 一个世界在等待
  • 子在川上曰
  • 小布老师
  • 小明
  • 差沙
  • 徐昊
  • 江南白衣
  • 汪博士
  • 汪小金
  • 银狐999

开源软件

  • 2Bizbox ERP
  • CompiereCRM&ERP
  • EGW
  • Vtiger CRM
  • webERP

敏捷

  • Canoo
  • Cruisecontrol
  • DBUnit
  • EL4Ant
  • Extreme Programming
  • Fit
  • Fitnesse
  • JFrog
  • Liquibase
  • Maven
  • MockObjects
  • Selenium
  • Squish
  • xpairtise
  • XPlanner
  • XProgramming
  • 敏捷联盟

数据库

  • Oracle 中国
  • Oracle-ERP
  • Oracle在线社区

未归类

  • Aquarius Orm Studio
  • mambo建站系统
  • Oracle产品下载
  • 远程同步管理工具Capivara

经典框架

  • Apache Shale
  • formdef-struts
  • FreeMarker 主页
  • JBoss Seam
  • JSF 中心
  • JSF 入门应用
  • JSF中国
  • MyFaces官方
  • Spring 社区
  • Spring专业网站
  • Spring中文论坛
  • Spring参考手册
  • Spring官方网站
  • strecks-struts
  • Struts1
  • Struts2
  • Struts-layout
  • StrutsWiKi
  • Tapestry WIKI
  • Tapestry 官方
  • Tapestry4开发指南
  • Tapestry中文文档
  • Webwork2文档
  • Wicket

网络教程

  • Laliluna
  • RoseIndia
  • Sang Shin
  • Visualbuilder

著名站点

  • Buildix
  • Dev2Dev
  • IBM dev中国
  • InfoQ
  • ITPub
  • Java Eye
  • Java Research
  • JavaRead
  • JavaWorldTW
  • Matrix
  • PHP100
  • PHPX
  • SpringSideWiKi
  • TheServerSide
  • TWPHP
  • 中国工作流论坛

项目管理

  • 管理人网

最新评论

View Post

Understanding PermGen errors (part2)

Understanding PermGen errors (part2)

The image verification code you entered is incorrect.
Submitted by alessandroribeiro on Thu, 2006-06-08 01:24. Java

Let's continue, where we stopped in my last post: How can I monitor the increase in PermGen area ?

For monitoring PermGen, we'll learn to use a very simple tool, which is part of Java 5, called JSTAT. For those who use Linux or any other Unix-like OS, jstat is very similar to the TOP tool. JSTAT will connect to some VM, local or remote, and monitor some critical resources. Let's see how it works. Just type JSTAT and you'll see its command-line options:

JPS (Java Process Status)

Let's understand the options. The 1st thing you need to know is the VMID (Virtual Machine ID). What is the VMID ? Right now, there are 2 Java applications running on my computer, each in its own virtual machine. Each virtual machine has its own VMID. To discover the VMID that the application you need to monitor is using, you'll have to learn another tool: JPS (Java Process Status). There is a very similar tool in the Unix world called PS. JPS will list all running VMs with their VMIDs. Just type JPS on the command-line and you'll see this:

Let's understand JPS's output. In its basic form, jps outputs the VMID and the simple name of the executable class that is running in the virtual machine. In this case, I can infer the application I want to monitor, Jboss, is the first one listed, not because I know that "Main" is the name executable class, but because I can exclude the 2nd line, which is obviously EasyEclipse and the 3rd line, which is JPS. JPS itself runs inside a virtual machine and therefore, is always reported by jps. If, by the simple name of main class you cannot discover the VMID of your application, I suggest you type "jps -l" which will show the complete name of the main class for each VM. In most cases, that will do.

Now that we know that the VMID of Jboss is 1136, let's use JSTAT to monitor Jboss usage of PermGen memory. To use JSTAT, you need specify a single parameter that will identify the class of monitors you want to use. In our case, we will use "-gcpermcapacity" which will show statistics of the sizes of the Permanent Generation.

The important metrics

There are 3 important numbers to monitor regarding permanent generation size: the maximum permanent size, the current permanent size, and the current permanent utilization. Now, look at jstat's ouput. The 1st column shows the minumum size for the permsize. That's a parameter you can set in the initialization of the virtual machine. The 2nd column shows the maximum size for permsize. This is also a paramter you can set in the initialization of the virtual machine. Now, compare the 2nd column to the 3rd column. The permanent size fluctuate between the minimum and the maximum number. Now, it's just the minimum number. But that doesn't mean it's all used. To know how much of the current permanent size is being used, we'll have to look at another number, the Permanent Capacity Utilization, which you can see using the "-gcutil" parameter. If [minimum] = [maximum] permanent size, then [current] = [maximum] = [minimum] permanent size. Therefore, this number will not be very useful. But, if [minimum] < [maximum], knowing if [current] is getting closer to [maximum] is of vital importance. If [current] is only a few megabytes bellow maximum, maybe this is the right time to change Jboss Installation, so that its virtual machine is initialized with a greater MAXIMUM permanent size.

Well, we'll learn how to do that in part3.

posted on 2008-06-04 15:56 MingIsMe 阅读(279) 评论(0)  编辑  收藏

 
Powered by:
BlogJava
Copyright © MingIsMe