Skip to content

Commit bcb45ab

Browse files
authored
Add cgroup system metric providers (#117)
1 parent d72035e commit bcb45ab

13 files changed

+213
-76
lines changed

content/en/docs/installation/installation-windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ However, for testing your usage scenarios you can use at least the following met
108108
- Documentation: [Measuring/Metric Providers/CPU % - procfs - system]({{< relref "/docs/measuring/metric-providers/cpu-utilization-procfs-system" >}})
109109
- Container CPU utilization via cgroupv2
110110
- Config: `cpu.utilization.cgroup.container.provider.CpuUtilizationCgroupContainerProvider`
111-
- Documentation: [Measuring/Metric Providers/CPU % - cgroup - container]({{< relref "/docs/measuring/metric-providers/cpu-utilization-cgroup-container-provider" >}})
111+
- Documentation: [Measuring/Metric Providers/CPU % - cgroup - container]({{< relref "/docs/measuring/metric-providers/cpu-utilization-cgroup-container" >}})
112112
- Container memory usage via cgroupv2
113113
- Config: `memory.used.cgroup.container.provider.MemoryUsedCgroupContainerProvider`
114114
- Documentation: [Measuring/Metric Providers/Memory Used - cgroup - container]({{< relref "/docs/measuring/metric-providers/memory-used-cgroup-container" >}})

content/en/docs/measuring/metric-providers/cpu-time-cgroup-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This metric provider reads time spent in the CPU based on the cgroups stats file
2222
### Input Parameters
2323

2424
- args
25-
- `-s`: container-ids seperated by commas
25+
- `-s`: container-ids separated by commas
2626
- `-i`: interval in milliseconds
2727

2828
By default the measurement interval is 100 ms.

content/en/docs/measuring/metric-providers/cpu-utilization-cgroup-container-provider.md renamed to content/en/docs/measuring/metric-providers/cpu-utilization-cgroup-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This metric provider calculates an estimate of the % total CPU usage based on th
2121
### Input Parameters
2222

2323
- args
24-
- `-s`: container-ids seperated by commas
24+
- `-s`: container-ids separated by commas
2525
- `-i`: interval in milliseconds
2626

2727
By default the measurement interval is 100 ms.

content/en/docs/measuring/metric-providers/cpu-utilization-cgroup-system-provider.md

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "CPU % - cgroup - system"
3+
description: "Documentation for CpuUtilizationCgroupSystemProvider of the Green Metrics Tool"
4+
date: 2025-01-15T08:49:15+00:00
5+
draft: false
6+
images: []
7+
weight: 141
8+
---
9+
10+
### What it does
11+
12+
This metric provider calculates an estimate of the % total CPU usage based on the cgroups stats file of your system cgroup processes. More information about cgroups can be found in the [Linux manual pages](https://www.man7.org/linux/man-pages/man7/cgroups.7.html).
13+
14+
It can be used for system monitoring and tracking background processes such as the desktop environment. It is also used to calculate GMT's overhead.
15+
16+
### Classname
17+
18+
- `CpuUtilizationCgroupSystemProvider`
19+
20+
### Metric Name
21+
22+
- `cpu_utilization_cgroup_system`
23+
24+
### Input Parameters
25+
26+
- args
27+
- `-s`: cgroup name strings separated by commas
28+
- `-i`: interval in milliseconds
29+
30+
By default the measurement interval is 100 ms.
31+
32+
```bash
33+
./metric-provider-binary -i 100 -s [email protected],session-2.scope
34+
```
35+
36+
### Output
37+
38+
This metric provider prints to Stdout a continuous stream of data. The format of the data is as follows:
39+
40+
`TIMESTAMP READING CGROUP-NAME`
41+
42+
Where:
43+
44+
- `TIMESTAMP`: Unix timestamp, in microseconds
45+
- `READING`: The estimated % CPU used
46+
- `CGROUP-NAME`: The cgroup name that this reading is for
47+
48+
Any errors are printed to Stderr.
49+
50+
### How it works
51+
52+
This metric provider uses the exact same code as the metric provider ["CPU % - cgroup - container" →]({{< relref "cpu-utilization-cgroup-container#how-it-works" >}}).
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Disk IO - cgroup - system"
3+
description: "Documentation for DiskIoCgroupSystemProvider of the Green Metrics Tool"
4+
date: 2025-01-15T08:49:15+00:00
5+
weight: 206
6+
---
7+
8+
### What it does
9+
10+
This metric provider reads the total amount of read and written bytes from disk devices by the cgroups of your system cgroup processes. More information about cgroups can be found in the [cgroups man page](https://www.man7.org/linux/man-pages/man7/cgroups.7.html).
11+
12+
It can be used for system monitoring and tracking background processes such as the desktop environment. It is also used to calculate GMT's overhead.
13+
14+
### Classname
15+
16+
- `DiskIoCgroupSystemProvider`
17+
18+
### Metric Name
19+
20+
- `disk_io_cgroup_system`
21+
22+
### Input Parameters
23+
24+
- args
25+
- `-s`: cgroup name strings separated by commas
26+
- `-i`: interval in milliseconds
27+
28+
By default the measurement interval is 100 ms.
29+
30+
```bash
31+
./metric-provider-binary -i 100 -s [email protected],session-2.scope
32+
```
33+
34+
### Output
35+
36+
This metric provider prints to Stdout a continuous stream of data. The format of the data is as follows:
37+
38+
`TIMESTAMP RBYTES WBYTES CGROUP-NAME`
39+
40+
Where:
41+
42+
- `TIMESTAMP`: Unix timestamp, in microseconds
43+
- `RBYTES`: The cumulative amount of bytes read from disk since cgroup start
44+
- `WBYTES`: The cumulative amount of bytes written to disk since cgroup start
45+
- `CGROUP-NAME`: The cgroup name that this reading is for
46+
47+
Any errors are printed to Stderr.
48+
49+
### How it works
50+
51+
This metric provider uses the exact same code as the metric provider ["Disk IO - cgroup - container" →]({{< relref "disk-io-cgroup-container#how-it-works" >}}).

content/en/docs/measuring/metric-providers/disk-io-procfs-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Disk IO - procfs - system"
33
description: "Documentation for DiskIoProcfsSystemProvider of the Green Metrics Tool"
44
date: 2025-07-07T16:10:00+00:00
5-
weight: 206
5+
weight: 207
66
---
77

88
### What it does

content/en/docs/measuring/metric-providers/disk-used-statvfs-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Disk Used - statvfs - system"
33
description: "Documentation for DiskUsedStatvfsSystemProvider of the Green Metrics Tool"
44
date: 2025-07-07T16:15:00+00:00
5-
weight: 207
5+
weight: 208
66
---
77

88
### What it does

content/en/docs/measuring/metric-providers/memory-used-cgroup-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ It reads the amount of memory, in bytes, used by the cgroup of a container. More
2222
### Input Parameters
2323

2424
- args
25-
- `-s`: container-ids seperated by commas
25+
- `-s`: container-ids separated by commas
2626
- `-i`: interval in milliseconds
2727

2828
By default the measurement interval is 100 ms.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Memory Used - cgroup - system"
3+
description: "Documentation for MemoryUsedCgroupSystemProvider of the Green Metrics Tool"
4+
date: 2025-01-15T08:49:15+00:00
5+
draft: false
6+
images: []
7+
weight: 181
8+
---
9+
10+
### What it does
11+
12+
This metric provider reads the amount of memory, in bytes, used by the cgroup of your system cgroup processes. More information about cgroups can be found in the [Linux manual pages](https://www.man7.org/linux/man-pages/man7/cgroups.7.html).
13+
14+
It can be used for system monitoring and tracking background processes such as the desktop environment. It is also used to calculate GMT's overhead.
15+
16+
### Classname
17+
18+
- `MemoryUsedCgroupSystemProvider`
19+
20+
### Metric Name
21+
22+
- `memory_used_cgroup_system`
23+
24+
### Input Parameters
25+
26+
- args
27+
- `-s`: cgroup name strings separated by commas
28+
- `-i`: interval in milliseconds
29+
30+
By default the measurement interval is 100 ms.
31+
32+
```bash
33+
./metric-provider-binary -i 100 -s [email protected],session-2.scope
34+
```
35+
36+
### Output
37+
38+
This metric provider prints to Stdout a continuous stream of data. The format of the data is as follows:
39+
40+
`TIMESTAMP READING CGROUP-NAME`
41+
42+
Where:
43+
44+
- `TIMESTAMP`: Unix timestamp, in microseconds
45+
- `READING`: The amount of memory, in bytes, used during the time interval
46+
- `CGROUP-NAME`: The cgroup name that this reading is for
47+
48+
Any errors are printed to Stderr.
49+
50+
### How it works
51+
52+
This metric provider uses the exact same code as the metric provider ["Memory Used - cgroup - container" →]({{< relref "memory-used-cgroup-container#how-it-works" >}}).

0 commit comments

Comments
 (0)