获取帮助

启动调优程序之前,可以通过如下命令获取帮助信息:

  1. 源码方式:python main.py --help

输出帮助信息结果如下:

  1. usage:
  2. python main.py start [--role {{agent,server,monitor}}]
  3. # start local service.
  4. python main.py stop [--role {{agent,server,monitor}}]
  5. # stop local service.
  6. python main.py start [--user USER] [--host HOST] [--project-path PROJECT_PATH] [--role {{agent,server,monitor}}]
  7. # start the remote service.
  8. python main.py stop [--user USER] [--host HOST] [--project-path PROJECT_PATH] [--role {{agent,server,monitor}}]
  9. # stop the remote service.
  10. python main.py deploy [--user USER] [--host HOST] [--project-path PROJECT_PATH]
  11. # deploy project in remote host.
  12. python main.py show_metrics
  13. # display all monitored metrics(can only be executed on 'detector' machine).
  14. python main.py forecast [--metric-name METRIC_NAME] [--forecast-periods FORECAST_PERIODS] [--forecast-method {{auto_arima, fbprophet}}] [--save-path SAVE_PATH]
  15. # forecast future trend of metric(can only be executed on 'detector' machine).
  16. abnomaly_detection: a timeseries forecast and anomaly detection tool.
  17. positional arguments:
  18. {start,stop,deploy,show_metrics,forecast}
  19. optional arguments:
  20. -h, --help show this help message and exit
  21. --user USER User of remote server.
  22. --host HOST IP of remote server.
  23. --project-path PROJECT_PATH
  24. Project location in remote server.
  25. --role {agent,server,monitor}
  26. Run as 'agent', 'server', 'monitor'. notes: ensure the
  27. normal operation of the openGauss in agent.
  28. --metric-name METRIC_NAME
  29. Metric name to be predicted, if this parameter is not
  30. provided, all metric in database will be predicted.
  31. --forecast-periods FORECAST_PERIODS
  32. Forecast periods of metric, it should be integer plus
  33. time unit format such as '1S', '2H', '10D'; now we
  34. support time unit: S: Second, M: Minute, H: Hour, D:
  35. Day, W: Week. notes: the specific value should be
  36. determined to the trainnig data.if this parameter is
  37. not provided, the default value '100S' will be used.
  38. --forecast-method FORECAST_METHOD
  39. Forecast method, default method is 'auto_arima',if
  40. want to use 'fbprophet', you should install fbprophet
  41. first.
  42. --save-path SAVE_PATH
  43. Save the results to this path using csv format, if
  44. this parameter is not provided,, the result wil not be
  45. saved.
  46. -v, --version show program's version number and exit
  47. epilog:
  48. the 'a-detection.conf' and 'metric_task.conf' will be read when the program is running,
  49. the location of them is:
  50. a-detection.conf: xxx/a-detection.conf.
  51. metric_config: xxx/metric_task.conf.