summaryrefslogtreecommitdiffstats
path: root/modules.d/99memstrack/memstrack-report.sh
blob: 0ee7f2f795aa3ebc23974a1f70b66e8ce8b46327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
. /lib/dracut-lib.sh

if ! [ "$DEBUG_MEM_LEVEL" -ge 4 ]; then
    return 0
fi

if command -v systemctl > /dev/null; then
    systemctl stop memstrack.service
else
    pkill --signal INT '[m]emstrack'
    while pgrep -c '[m]emstrack' > /dev/null; do
        sleep 1
    done
fi

cat /.memstrack