Skip to content

Instantly share code, notes, and snippets.

@pauloeli
Created February 23, 2023 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pauloeli/894c5f31b6b62b567ab8ed0f2895f037 to your computer and use it in GitHub Desktop.
Save pauloeli/894c5f31b6b62b567ab8ed0f2895f037 to your computer and use it in GitHub Desktop.
Control Groups Linux

systemd-cgtop

Shows the top control groups of the local Linux control group hierarchy, ordered by their CPU, memory, or disk I/O load.

The display is refreshed in regular intervals (by default every 1s). If a control group path is specified, shows only the services of the specified control group.

systemd-cgls

Recursively shows the contents of the selected Linux control group hierarchy in a tree.

If arguments are specified, shows all member processes of the specified control groups plus all their subgroups and their members.

systemd-cgls memory

Configurations

You can use the command systemctl list-unit-files --type=service to list all services and status. So, you can change the configuration of service, inputing limitations. Example:

[Service]
CPUShares=1500
References:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment