提交 3bfbeb2e 编写于 作者: M Marbin Tan 提交者: Marbin Tan

gpperfmon: add behave test for running

-- add README for macOS build and configuration notes
Signed-off-by: NLarry Hamel <lhamel@pivotal.io>
上级 a48a554e
# Libraries Required
## libsigar:
https://github.com/hyperic/sigar
For macOS:
to build:
`mkdir build && cd build && cmake .. && make && make install`
# Troubleshoot
For macOS:
You may hit a reverse look up issue when viewing the logs of gpperfmon by default $MASTER_DATA_DIRECTORY/gpperfmon/logs
```
2017-04-11 14:59:56.821681
PDT,"gpmon","gpperfmon",p40501,th-1633193024,"::1","54006",2017-04-11 14:59:56
PDT,0,con5,,seg-1,,,,sx1,"FATAL","28000","no pg_hba.conf entry for host
""::1"", user ""gpmon"", database ""gpperfmon""",,,,,,,0,,"auth.c",608, ```
```
And also issues at $MASTER_DATA_DIRECTORY/pg_log:
```
Performance Monitor - failed to connect to gpperfmon database: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket ""/var/pgsql_socket/.s.PGSQL.15432""?",,,,,,,,"SysLoggerMain","syslogger.c",618,
```
to get pass this you need to do 2 things:
1) export PGHOST=foo # where 'foo' is your hostname that is NOT localhost
2) sudo /etc/hosts # and separate out (re)definitions of 127.0.0.1, something like:
127.0.0.1 foo
127.0.0.1 localhost
......@@ -5,12 +5,29 @@ Feature: gpperfmon
Scenario: install gpperfmon
Given the database "gpperfmon" does not exist
When the user runs "gpperfmon_install --port 15432 --enable --password foo"
# # enable the following to verify the role
# And the user runs "gpstop -ar"
# Then verify that a role "gpmon" exists in database "gpperfmon"
Then gpperfmon_install should return a return code of 0
Then verify that the last line of the master postgres configuration file contains the string "gpperfmon_log_alert_level=warning"
And verify that there is a "heap" table "database_history" in "gpperfmon"
@gpperfmon_run
Scenario: run gpperfmon
# important: to succeed on macOS, see steps in gpdb/gpAux/gpperfmon/README
Given the database "gpperfmon" does not exist
When the user runs "gpperfmon_install --port 15432 --enable --password foo"
Then gpperfmon_install should return a return code of 0
When the user runs command "pkill postgres"
And waiting "5" seconds
And the user runs "gpstart -a"
Then gpstart should return a return code of 0
Then verify that a role "gpmon" exists in database "gpperfmon"
Then verify that the last line of the master postgres configuration file contains the string "gpperfmon_log_alert_level=warning"
And verify that there is a "heap" table "database_history" in "gpperfmon"
When the user runs command "pgrep gpmmon"
Then pgrep should return a return code of 0
When waiting "5" seconds
When the user runs command "pgrep gpsmon"
Then pgrep should return a return code of 0
# todo this test may have never run. Is it valid? Worthy of fixing?
# Scenario: drop old partition
# When the user runs command "echo 'partition_age = 4' >> $MASTER_DATA_DIRECTORY/gpperfmon/conf/gpperfmon.conf"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册