Skip to content

Commit a5212f1

Browse files
committed
Merge remote-tracking branch 'origin/7_doc/nld_proofread' into 7_doc/nld_proofread
# Conflicts: # docs/script/getting_started/formula/smartwatts-mongodb-csv.json # docs/script/getting_started/start.py # docs/script/getting_started/start.sh
2 parents 707e727 + 4c548b6 commit a5212f1

File tree

15 files changed

+462
-326
lines changed

15 files changed

+462
-326
lines changed

docs/assets/images/reference/sensors/PowerAPI_HWPCSensorOverview.drawio.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/getting_started.md

Lines changed: 15 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,10 @@ A few things are required before we start :
99
* For [Intel Xeon Processor](https://en.wikipedia.org/wiki/List_of_Intel_Xeon_processors)
1010
* For [AMD Processor](https://en.wikipedia.org/wiki/Table_of_AMD_processors)
1111
- A python installation ready
12-
- Docker & Docker-Compose ready
12+
- Docker & Docker-Compose ready (refer to [this official documentation](https://docs.docker.com/engine/install/) and the [post-install steps](https://docs.docker.com/engine/install/linux-postinstall/) if needed !)
1313
- Root access
14+
- Optionnal : [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) to proceed by clonning the repository
1415

15-
The first step of the tutorial will be to define the elements to monitor.
16-
In the testing archive, we will be able to see the consumption of the docker container by the default.
17-
So feel free to skip directly to the [preparation part](#preparation) if you don't want to monitor a specific process.
18-
19-
## Define elements to monitor
20-
21-
!!! tip "Optionnal abstraction for fine-grain analysis"
22-
This part is optionnal, it allows the definition of cgroups which can group chosen processes that make sense to you.
23-
If you skip it, the next steps will work against all current process grouped.
24-
25-
PowerAPI being a monitoring tool for energy consumption, we can define logic grouping of elements to monitor.
26-
To do so we can use the Linux abstraction of [cGroups](https://www.redhat.com/sysadmin/cgroups-part-one).
27-
Kernel supports 2 versions of cGroups : v1 and v2.
28-
To know which one your kernel supports, you can run :
29-
```sh
30-
mount | grep '^cgroup' | awk '{print $1}' | uniq
31-
```
32-
33-
*Both versions can be supported at the same time*.
34-
35-
??? "Create a cGroup"
36-
37-
In order to create a cGroup, you can use:
38-
39-
- cgroup v1 : [this doc](https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/cgroups.html#usage-examples-and-syntax)
40-
- cgroup v2 : [this doc](https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#mounting)
41-
42-
43-
44-
??? "Add processes to the group"
45-
46-
Once the cgroup created, we need to fill it with processes to be monitored.
47-
To do so, you can use:
48-
49-
- cgroup v1 : [this doc](https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/cgroups.html#attaching-processes).
50-
- cgroup v2 : [this doc](https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/cgroups.html#attaching-processes).
51-
52-
??? warning "Installing a process to monitor"
53-
54-
[stress-ng](https://wiki.ubuntu.com/Kernel/Reference/stress-ng) can be used to
55-
generate load on one's system. **Be carefull** as it can be configured to be quite agressive.
56-
5716
## Which components to get a complete stack
5817

5918
If you wish to get started as soon as possible, the following archive will allow you to deploy the following elements :
@@ -62,23 +21,30 @@ If you wish to get started as soon as possible, the following archive will allow
6221
Reports
6322

6423
3. An [HWPC-Sensor](./reference/sensors/hwpc-sensor.md) that outputs its
65-
[HWPCReports](./reference/reports/report.md#HWPCReport) in a MongoDB Database,
66-
within the HWPCReport Collection
24+
[HWPC Reports](./reference/reports/reports.md#hwpc-reports) in a MongoDB Database,
25+
within the HWPC Report Collection
6726

6827
4. A [SmartWatts](./reference/formulas/smartwatts.md) that streams the
69-
[HWPCReports](./reference/reports/report.md#HWPCReport) from the MongoDB
28+
[HWPC Reports](./reference/reports/reports.md#hwpc-reports) from the MongoDB
7029
Database Collection, processes it and outputs its
71-
[PowerReports](./reference/reports/report.md#PowerReports) as CSV files for a
30+
[Power Reports](./reference/reports/reports.md#power-reports) as CSV files for a
7231
quick glimpse
7332

7433
## Preparation
7534

76-
Clone the repository and get ready:
35+
36+
1. Clone the repository:
7737
```sh
7838
git clone https://github.com/powerapi-ng/powerapi-ng.github.io.git
7939
cd powerapi-ng.github.io/docs/script/getting-started
8040
```
8141

42+
2. Download the archive:
43+
```
44+
wget -c https://raw.githubusercontent.com/powerapi-ng/powerapi-ng.github.io/refs/heads/master/docs/script/getting_started.tar.gz -O - | tar -xz
45+
cd getting_started
46+
```
47+
8248
From this archive, you will have all the necessary files to get started, let us break down each element.
8349

8450
### Archive content
@@ -116,7 +82,7 @@ python3 start.py
11682
```
11783

11884
After the 2 minutes of monitoring, you will be able to see the result inside the **csv** directory.
119-
If you have trouble understanding the output, you can read the [Power Report documentation](./reference/reports/reports.md#power-Reports).
85+
If you have trouble understanding the output, you can read the [Power Report documentation](./reference/reports/reports.md#power-reports).
12086

12187
!!! info "Quick results overview"
12288
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.

docs/reference/database/sources_destinations.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The list of accepted parameters are:
3434
|`db` (`database` for `HWPCSensor`) | string | `d` (`D` for `HWPCSensor`) | N/A | Yes | The name of your database |
3535
|`collection` | string | `c` (`C` for `HWPCSensor`) | N/A | Yes | The name of the collection inside `db` |
3636
|`name` | string | `n` | `"puller_mongodb"` (Source), `pusher_mongodb` (Destination)| No | The related puller/pusher name. This parameter is not used by `HWPCSensor` |
37-
|`model` | string | `m` | `"HWPCReport"` (Source), `PowerReport` (Destination) | No | The Report type stored by the database |
37+
|`model` | string | `m` | `"HWPC Report"` (Source), `Power Report` (Destination) | No | The Report type stored by the database |
3838

3939
### JSON File Excerpt
4040

@@ -68,7 +68,7 @@ The list of accepted parameters are:
6868
|`org` | string | `g` | N/A | Yes | The name of the organization associated to the bucket |
6969
|`tags` | string | `t` | N/A | No | List of metadata keys of the report separated by `,` that will be kept. `sensor` and `target` are always kept as report metadata |
7070
|`name` | string | `n` | `"pusher_influxdb2"` | No | The related pusher name |
71-
|`model` | string | `m` | `"PowerReport"` | No | The Report type stored by the database |
71+
|`model` | string | `m` | `"Power Report"` | No | The Report type stored by the database |
7272

7373

7474
InfluxDB2 can only be used as a Destination.
@@ -79,7 +79,7 @@ Below you find an example of configuration excerpt for this kind of Destination.
7979

8080
```json
8181
{
82-
"model": "PowerReport",
82+
"model": "Power Report",
8383
"type": "influxdb2",
8484
"uri": "http://127.0.0.1",
8585
"port": 8086,
@@ -104,7 +104,7 @@ The list of accepted parameters are:
104104
|`files`(Source)| string | `f` | Empty list | No | The list of input CSV files with the format file1,file2,file3... |
105105
|`directory` (Destination and `HWPCSensor`)| string |`d` (`U` for `HWPCSensor`) | Current directory | No |The directory where output CSV files will be written |
106106
|`name` | string | `n` | `"puller_csv"` (Source), `"pusher_csv"` (Destination)| No | The related puller/pusher name. This parameter is not used by `HWPCSensor` |
107-
|`model` | string | `m` | `"HWPCReport"` (Source), `"PowerReport"` (Destination) | No | The Report type stored in CSV files. This parameter is not used by `HWPCSensor` |
107+
|`model` | string | `m` | `"HWPC Report"` (Source), `"Power Report"` (Destination) | No | The Report type stored in CSV files. This parameter is not used by `HWPCSensor` |
108108

109109
### JSON File Excerpt
110110

@@ -132,7 +132,7 @@ The list of accepted parameters are:
132132
|`port` | int | `P` | N/A | Yes | The port of communication |
133133
|`uri`/ `host` | int | `U` | N/A | Yes | The IP address of the machine running the socket |
134134
|`name` | string | `n` | `"puller_socket"`| No | The related puller name |
135-
|`model` | string | `m` | `"HWPCReport"` | No | The Report type managed by the socket |
135+
|`model` | string | `m` | `"HWPC Report"` | No | The Report type managed by the socket |
136136

137137

138138
### JSON File Excerpt
@@ -162,7 +162,7 @@ The list of accepted parameters are:
162162
| ------------- | ----- | ------------- | -------------| ---------- | ------------------------------------ |
163163
|`filename` | int | `f` | N/A | Yes | The name of the file |
164164
|`name` | string | `n` | `"pusher_filedb"` | No | The related pusher name |
165-
|`model` | string | `m` | `"HWPCReport"` (Source) `"PowerReport"` (Destination)| No | The Report type stored in the file |
165+
|`model` | string | `m` | `"HWPC Report"` (Source) `"Power Report"` (Destination)| No | The Report type stored in the file |
166166

167167
### JSON File Excerpt
168168

@@ -192,7 +192,7 @@ The list of accepted parameters are:
192192
|`metric-name` | string | `M` | N/A | Yes | The exposed metric name |
193193
|`metric-description` | string | `d` | `"energy consumption"` | No | The exposed metric description |
194194
|`name` | string | `n` | `"pusher_prom"` | No | The related pusher name |
195-
|`model` | string | `m` | `"PowerReport"` | No | The Report type exposed by Prometheus |
195+
|`model` | string | `m` | `"Power Report"` | No | The Report type exposed by Prometheus |
196196

197197

198198
Prometheus can only be used as a Destination that monitors reports but they will be not stored by this service.

docs/reference/formulas/configuration_files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The table below shows basic parameters.
1212
| `stream` | `bool` (flag) | `s` |`False` | Real time or post-mortem mode |
1313
| `sensor-report-sampling-interval` | `int` | N/A | `1000` | The time in milliseconds between two reports (`stream` = `True`) |
1414
| `input` | `string` | N/A | N/A | SmartWatts input, shall match an existing Sensor output and contain HPWCReports. See [here](./smartwatts.md#smartwatts-inputs) |
15-
| `output` | `string` | N/A | N/A | SmartWatts output to store PowerReport. See [here](./smartwatts.md#smartwatts-outputs) |
15+
| `output` | `string` | N/A | N/A | SmartWatts output to store Power Report. See [here](./smartwatts.md#smartwatts-outputs) |
1616
| `pre-processor` | `string` | N/A | N/A | Pre-Processor to modify reports generated by a sensor. More information about Processors and their related parameters can be found [here](../processors/processors.md) |
1717
| `post-processor` | `string` | N/A | N/A | Post-Processor to modify reports generated by a formula. More information about Processors and their related parameters can be found [here](../processors/processors.md) |
1818

docs/reference/formulas/rapl.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The RAPL Formula is designed to mesure power consumption of domains (CPU or RAM)
77
in real time.
88

99
The RAPL Formula takes HWPC Report with RAPL event for each domains. It then
10-
returns the mesured power in a PowerReport for each domain.
10+
returns the mesured power in a Power Report for each domain.
1111
This Formula does not perform any other computation as its goal is only to track
1212
global power consumption in a more readable way than raw RAPL.
1313

@@ -29,7 +29,7 @@ You can use [the following script](../script/rapl_install.sh) to install RAPL Fo
2929

3030
## Usage
3131

32-
For running the RAPL Formula you need: a Source and a Destination, a Sensor that provides `HWPCReports` and a configuration.
32+
For running the RAPL Formula you need: a Source and a Destination, a Sensor that provides `HWPC Reports` and a configuration.
3333

3434
### Source and Destination
3535

@@ -42,7 +42,7 @@ docker run -d --name mongo_source_destination -p 27017:27017 mongo
4242
```
4343

4444
### Sensor
45-
[HWPC Sensor](../sensors/hwpc-sensor.md) is used in order to get `HWPCReports`. Start by installing the HWPC Sensor (see
45+
[HWPC Sensor](../sensors/hwpc-sensor.md) is used in order to get `HWPC Reports`. Start by installing the HWPC Sensor (see
4646
[here](../sensors/hwpc-sensor.md#installation)) and start it (see
4747
[here](../sensors/hwpc-sensor.md#usage)).
4848

@@ -69,7 +69,7 @@ Below an example is provided by using MongoDB as Source and Destination.
6969
"stream": true,
7070
"input": {
7171
"puller": {
72-
"model": "HWPCReport",
72+
"model": "HWPC Report",
7373
"type": "mongodb",
7474
"uri": "mongodb://127.0.0.1",
7575
"db": "test",
@@ -79,7 +79,7 @@ Below an example is provided by using MongoDB as Source and Destination.
7979
"output": {
8080
"pusher_power": {
8181
"type": "mongodb",
82-
"model": "PowerReport",
82+
"model": "Power Report",
8383
"type": "mongodb",
8484
"uri": "mongodb://127.0.0.1",
8585
"db": "test",
@@ -124,8 +124,8 @@ the installation you use:
124124
docker run -t \
125125
--net=host \
126126
powerapi/powerapi --verbose \
127-
--input mongodb --model HWPCReport --uri mongodb://127.0.0.1 --db test --collection prep \
128-
--output mongodb --model PowerReport --uri mongodb://127.0.0.1 --db test --collection results \
127+
--input mongodb --model HWPC Report --uri mongodb://127.0.0.1 --db test --collection prep \
128+
--output mongodb --model Power Report --uri mongodb://127.0.0.1 --db test --collection results \
129129
--disable-dram-formula \
130130
--sensor-report-sampling-interval 500
131131
```
@@ -134,14 +134,14 @@ the installation you use:
134134

135135
```sh
136136
python -m powerapi --verbose \
137-
--input mongodb --model HWPCReport --uri mongodb://127.0.0.1 --db test --collection prep \
138-
--output mongodb --model PowerReport --uri mongodb://127.0.0.1 --db test --collection results \
137+
--input mongodb --model HWPC Report --uri mongodb://127.0.0.1 --db test --collection prep \
138+
--output mongodb --model Power Report --uri mongodb://127.0.0.1 --db test --collection results \
139139
--disable-dram-formula \
140140
--sensor-report-sampling-interval 500
141141
```
142142

143143
???+ info "Estimations' Storage"
144-
Your `PowerReports` will be stored on MongoDB.
144+
Your `Power Reports` will be stored on MongoDB.
145145

146146
???+ tip "Using shortcuts for parameters' names"
147147
You use `-` instead of `--`.

0 commit comments

Comments
 (0)