@@ -11,49 +11,8 @@ A few things are required before we start :
1111- A python installation ready
1212- Docker & Docker-Compose ready
1313- Root access
14+ - Optionnal : 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
5918If you wish to get started as soon as possible, the following archive will allow you to deploy the following elements :
@@ -73,12 +32,19 @@ quick glimpse
7332
7433## Preparation
7534
76- Clone the repository and get ready:
35+
36+ 1 . Clone the repository:
7737``` sh
7838git clone https://github.com/powerapi-ng/powerapi-ng.github.io.git
7939cd 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+
8248From this archive, you will have all the necessary files to get started, let us break down each element.
8349
8450### Archive content
0 commit comments