Skip to content

Commit fec3645

Browse files
committed
docs(getting-started): Change to the preparation part
1 parent 9571781 commit fec3645

File tree

1 file changed

+15
-83
lines changed

1 file changed

+15
-83
lines changed

docs/getting_started.md

Lines changed: 15 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Reports
6868

6969
3. An [HWPC-Sensor](./reference/sensors/hwpc-sensor.md) that outputs its
7070
[HWPCReports](./reference/reports/report.md#HWPCReport) in a MongoDB Database,
71-
within the HWPCReport Collection.
71+
within the HWPCReport Collection
7272

7373
4. A [SmartWatts](./reference/formulas/smartwatts.md) that streams the
7474
[HWPCReports](./reference/reports/report.md#HWPCReport) from the MongoDB
@@ -103,90 +103,14 @@ From this archive, you will have all the necessary files to get started, let us
103103
|--.env
104104
```
105105

106-
#### HWPC-Sensor Configuration
107-
108-
As described in the [HWPC-Sensor Documentation](./reference/sensors/hwpc-sensor.md#global-parameters)
109-
several parameters can be set, both globally and for specific Groups monitored.
110-
The provided docker-compose.yaml file use configuration files to set those parameters.
111-
An example configuration file for HWPC-Sensor is given below and available in the archive presented [above](./getting_started.md#preparation) :
112-
113-
```json title="powerapi-stack/hwpc-sensor-config.json"
114-
115-
{
116-
"name": "sensor",
117-
"verbose": true,
118-
"frequency": 1000,
119-
"cgroup_basepath": "/sys/fs/cgroup/",
120-
"output": {
121-
"type": "mongodb",
122-
"uri": "mongodb://mongodb:27017",
123-
"database": "db_sensor",
124-
"collection": "prep"
125-
},
126-
"system": {
127-
"rapl": {
128-
"events": [
129-
"RAPL_ENERGY_PKG"
130-
],
131-
"monitoring_type": "MONITOR_ONE_CPU_PER_SOCKET"
132-
},
133-
"msr": {
134-
"events": [
135-
"TSC",
136-
"APERF",
137-
"MPERF"
138-
]
139-
}
140-
},
141-
"container": {
142-
"core": {
143-
"events": [
144-
"CPU_CLK_THREAD_UNHALTED:REF_P",
145-
"CPU_CLK_THREAD_UNHALTED:THREAD_P",
146-
"LLC_MISSES",
147-
"INSTRUCTIONS_RETIRED"
148-
]
149-
}
150-
}
151-
}
152-
```
106+
#### HWPC-Sensor and SmartWatts Configuration
153107

154-
### SmartWatts Configuration
155-
156-
As described in the [SmartWatts Documentation](./reference/formulas/smartwatts.md#global-parameters)
157-
several parameters can be set for the Formulas.
158-
The provided docker-compose.yaml file use configuration files to set those parameters.
159-
An example configuration file for SmartWatts is given below and available in the archive presented [above](./getting_started.md#preparation) :
160-
161-
```json title="powerapi-stack/smartwatts-config.json"
162-
{
163-
"verbose": false,
164-
"stream": true,
165-
"input": {
166-
"puller_mongodb": {
167-
"model": "HWPCReport",
168-
"type": "mongodb",
169-
"name": "puller_mongodb",
170-
"uri": "mongodb://mongodb:27017",
171-
"db": "db_sensor",
172-
"collection": "prep"
173-
}
174-
},
175-
"output": {
176-
"pusher_csv": {
177-
"model": "PowerReport",
178-
"type": "csv",
179-
"name": "pusher_csv",
180-
"directory": "/tmp/csv"
181-
}
182-
},
183-
"cpu-base-freq": 1900,
184-
"cpu-error-threshold": 2.0,
185-
"disable-dram-formula": true,
186-
"sensor-reports-frequency": 1000
187-
}
108+
As described in the [HWPC-Sensor Documentation](./reference/sensors/hwpc-sensor.md#global-parameters) and in the [SmartWatts Documentation](./reference/formulas/smartwatts.md#global-parameters)
109+
several parameters can be set, both globally and for specific Groups monitored for the sensor or the formula.
110+
111+
The provided docker-compose.yaml file use configuration files and the **.env** to set those parameters.
112+
You can find example of both those configuration files in the archive under the **formula** and **sensor** directories.
188113

189-
```
190114

191115
## Turn the key
192116

@@ -196,3 +120,11 @@ Once all set, you shall be able to initiate the stack with :
196120
python3 start.py
197121
```
198122

123+
After the 2 minutes of monitoring, you will be able to see the result inside the **csv** directory.
124+
If you have trouble understanding the output, you can read the [Power Report documentation](./reference/reports/reports.md#power-Reports).
125+
126+
Only in the context of this testing archive, after the monitoring, you can use the following command to get a pretty print of the result directly inside the terminal.
127+
128+
```sh
129+
python3 pretty_print.py
130+
```

0 commit comments

Comments
 (0)