I have a bunch of .NET Core applications running as systemd units. The host is running out of memory and slowly increasing swap usage to 100% so I suspect one or more of the services has a memory leak.
When I run htop
all the services show under the dotnet
process so I can't see values for individual services. When I ran systemd-cgtop
before and after a reboot (going from 100% swap to almost nothing) the memory values for the applications were similar.
How can I find out which systemd unit is using an ever-increasing amount of swap space?