https://bugs.kde.org/show_bug.cgi?id=517743

--- Comment #13 from Daniel Duris <[email protected]> ---
My temporary workaround until fixed is having this script ran in CRON every
minute:

#!/bin/bash

PROCESS_NAME="kdeconnectd"
THRESHOLD=80

PID=$(pgrep -x "$PROCESS_NAME" | head -n1)

if [ -n "$PID" ]; then
# Grab instant CPU% using top
CPU_USAGE=$(top -b -n 1 -p "$PID" | awk -v pid="$PID" '$1 == pid {print
int($9)}')

if [ -n "$CPU_USAGE" ] && [ "$CPU_USAGE" -ge "$THRESHOLD" ]; then
logger -t kdeconnect-watchdog "Killing $PROCESS_NAME (PID $PID): CPU at
${CPU_USAGE}%"
kill -9 "$PID"
fi
fi

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to