twiddle.sh 사용법
twiddle.sh사용법
JBoss 에서 제공하는 twiddle.sh 파일을 이용해서 실시간 ThreadDump 및 모니터링이 가능합니다.
1. Dump Script 생성
[/jboss/jboss-6.1.0Final/bin]# vi dump twiddle.sh -s service:jmx:rmi://jndi/rmi://localhost:port/jmxrmi invoke "jboss.system.type=ServerInfo" listDump > threads_`date +%M%S`.html |
위 내용중 localhost와 port만 환경에 맞게 바꾸어 주면 됩니다.
2. twiddle.sh 이용하여 모니터링
- 메모리 확인 방법(JVM Heap Usage) twiddle.sh get "jboss.system:type=ServerInfo" FreeMemory twiddle.sh get "jboss.system.type=ServerInfo" TotalMemory twiddle.sh get "jboss.system.type=ServerInfo" MaxMemory
- 쓰레드 풀 확인방법 twiddle.sh get "jboss.system:type=ServerInfo" ActiveThreadGroupCount twiddle.sh get "jboss.system:type=ServerInfo" ActiveThreadCount
- DB커넥션 확인방법 twiddle.sh get "jboss.jca:name=PostgresDS,service=ManagedConnectionPool" ConnectionCount twiddle.sh get "jboss.jca:name=PostgresDS,service=ManagedConnectionPool" AvailableConnectionCount twiddle.sh get "jboss.jca:name=PostgresDS,service=ManagedConnectionPool" MinSize twiddle.sh get "jboss.jca:name=PostgresDS,service=ManagedConnectionPool" MaxSize twiddle.sh get "jboss.jca:name=PostgresDS,service=ManagedConnectionPool" InUseConnectionCount |
by. 강수현