Re: Memory used by service reported wrong

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've found my processes:

# systemctl status session-8.scope
● session-8.scope - Session 8 of user kodi
   Loaded: loaded (/run/systemd/transient/session-8.scope; transient)
Transient: yes
   Active: active (running) since Sat 2019-03-16 18:55:16 CET; 2min 1s ago
    Tasks: 33
   Memory: 198.3M
   CGroup: /user.slice/user-420.slice/session-8.scope
├─1109 /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/>
           ├─1111 (sd-pam)
           ├─1112 /usr/lib/Xorg :0 -nolisten tcp vt7 :0
           ├─1117 /bin/sh /usr/bin/kodi-standalone
├─1120 /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standa> ├─1121 /usr/bin/dbus-daemon --syslog --fork --print-pid 4 --print-ad>
           ├─1125 /bin/sh /usr/bin/kodi --standalone
           └─1133 /usr/lib/kodi/kodi-x11 --standalone

Mar 16 18:55:16 manuelsvdr systemd[1]: Started Session 8 of user kodi.

This scope does not have my memory limitation enabled. How to get this setting in there?


On 3/16/19 6:02 PM, Manuel Reimer wrote:
Hello,

I'm using this service file:

https://github.com/VDR4Arch/vdr4arch/blob/master/kodi-standalone-service/kodi.service

Resulting in this status:

# systemctl status kodi
● kodi.service - Starts instance of Kodi using xinit
   Loaded: loaded (/usr/lib/systemd/system/kodi.service; enabled; vendor preset>
    Active: active (running) since Sat 2019-03-16 17:41:20 CET; 12min ago
  Process: 372 ExecStartPost=/usr/bin/chvt 7 (code=exited, status=0/SUCCESS)
  Main PID: 371 (xinit)
     Tasks: 0 (limit: 4650)
    Memory: 216.0K (max: 2.8G)
    CGroup: /system.slice/kodi.service
           ‣ 371 /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/b>


As you see I've set a maximum for memory as Kodi tends to "leak memory" sometimes.

Problem: Kodi can still use as much memory as it wants as systemd doesn't even notice that kodi is contained in this service.

I thought it isn't that easy to "break out" of an cgroup in systemd.

How can I somehow enforce systemd to keep track of the whole memory used by all processes spawned inside this service?

Thanks in advance

Manuel

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux