http://planet.jboss.org/post/installing_testing_and_using_jboss_profiler_2_0_beta2
jar -tf jboss-profiler.jar
java -jar jboss-profiler-client.jar listSnapshots

修改run.conf,加上:
JAVA_OPTS="-javaagent:jboss-profiler.jar -Djboss-profiler.properties=jboss-profiler.properties -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"

-bash-3.2$ java -jar jboss-profiler-client.jar
Usage: Client [-h host] [-p port] <command>
       startProfiler  : Start the profiler 启动,一般随jboss启动而启动
       stopProfiler   : Stop the profiler 会自动snapshot一下
       snapshot       : Take a snapshot 上次snapshot(若没有则从startProfiler算起)的时间到当前snapshot的时间内的情况快照
       getSnapshot    : Get a snapshot //将收集的快照快速flush到磁盘上  根据listSnapshots的结果后面加序列号
       listSnapshots  : List snapshots // 列出所有快照
       clearSnapshots : Clear snapshots //其他命令参考手册
       gc             : Trigger garbage collection
       enable         : Enable the profiler
       disable        : Disable the profiler
       load           : Load a snapshot
       save           : Save a snapshot
       diff           : Difference between snapshots
       add            : Add classes (repository must be enabled)
       remove         : Remove classes (repository must be enabled)
       list           : List classes
-bash-3.2$ java -jar jboss-profiler-client.jar getSnapshot 1