Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions o2-aliecs-shmcleaner
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ memStart="`grep MemAvailable /proc/meminfo | sed 's/.*: *//'`"
# Try to kill leftover processes gracefully
n=0
for p in `pgrep -u flp`; do
c="`ps -ho %c $p`"
c="`cat /proc/$p/comm 2>/dev/null`"
[ "$c" = "o2-alf" ] && continue
[ "$c" ] || continue
echo "Killing '$c' PID:$p" | $O2_INFOLOGGER_PATH/bin/o2-infologger-log -x -s Debug -o Facility=$O2_FACILITY -o Partition=$O2_PARTITION
Expand All @@ -50,7 +50,7 @@ done
# Check if all cleaned
w=""
for p in `pgrep -u flp`; do
c="`ps -ho %c $p`"
c="`cat /proc/$p/comm 2>/dev/null`"
[ "$c" = "o2-alf" ] && continue
[ "$c" ] || continue
w="T"
Expand All @@ -61,7 +61,7 @@ nn=0
if [ "$w" = "T" ]; then
sleep ${waitFor}
for p in `pgrep -u flp`; do
c="`ps -ho %c $p`"
c="`cat /proc/$p/comm 2>/dev/null`"
[ "$c" = "o2-alf" ] && continue
[ "$c" ] || continue
echo "Killing -9 '$c' PID:$p" | $O2_INFOLOGGER_PATH/bin/o2-infologger-log -x -s Debug -o Facility=$O2_FACILITY -o Partition=$O2_PARTITION
Expand All @@ -76,7 +76,7 @@ while true; do
l=""
x=0
for p in `pgrep -u flp`; do
c="`ps -ho %c $p`"
c="`cat /proc/$p/comm 2>/dev/null`"
[ "$c" = "o2-alf" ] && continue
[ "$c" ] || continue
l="$l'$c':$p "
Expand Down
Loading