SYSVInit support for setting cgroup limits

systemd service manager supports cgroups with below commands:

 systemd-cgls

 systemd-cgtop

 systemd-run

 systemctl set-property # applies the limits to a cgroup

for example:

$ systemd-cgls
Control group /:
-.slice
├─user.slice
│ ├─user-125.slice
│ │ ├─session-c1.scope
│ │ │ ├─1823 gdm-session-worker [pam/gdm-launch-environment]
│ │ │ ├─1949 /usr/lib/gdm3/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
│ │ │ ├─1956 /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
.....

Currently am working on below machine:

$ cat /etc/os-release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

that supports SYSVInit(but not systemd):

$ pstree | more
init-+-SomeClient-+-SomeClient---11*[{SomeClient}]
     |              `-{SomeClient}
     |-acpid
     |-agetty
     |-amazon-ecs-init---8*[{amazon-ecs-init}]
     |-amazon-ssm-agen---17*[{amazon-ssm-agen}]
     |-anacron
     |-auditd---{auditd}
     |-aws---12*[{aws}]
     |-crond
     |-2*[dhclient]
     |-dmeventd---2*[{dmeventd}]
     ....

We would like to set resource limits for docker containers running in this machine.

Does SYSVInit system support setting CGROUP limits? for memory & CPU…

Source: StackOverflow