Skip to content

7 doc/nld proofread #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 109 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
099bbaa
docs(hwpc-sensor): refactor documentation, remove Destination/Source …
Oct 4, 2024
bb5ec29
docs(smartwatts): refactor documentation, remove Destination/Source r…
Oct 4, 2024
41ef0b3
docs(getting-started): Add necessary example to run a complete PowerA…
Oct 7, 2024
fb73d58
docs(getting-started): Documents the Getting-Started instructions thr…
Oct 8, 2024
bfd3e51
Add hwpc-sensor.drawio
Inkedstinct Oct 8, 2024
522fec0
Add hwpc-sensor.drawio
Inkedstinct Oct 8, 2024
81d6146
docs(hwpc-sensor): Switch diagrams to Noun Project icons
Oct 8, 2024
2790e42
docs(overview): Clarifies PowerAPI framework components and status
Oct 8, 2024
de31f7f
docs(source/destination abstractions): Remove Source / Destination ab…
Oct 8, 2024
dff504b
docs(reports): Add JSON Schema for Reports basis
Oct 9, 2024
777f5ed
docs(grafana): Redirect to Grafana documentation as GUI changes frequ…
Oct 9, 2024
6497233
docs(hwpc-sensor): Include Daniel suggestions of providing examples w…
Oct 9, 2024
3396b98
docs(getting-started): Refer only 'process' as atomic monitored element
Oct 9, 2024
88cd731
docs(global): Improve examples snippet
Oct 9, 2024
b667972
docs(getting-started): Add start of getting started script
Zetos11 Oct 9, 2024
dc7de38
docs(mkdocs): Add local development tips
Oct 10, 2024
e692d32
docs(getting-started): Document a 'one-liner' way for quick test of P…
Oct 10, 2024
9d861df
Merge remote-tracking branch 'origin/7_doc/nld_proofread' into 7_doc/…
Zetos11 Oct 11, 2024
e7fadff
docs(getting-started): Add docker compose gestion
Zetos11 Oct 14, 2024
ffd5f26
docs(getting-started): Fix archive compatibility with version<3.10
Zetos11 Oct 16, 2024
9819bbf
docs(getting-started): Early design for the pretty print idea
Zetos11 Oct 16, 2024
a0d8de3
docs(getting-started): Pretty print improvement and start.py update
Zetos11 Oct 16, 2024
8455db5
docs(getting-started): Getting started archive is ready for use
Zetos11 Oct 17, 2024
d243f8b
docs(getting-started): Refactor Preety_print + change to start
Zetos11 Oct 17, 2024
9571781
docs(getting-started): Adapt getting started doc structure
Zetos11 Oct 21, 2024
fec3645
docs(getting-started): Change to the preparation part
Zetos11 Oct 21, 2024
8a1f7f0
docs(getting-started): Beginning update
Zetos11 Oct 21, 2024
1e8fa2f
fix(overview): Fix markdown list
Oct 21, 2024
671beb4
fix(overview): Add highlights for 'quick overview' with pretty_print.py
Oct 21, 2024
b6fe076
fix(getting-started): Add highlights for 'quick overview' with pretty…
Oct 21, 2024
72b3734
feat(getting-started/script): Add signal handler for SIGINT in order …
Oct 21, 2024
ebae5b0
fix(getting-started): Add git clone instruction instead of archive do…
Oct 21, 2024
72706cd
Merge branch '7_doc/nld_proofread' of github.com:Inkedstinct/powerapi…
Oct 22, 2024
c108291
docs(getting_started): Make cgroup part optionnal with more explicit …
Oct 22, 2024
bf4cf46
docs(reference): Update overview.md
Oct 29, 2024
99ecc97
docs(getting-started): Added cpu mapping
Zetos11 Oct 29, 2024
707e727
docs(getting-started): Removed start.sh a,d stop.sh
Zetos11 Oct 29, 2024
451f504
docs(reference): Update smartwatts.md
Oct 29, 2024
b4079f6
docs(reference): Update hwpc-sensor.md
Oct 29, 2024
30d99ad
docs(hwpc-sensor): Fix sensor overview background for dark mode
Oct 30, 2024
9ee9476
docs(getting-started): Add archive option for getting-started
Oct 30, 2024
577f40e
docs(getting-started): Add CLI commands for archive option in getting…
Oct 30, 2024
10f4227
docs(getting-started): Fix dead links
Oct 30, 2024
622ae68
docs(getting-started): Add Docker install documentation
Oct 30, 2024
9e8b2db
docs(references): Remove configuration-file part for Formulas, curren…
Oct 30, 2024
a2121d0
docs(overview): Fix SmartWatts reports unit
Oct 30, 2024
7909f08
docs(getting-started): Add UID / GUID information
Oct 30, 2024
fcfb376
docs(hwpc-sensor): Add Socket output as example + minor fixes
Oct 30, 2024
b05e74e
docs(getting-started): Add info on how to stop script
Oct 30, 2024
dedfdf2
docs(all): Fix HWPCReports -> HWPC Reports, same for PowerReports
Oct 30, 2024
64e6b4a
docs(smartwatts): Add CSV/CSV examplesw
Oct 30, 2024
4c548b6
docs(getting-started): Synchro archive with cloned
Oct 30, 2024
a5212f1
Merge remote-tracking branch 'origin/7_doc/nld_proofread' into 7_doc/…
Zetos11 Oct 30, 2024
7f63b2e
docs(getting-started): Merged pretty print with start.py
Zetos11 Oct 30, 2024
872d82f
docs(getting-started): Improve clarity and formatting
Oct 30, 2024
c4b7ed8
docs(hwpc-sensor): Typo
Oct 30, 2024
a70ce29
docs(smartwatts): Typo
Oct 30, 2024
b91e44d
docs(getting-started): Typo
Oct 30, 2024
203af14
docs(getting-started): Fix option for UID/GUID
Zetos11 Nov 5, 2024
e7dffa0
docs(getting-started): Clean up + Archive update
Zetos11 Nov 5, 2024
8b82ae3
fix: Correct issue related to csv directory permission by deleting/cr…
roda82 Jan 8, 2025
061b87b
fix: Remove user from formula
roda82 Jan 8, 2025
2133fef
refactor: Update some variables and functions names
roda82 Jan 9, 2025
6863ff8
style: Add white line to pretty print
roda82 Jan 9, 2025
ca3f3b5
refactor: Force usage of bash shell for system commands
roda82 Jan 9, 2025
a68b808
refactor: Force usage of bash shell for system commands
roda82 Jan 9, 2025
d1cf296
refactor: Define global variable for minimum execution time
roda82 Jan 9, 2025
dde7768
fix: Change umask value for current user
roda82 Jan 9, 2025
9075a30
fix: Change umask value for current user
roda82 Jan 9, 2025
1f2de03
docs(getting-started): Add exception gestion for CPU choice
Zetos11 Jan 9, 2025
eba10ed
docs(smartwatts): Fix HWPC Report -> HWPCReport, same for Power report
KellianL Jan 30, 2025
4242ffc
docs(smartwatts): Fix examples CSV/CSV
KellianL Feb 12, 2025
4d8610e
Files for getting started update
Apr 9, 2025
781489a
docs(getting-started): Update script
Apr 9, 2025
6aac9ca
Merge branch '7_doc/nld_proofread' of github.com:Inkedstinct/powerapi…
Apr 9, 2025
2876137
docs(getting-started): Fix sed
Apr 9, 2025
18307ec
docs(getting-started): Refactor logs
Apr 9, 2025
f1293b3
docs(getting-started): Fix mongodb URI
Apr 9, 2025
8c70328
Add .env to script
Apr 9, 2025
e5ea5bf
Add cleanup at the end, Change the way docker compose is stared
Apr 9, 2025
300f2e4
docs(getting-started): Try fix for permission
Apr 9, 2025
aefcf4c
docs(getting-started): Try fix for permission for sensor
Apr 9, 2025
269093d
docs(getting-started): try to fix logs
Apr 9, 2025
2937d71
docs(getting-started): try to fix logs + set smartwatts version to 2.3.1
Apr 15, 2025
21439e9
docs(getting-started): Clean up + logs
Apr 15, 2025
707f560
docs(getting-started): update compose
Apr 15, 2025
b6afc71
docs(getting-started): fix all compose
Apr 15, 2025
29c1bd0
docs(getting-started): remove logs
Apr 15, 2025
649f5e6
docs(getting-started): Fix cleanup
Apr 15, 2025
aff4d27
docs(getting-started): Fix cleanup
Apr 15, 2025
a14feff
docs(hwpc-sensor): Update Zen version compatibility
Apr 15, 2025
25c806c
docs(getting-started): Fix for Zen 1 no compatibility
Apr 23, 2025
05872a9
docs(getting-started): Correction to .md, .env and clean up script, s…
May 6, 2025
d990be4
style(hwpc-sensor): Correct some sentences in HWPC Sensor Description
roda82 May 12, 2025
aed8592
docs(hwpc-sensor): Update support information for different ZEN archi…
roda82 May 12, 2025
a38e6b0
style(getting-started): Change some sentences, Format commands
roda82 May 12, 2025
2d7c244
style(getting-started): Use relative path for links without /
roda82 May 12, 2025
3f25757
refactor(getting-started): Remove useless section related to databases
roda82 May 12, 2025
a3742f6
fix(getting-started): Typos
roda82 May 12, 2025
ec19bda
style(overview): Change some phrases, Update global atchitecture image
roda82 May 13, 2025
41a8984
style(smartwatts): Change some sentences
roda82 May 13, 2025
a90b9cc
style(processors): Change some sentences
roda82 May 13, 2025
6c1055f
style(processors): Change some sentences
roda82 May 13, 2025
e734f58
style(reports): Change some sentences
roda82 May 13, 2025
2314cbb
style(grafana): Change some sentences
roda82 May 13, 2025
5fc27b1
style(hwpc-sensor): Update image icons
roda82 May 13, 2025
f0b8a05
docs(hwpc-sensor): Add ulimit parameter for docker container
roda82 May 14, 2025
2f5d35a
docs(publications): Add Citation on Publication section
roda82 May 14, 2025
73884a0
docs(about): Add section about us
roda82 May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,23 @@
PowerAPI website use [MKDocs](https://www.mkdocs.org/).

You can push your changes on `master` branch to deploy them on the website.

## Local development

When redacting changes for this documentation, you may want to visualize the
output the way it will be presented in the final website once compiled.

One way to do so is to:

1. Install the necessary packages : mkdocs, mkdocs-material, mkdocs-material-extensions
This can be done with: `pip install mkdocs mkdocs-material mkdocs-material-extensions`

2. Have a local copy of this repository (taking care of *checkout-ing* the right ref)

3. From the CLI, have this particular repository as PWD

4. Use mkdocs in order to serve locally (default on http://localhost:8000)
This can be done with: `mkdocs serve -o`

5. Check the URL it serves to, targets will be rebuild on modifications in the
current directory or in any nested elements (use -W to add paths to be considered for hot reloading)
57 changes: 57 additions & 0 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# About Us

## History

PowerAPI was initiated in 2011 by the [ADAM project](http://adam.lille.inria.fr/pmwiki.php/Adam/HomePage.html) team at the [Inria Center of the University of Lille](https://www.inria.fr/fr/centre-inria-de-luniversite-de-lille). The primary motivation was to create a tool that could estimate the energy consumption of software processes without relying on external hardware like wattmeters. This need arose from the limitations of existing tools, which often lacked configurability and required hardware-based measurements.

The initial version of PowerAPI was developed in [Scala](https://www.scala-lang.org/), utilizing the [Akka library](https://doc.akka.io/libraries/akka-core/current/typed/guide/modules.html) for its modular and asynchronous event-driven architecture. This design allowed users to monitor energy consumption at the process level by analyzing hardware resource utilization such as CPU, memory, disk, and network usage. The modularity of PowerAPI enabled users to customize their monitoring setups by adding or removing components as needed.

Between 2015 and 2020, PowerAPI saw significant growth in both functionality and adoption. PowerAPI's architecture was refined to support more diverse monitoring scenarios, including virtual machines and containerized environments.

Since 2021, recognizing the need for broader accessibility and integration with modern software ecosystems, the PowerAPI team initiated a transition from Scala to Python. This shift aimed to leverage Python's widespread use in data science and machine learning communities, facilitating easier adoption and extension of the toolkit.

The Python-based version of PowerAPI introduced several enhancements:

- Improved Extensibility: The new architecture allowed for easier integration of custom sensors and estimation models, accommodating a wider range of monitoring scenarios.

- Real-Time Monitoring: PowerAPI continued to provide real-time energy consumption estimates, now with improved accuracy and support for additional data sources.

- Integration with Visualization Tools: The toolkit offered compatibility with visualization platforms like [Grafana](https://grafana.com/) and [Prometheus](https://prometheus.io/), enabling users to create comprehensive dashboards for energy monitoring.

In June 2022 a Consortium was created for supporting this development and maintenance with 4 founding members: [Inria](https://www.inria.fr/fr), [Orange Labs](https://lelab.orange.fr/), [Ovh Cloud](https://www.ovhcloud.com/fr/) and [Davidson Consulting](https://www.davidson.fr/). The continued evolution of PowerAPI reflects its commitment to advancing energy-aware software development practices.


## Consortium members

<div class="sponsors" markdown>

|[![Inria](assets/images/intro/inria.png){ width="309px" }](https://www.inria.fr/fr)|
|:-----:|
|Since June 2022|

|[![Orange Labs](assets/images/intro/logo-orange.png){ width="338px" }](https://lelab.orange.fr/)|
|:-----:|
|Since June 2022|

|[![OVH Cloud](assets/images/intro/ovh-cloud.jpeg){ width="225px" }](https://www.ovhcloud.com/fr/)|
|:-----:|
|Since June 2022|

|[![La Poste Groupe](assets/images/intro/la-poste-groupe.jpg){ width="300px" }](https://www.lapostegroupe.com/fr)|
|:-----:|
|Since October 2023|

</div>

## Past Consortium members

<div style="text-align: center" markdown>
|[![Davidson Consulting](assets/images/intro/davidson.png){ width="400px" }](https://www.davidson.fr/)|
|:-----:|
|From June 2022 to December 2024|
</div>


## How to join the Consortium

If you are interested in join the Consortium please send us an <a href="mailto:powerapi-staff@inria.fr" target="_blank" rel="noopener" title="">email</a>.
Binary file modified docs/assets/images/reference/overview/global-architecture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 34 additions & 37 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,54 @@
# Getting started

If you want to monitor the energy consumption of your process we have some
ready-to-use tools
In this tutorial, we will guide you through the first steps to get started with PowerAPI.
The objective is to get a quick view of the capabilities of PowerAPI.
A few things are required before we start:

???+ info "Source and Destination"
In order to use any Formula, you need to run a Source and a Destination. The former is used by a Sensor to store metrics. The later allows the Formula to make available the estimations. For starting, you can use [MongoDB](https://hub.docker.com/_/mongo) as Source and [InfluxDB:2.X](https://hub.docker.com/_/influxdb) as Destination by installing them as Docker containers.
For more details about Sources and Destinations please check this [section](reference/database/sources_destinations.md).
- A compatible processor (you can see the compatible CPU architecture [here](reference/sensors/hwpc-sensor.md#)). You can take a look on the following links to find your CPU architecture:
* For [Intel Processor](https://en.wikipedia.org/wiki/List_of_Intel_processors).
* For [Intel Xeon Processor](https://en.wikipedia.org/wiki/List_of_Intel_Xeon_processors).
* For [AMD Processor](https://en.wikipedia.org/wiki/Table_of_AMD_processors).
- You can also use the `lscpu` command to get information about your processor.
- 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!).
- Root access.

## Which components to get a complete stack

<!---
## **RAPL Formula**

!!! note ""
for monitoring the energy consumption of your device
The complete stack of PowerAPI is composed of:

RAPL Formula is made for tracking the energy consumption of your machine.
To install RAPL Formula on a baremetal server or a PC run [the following
script](script/rapl_install.sh) in a Terminal.
- A Sensor and a Formula that enable us to define a Software Power Meter. The Sensor retrieves power consumption related metrics and the Formula compute an estimation of the power consumption. Currently, PowerAPI provides [HWPC-Sensor](reference/sensors/hwpc-sensor.md) and [SmartWatts Formula](reference/formulas/smartwatts.md)

The script explains what it will do and then pauses before it does it.
- The Sensor and the Formula need an *output*. The supported *output* are listed [here](reference/sensors/hwpc-sensor.md/#output). The Formula will also use the Sensor *output* as its *input*.

Please notice that you need a **Linux distribution** in order to use the HWPC Sensor installed by the script as
well as a **comptible Intel** (Sandy Bridge and newer) or **AMD Processor** (Zen). **Power/ARM/RISCV are not supported** architectures. HWPC Sensor will **not work on a Virtual Machine**. However, you can install the Formula by hand in a Virtual Machine if need it.
-->
- Finally, they need a configuration as described in the [HWPC-Sensor](reference/sensors/hwpc-sensor.md#global-parameters) and [SmartWatts](reference/formulas/smartwatts.md#global-parameters) documentation. The configuration parameters can be defined via a configuration file or via the CLI.

## **SmartWatts Formula**
To learn more see the [overview section](./reference/overview.md).

!!! note ""
for monitoring the power consumption of your process

Smartwatts is made for tracking the power consumption of processes on a
machine.
To install Smartwatts on a baremetal server or a PC run [the following
script](script/smartwatts_install.sh) in a Terminal. Please notice that you will need [pip](https://pip.pypa.io/en/stable/installation/) or [docker](https://docs.docker.com/engine/install/) in order to use the Formula.
## Executing a Software PowerMeter

The script explains what it will do and then pauses before it does it.
The following command allow you to setup and run a software PowerMeter by using HWPC-Sensor and SmartWatts Formula via Docker.

Please notice that you need a **Linux distribution** in order to use the HWPC Sensor installed by the script as
well as a **comptible Intel** (Sandy Bridge and newer) or **AMD Processor** (Zen). You also need [docker](https://docs.docker.com/engine/install/). **Power/ARM/RISCV are not supported** architectures. HWPC Sensor will **not work on a Virtual Machine**. However, you can install the Formula by hand in a Virtual Machine if need it.
```sh
curl -sSL https://raw.githubusercontent.com/Inkedstinct/powerapi-ng.github.io/refs/heads/7_doc/nld_proofread/docs/script/getting_started/curl_version/start.sh | bash
```

This command will run [this script](script/getting_started/curl_version/start.sh). It will detect the CPU used, and download the appropriate Docker compose file and environment file for your configuration.

It will then execute the Docker compose file, deploying the following elements for 3 minutes:

#### CGroups
If you need to monitor a process or a group of process via SmartWatts by using HWPC Sensor **version 1.2 or older**, you can follow this [tutorial](reference/cgroup/cgroup.md). Please notice that **cgroup V1** is required **only** for HWPC Sensor **version 1.2 or older**. If you need to enable this `cgroup` version please follow this [tutorial](reference/cgroup/cgroup_v1_activation.md).
1. A MongoDB instance to store the [Sensor](reference/sensors/hwpc-sensor.md) reports.

<!---
## **Jouleit**
2. An [HWPC-Sensor](reference/sensors/hwpc-sensor.md) that outputs its
[HWPC Reports](reference/reports/reports.md#hwpc-reports) in a MongoDB Database,
within the HWPC Report Collection

!!! note ""
for mesuring the energy consumption of a program
3. A [SmartWatts](reference/formulas/smartwatts.md) that streams the
[HWPC Reports](reference/reports/reports.md#hwpc-reports) from the MongoDB
Database Collection, processes it and outputs its
[Power Reports](reference/reports/reports.md#power-reports) into CSV.

Jouleit is made for tracking the energy consumption of a program.
Jouleit need `gawk` to run.
You can get the script from the [github repository](https://github.com/powerapi-ng/jouleit)
Start jouleit by using `./jouleit.sh cmd`.
-->
In this specific use case, we use the CLI to set the configuration parameters in the Docker compose file.

After the execution of result will be visible under the *csv* directory.
29 changes: 29 additions & 0 deletions docs/publications.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,35 @@ hide:
- navigation
- toc
---

# How to cite PowerAPI

If you use PowerAPI in a scientific publication, please cite:

- *Guillaume Fieni, Daniel Romero Acero, Pierre Rust, Romain Rouvoy*. [**PowerAPI: A Python framework for building software-defined power meters**](https://joss.theoj.org/papers/10.21105/joss.06670#). Journal of Open Source Software, 2024, 9 (98), pp.6670. [⟨10.21105/joss.06670⟩](https://dx.doi.org/10.21105/joss.06670). [⟨hal-04601379⟩](https://hal.science/hal-04601379)


Bibtex entry:

```
@article{fieni-2024,
TITLE = {{PowerAPI: A Python framework for building software-defined power meters}},
AUTHOR = {Fieni, Guillaume and Acero, Daniel Romero and Rust, Pierre and Rouvoy, Romain},
URL = {https://hal.science/hal-04601379},
JOURNAL = {{Journal of Open Source Software}},
PUBLISHER = {{Open Journals}},
VOLUME = {9},
NUMBER = {98},
PAGES = {6670},
YEAR = {2024},
MONTH = Jun,
DOI = {10.21105/joss.06670},
KEYWORDS = {Power ; Energy ; Toolkit ; Measurement ; Framework},
PDF = {https://hal.science/hal-04601379/file/10.21105.joss.06670-3.pdf},
HAL_ID = {hal-04601379},
HAL_VERSION = {v1},
}
```
# Publications

- **[PowerAPI: A Python framework for building software-defined power meters](https://hal.science/hal-04601379)**: G. Fieni, D. Romero Acero, P. Rust, R. Rouvoy. _[Journal of Open Source Software](https://joss.theoj.org)_. 9(98):6670, June 2024.
Expand Down
Loading