Skip to content

Formatted README to be web friendly #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,59 +32,59 @@ Installation and Usage Instructions
------
1. Requirement: Java JDK 8, or the one specified by in pom.xml if changed during build time.

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.
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.

3. For a more formal installation, it is recommended to have a MySQL database server to store the metrics.
Otherwise, use the built-in derby db.
a. Create a database, for example, named as metrics, with the MySQL database server.
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.
c. The above information will be required when you first login to the analyzer to setup metrics gathering.

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
-j: jettyHome, leave it as it is
-p: http port to be used, 9092 by default
-w: war (web archive) file, has to be myperf.war
-k: working directory, if not specified, it will use ./work
-c: url context, default to /myperf, leave it as is.
Otherwise, use the built-in `derby db`.
1. Create a database to store metrics. `CREATE DATABASE my_metrics;`
2. Create a MySQL user to access the metrics database `GRANT ALL PRIVILEGES ON my_metrics.* to 'metricsuser'@'localhost' identified by 'metricsuserpassword';`
3. The above information will be required when you first login to the analyzer to setup metrics gathering.

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
1. `-j: jettyHome, leave it as it is`
2. `-p: http port to be used, 9092 by default`
3. `-w: war (web archive) file, has to be myperf.war`
4. `-k: working directory, if not specified, it will use ./work`
5. `-c: url context, default to /myperf, leave it as is. `

Modify java command path inside start_myperf.sh, if needed.
Modify `java` command path inside `start_myperf.sh`, if needed.

5. Start up:
./start_myperf.sh
Check nohup.out and logs directory for any error logs.
`./start_myperf.sh`
Check `nohup.out` and `logs/` directory for any error logs.

6. Shutdown:
./stop_myperf.sh
`./stop_myperf.sh`

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

After login, you will be directed to setup page:

You can add an email address for notifications. The email uses OS "mailx" command.
You can add an email address for notifications. The email uses OS `mailx` command.

Configure the metrics storage database, using the one that you created in the earlier steps.
A metrics scan interval of 1 or 5 minutes should be good enough.

If use built-in derbydb, choose short retention days.
If use built-in `derbydb`, choose short retention days.


After configuration is done, you need to start the scanner ("Start Scanner" button on top of the page).

Everytime you change the configuration, you need to restart the scanner.

If the scanner does not work as expected, restart the analyzer
./stop_myperf.sh
`./stop_myperf.sh`
then
./start_myperf.sh
`./start_myperf.sh`

8. For each database server you want to monitor, you need to create a MySQL user with the following privileges:
a. process
b. replication client
c. show databases
d. show view
e. select on all (if you want to use it to check data dictionary or run explain plans)
1. process
2. replication client
3. show databases
4. show view
5. select on all (if you want to use it to check data dictionary or run explain plans)

9. The analyzer relies on Linux SNMP to gather OS level data. Check snmpd service status.

Expand Down