norden.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Moin! Dies ist die Mastodon-Instanz für Nordlichter, Schnacker und alles dazwischen. Folge dem Leuchtturm.

Administered by:

Server stats:

3.4K
active users

#cgroups

0 posts0 participants0 posts today
Replied in thread

@ShadowJonathan if it's only about simulating those conditions for a single process (and its sub-processes), cgroups might be worth a look.

If you don't want to fiddle around with the low-level details of them, wrap the execution of your process in "systemd-run --user --wait --pty ..." and use "--slice" to assign the process to the corresponding slice with the desired resource constraints.

freedesktop.org/software/syste

freedesktop.org/software/syste

www.freedesktop.orgsystemd-run

Do you ever wish that you could monitor cgroup creation / removal race-free with fanotify? Now you can! Any kernfs works!

Linux v6.6-rc1 is out and it contains my commit:

* github.com/torvalds/linux/comm

Example usage in Go:

* github.com/cloudflare/ebpf_exp

All you do is ask for events from a mount and then read them in a loop. No need to re-arm watches like with inotify.

The patch is trivial and can be easily backported if you want it in an older kernel.

#linux#kernel#ebpf

"Adhemerval Zanella (5):
linux: Add posix_spawnattr_{get,set}cgroup_np (BZ 26731)
posix: Add pidfd_spawn and pidfd_spawnp (BZ 30349)
posix: Add pidfd_fork (BZ 26371)
posix: Add PIDFDFORK_NOSIGCHLD for pidfd_fork
linux: Add pidfd_getpid"

YES YES YES, TO ALL OF IT.
sourceware.org/pipermail/libc-

sourceware.org [PATCH v6 0/5] Add pidfd and cgroupv2 support for process creation
#glibc#linux#kernel