This article describes how to simulate and monitor DB update lock with Scouter environment. Installation and configuration guide is here.
-
JDK7 Installation ( Getting Started )
-
HSQLDB Installation ( Getting Start Profile SQL )
-
Tomcat Installation ( Getting Started )
-
JMeter Installation ( Getting Start Profile SQL )
-
Scouter Installation ( Getting Started )
-
Tomcat Configuration
-
DataSource (Getting Start Profile SQL)
-
Deploy sample jsp pages,
create.jsp, sql.jsp, lock.jsp Copy these 3 files to ${TOMCAT_HOME}/webapps/ROOT/ -
Scouter Agent configuration ( Getting Started )
-
-
Startup all together
- HSQLDB
runServer.bat --database.0 file:mydb --dbname.0 xdb
- Tomcat
set JAVA_HOME=c:\java7
set JAVA_OPTS=-javaagent:c:\scouter\agent\scouter.agent.jar
startup.bat
- Scouter Server
- Scouter Client
- Scouter Client monitoring
Do load test about sql.jsp via JMeter.
Left Window >> Test Plan (right mouse button) >> Add >> Threads(Users) >> SetUp Thread group
setUp Thread group(right mouse button) >> Add >> Sampler >> HTTP Request
Input these parameters,
- server ip : 127.0.0.1
- port : 8080
- Path : /sql.jsp
You can see the screen like below after clicking run button on JMeter.
JMeter plugins : http://jmeter-plugins.org
DB update lock will occur on lock.jsp page. Call this page with parameter 't' value to determine locking time.
You can see DB lock information at XLog and other chart on Scouter Client.
There are two steps to identify which business is making DB lock problem. First is checking active service list on left bottom on Client. Two is analyzing detailed transaction information of running service. After double clicking red bar, the detailed transaction information popup is displayed.
After the termination of service, profiles of tested transaction will be displayed on XLog chart.