customize corrective actions: re match with cgroups and names

This commit is contained in:
Alexey Avramov
2019-04-22 19:51:02 +09:00
parent 6af3191e89
commit 448a60c3f0
5 changed files with 166 additions and 101 deletions

4
trash/memleak/install.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
cp ./memleak /usr/sbin/memleak
cp ./memleak.service /lib/systemd/system/memleak.service
systemctl daemon-reload

12
trash/memleak/memleak Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env python3
from os import system
from time import sleep
x = []
while True:
x.append('#' * 9999999)
sleep(0.1)
system('sleep 99 &')

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Memory leak daemon
After=sysinit.target
[Service]
ExecStart=/usr/sbin/memleak
[Install]
WantedBy=multi-user.target