Skip to content

Conversation

@drakenclimber
Copy link
Member

Add a cause cgroup_data that can gather and publish cgroup data via the adaptived shared data mechanism. This shared data can then be processed in an effect, e.g. output via a rest call.

Add auto-detection support for cgroup floats when invoking
adaptived_cgroup_get_value() with a type of ADAPTIVED_CGVAL_DETECT.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
…_VALUE

Add support for a shared data struct that contains the cgroup name, a
setting name, and the value associated with that setting.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
@drakenclimber drakenclimber added this to the Adaptived v1.1.0 milestone Aug 5, 2025
@drakenclimber drakenclimber self-assigned this Aug 5, 2025
@drakenclimber drakenclimber added the enhancement New feature or request label Aug 5, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 5, 2025
@drakenclimber drakenclimber force-pushed the cgroup_data branch 2 times, most recently from e8a03c6 to ee1d8ba Compare August 5, 2025 19:06
@drakenclimber
Copy link
Member Author

Add a cause that can gather cgroup data and publish it to the shared
data mechanism.  Downstream effects (print, rest calls, etc.) can then
utilize this data.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Add support to the "print" effect for printing shared data to the
screen.  This effect is useful for debugging the internal state of
adaptived.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Add a file comparison function, compare_files_unsorted(), that will
compare two files even if the data is out of order.  Note that the
comparison is quite slow as the second file is repeatedly walked.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Add a functional test for the cgroup_data cause.  Note that this test
operates on a fictional cgroup hierarchy that is temporarily built under
the ftests directory.

$ ./test071 ./
$ echo $?
0

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Add a utility function, parse_token_file(), that can parse a file,
search for a given token of the format "<< TOKEN >>", and then output
the replaced token to the specified file.

This can be useful for inserting timestamps, absolute paths, etc.
into JSON files.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Add a functional test for the cgroup_data cause.  Note that this test
operates on a fictional cgroup hierarchy that is temporarily built under
the ftests directory.  Also note that the test produces output paths
that are absolute paths.

$ ./test072 ./
$ echo $?
0

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
@drakenclimber
Copy link
Member Author

v2 changes:

  • Make the cgroup_data persistent. This will be useful for the rest_server effect as it can access the shared data on another thread
  • Add a test utility to compare files that are out of order. Walking a path is not guaranteed to walk in the same order, and some github actions machines enumerate the paths in a different order than my development machine
  • Fix typo in documentation commit - cgroup_path arg was listed instead of cgroup

@drakenclimber drakenclimber merged commit 75c46cd into oracle:master Jan 8, 2026
6 checks passed
@drakenclimber drakenclimber deleted the cgroup_data branch January 8, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant