Skip to content

Commit 3a61719

Browse files
committed
format README
1 parent 1dfa9b4 commit 3a61719

File tree

1 file changed

+51
-34
lines changed

1 file changed

+51
-34
lines changed

README.md

+51-34
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ MySQL Performance Analyzer
33

44
MySQL Performance Analyzer is an open source project for MySQL performance monitoring and analysis.
55
This repository includes two sub projects:
6-
Java web application project myperf
7-
Java web server jetty wrapper
6+
* Java web application project myperf
7+
* Java web server jetty wrapper
88

99
Build
1010
------
@@ -33,64 +33,81 @@ Installation and Usage Instructions
3333
1. Requirement: Java JDK 8, or the one specified by in pom.xml if changed during build time.
3434

3535
2. Unzip myperfserver-server.zip to the desired installation directory. If you intend to install on Windows host, please review two shell scripts and create Windows equivalent.
36+
37+
For future updates, most of the time you only need to copy myperf/target/myperf.war to webapps directory under the installation directory, then restart.
3638

37-
3. For a more formal installation, it is recommended to have a MySQL database server to store the metrics.
39+
3. For a more formal installation, it is recommended to have a MySQL database server as back store to store the metrics.
3840
Otherwise, use the built-in derby db.
39-
a. Create a database, for example, named as metrics, with the MySQL database server.
40-
b. Create a MySQL user (for example, 'metrics'@'my_host' -> here my_host is the machine where you MySQL perf analyzer) with all privileges on above schema.
41-
c. The above information will be required when you first login to the analyzer to setup metrics gathering.
41+
42+
* Create a database, for example, named as metrics, with the MySQL database server.
43+
* Create a MySQL user (for example, 'metrics'@'my_host' -> here my_host is the machine where you MySQL perf analyzer) with all privileges on above schema.
44+
* The above information will be required when you first login to the analyzer to setup metrics gathering.
4245

4346
4. Review script start_myperf.sh to see if you need to modify any command line settings. Usually, port number is the only one you need change
44-
-j: jettyHome, leave it as it is
45-
-p: http port to be used, 9092 by default
46-
-w: war (web archive) file, has to be myperf.war
47-
-k: working directory, if not specified, it will use ./work
48-
-c: url context, default to /myperf, leave it as is.
47+
* -j: jettyHome, leave it as it is
48+
* -p: http port to be used, 9092 by default
49+
* -w: war (web archive) file, has to be myperf.war
50+
* -k: working directory, if not specified, it will use ./work
51+
* -c: url context, default to /myperf, leave it as is.
4952

50-
Modify java command path inside start_myperf.sh, if needed.
53+
Modify java command path inside start_myperf.sh, if needed, for example, when there are multiple JDK packages installed.
5154

5255
5. Start up:
53-
./start_myperf.sh
56+
```
57+
./start_myperf.sh
58+
```
5459
Check nohup.out and logs directory for any error logs.
5560

5661
6. Shutdown:
57-
./stop_myperf.sh
62+
```
63+
./stop_myperf.sh
64+
```
5865

5966
7. First time Login and Setup
67+
6068
After startup, point your browser to http://your_host:9092/myperf (or the port number you changed).
69+
6170
The initial login user and credential are myperf/change.
6271

63-
After login, you will be directed to setup page:
72+
After login, you will be directed to setup page:
6473

65-
You can add an email address for notifications. The email uses OS "mailx" command.
74+
* You can add an email address for notifications. The email uses OS "mailx" command.
6675

67-
Configure the metrics storage database, using the one that you created in the earlier steps.
68-
A metrics scan interval of 1 or 5 minutes should be good enough.
76+
* Configure the metrics storage database, using the one that you created in the earlier steps.
77+
78+
A metrics scan interval of 1 or 5 minutes should be good enough.
6979

70-
If use built-in derbydb, choose short retention days.
80+
* If use built-in derbydb, choose short retention days.
7181

7282

73-
After configuration is done, you need to start the scanner ("Start Scanner" button on top of the page).
74-
75-
Everytime you change the configuration, you need to restart the scanner.
76-
77-
If the scanner does not work as expected, restart the analyzer
78-
./stop_myperf.sh
79-
then
80-
./start_myperf.sh
81-
83+
* After configuration is done, you need to start the scanner ("Start Scanner" button on top of the page).
84+
85+
Everytime you change the configuration, you need to restart the scanner.
86+
87+
* If the scanner does not work as expected, restart the analyzer
88+
```
89+
./stop_myperf.sh
90+
```
91+
then
92+
```
93+
./start_myperf.sh
94+
```
95+
* If your SNMP uses non default community, or not version v2c, use "SNMP Settings" tab to configure SNMP.
96+
Currently only Linux based SNMP is supported. If your MySQL servers are not running on Linux, use
97+
"Alert Settings" tab to disable SNMP metrics polling.
98+
8299
8. For each database server you want to monitor, you need to create a MySQL user with the following privileges:
83-
a. process
84-
b. replication client
85-
c. show databases
86-
d. show view
87-
e. select on all (if you want to use it to check data dictionary or run explain plans)
100+
* process
101+
* replication client
102+
* show databases
103+
* show view
104+
* select on all (if you want to use it to check data dictionary or run explain plans)
88105
89106
9. The analyzer relies on Linux SNMP to gather OS level data. Check snmpd service status.
90107
91108
Known Limitations
92109
------
93-
1. snmpd is based on the Linux specification.
110+
1. SNMP is based on the Linux specification.
94111
2. Email notification uses Linux's "mailx" command.
95112
96113
License

0 commit comments

Comments
 (0)