#############
Bringup tool
#############

-----------
Description:
-----------
  application that collects fine grained IB telemetry & PHY data, and exports in amBER format for phy engineers.

-------------
Prerequisites:
-------------
  - python3
  - python3-venv
  - supervisord

------------------
Initialize & Start:
------------------
  ./bin/run_bringup.sh

--------------
Run Collection:
--------------
  CollectX: collection_start

  Usage:
    CollectX: help collection_start
    
    Usage:
                            options                          defaults
                            -------                          --------
          collection_start  time|duration=n [s|m|h|d]        24h
                            sample_rate=n [s|m|h|d]          60 seconds
                            guids=[guid_list|guid_file]      None
                            hca=hca_name                     mlx5_0
                            cable|cable_info=[yes|no|once]   yes
                            reset_counters=t                 false
                            mads_retries=n                   2
                            mads_timeout=n (msec)            500
                            force_hca=t                      f

-----------------------
Check Collection Status:
-----------------------
  CollectX: collection_status

  verify the existence of the following 2 lines:  
    Status:             Active
    IBdiagnet Status:   Ok

---------------
Stop Collection:
---------------
  CollectX: collection_stop

----------------------
Generate amBER IB data:
----------------------
  CollectX: generate_amber_ib_csv

  Example:
    * collect the data from the last hour and write it to a file
    generate_amber_ib_csv past=60m out=/tmp/amber_ib.csv



#############
UFM Telemetry
#############

-----------
Description:
-----------
  daemon that collects IB telemetry data and makes it available to prometheua, fluent, or as files on disk.

-------------
Prerequisites:
-------------
  - python3
  - python3-venv
  - supervisord

----------------------
Initialize & Configure:
----------------------

  $./bin/initialize_telemetry.sh --help
  Usage: /tmp/test_bringup/bin/initialize_telemetry.sh [params]
  
  where [params] could be the following:
  
          -h|--help
          -t|--telemetry-dir         - telemetry general directory
          -l|--telemetry-log-dir     - telemetry log directory
          -k|--telemetry-conf-dir    - telemetry configuration directory
          -i|--telemetry-ibdiag-dir  - telemetry ibdiagnet directory
          -p|--telemetry-pid-dir     - telemetry pid file directory
          -c|--config                - telemetry key=val configuration ';' delimited
                                     example: key1=value1;key2=value2

  Example:
    ./bin/initialize_telemetry.sh --telemetry-dir /tmp/ufm_telemetry --config "hca=mlx5_2;sample_rate=30"

--------------
Run Collection:
--------------
  supervisord --config=${telemetry-conf-dir}/supervisord.conf

-------------
Retrieve data:
-------------
  * prometheus
  curl http://0.0.0.0:9110/minimal

