Steam telepítése
belépés
|
nyelv
简体中文 (egyszerűsített kínai)
繁體中文 (hagyományos kínai)
日本語 (japán)
한국어 (koreai)
ไทย (thai)
Български (bolgár)
Čeština (cseh)
Dansk (dán)
Deutsch (német)
English (angol)
Español - España (spanyolországi spanyol)
Español - Latinoamérica (latin-amerikai spanyol)
Ελληνικά (görög)
Français (francia)
Italiano (olasz)
Bahasa Indonesia (indonéz)
Nederlands (holland)
Norsk (norvég)
Polski (lengyel)
Português (portugáliai portugál)
Português - Brasil (brazíliai portugál)
Română (román)
Русский (orosz)
Suomi (finn)
Svenska (svéd)
Türkçe (török)
Tiếng Việt (vietnámi)
Українська (ukrán)
Fordítási probléma jelentése
Distnoted is used by other applications as well. However, with distnoted memory leakage those application are likely waiting longer than usual for the notifications to go through.
- Killing distnoted speeds up stuff for those applications as well.
- A well-written application will resend all notifications that were lost in the queue. Because most applications will use Apple's API instead of interacting with distnoted directly, that's a safe assumption.
- Resending those notifications happens so fast that you won't notice the 'restart' phase for those applications.
#!/bin/bash
MEM_LIMIT_PERCENTAGE=0.5
CHECK_INTERVAL=60
while true
do
PID=`ps -f -U $USER | grep /usr/sbin/distnoted | grep -v grep | tr -s ' ' | cut -d ' ' -f 2`
MEM_USAGE=`ps -o %mem -p $PID | sed 1d`
if [ `echo "$MEM_USAGE > $MEM_LIMIT_PERCENTAGE" | bc` = "1" ]; then
echo "Mem usage high. Killing distnoted"
kill -9 $PID
else
echo "Mem usage within bounds"
fi
sleep $CHECK_INTERVAL
done
For those interested in the details, it greps for distnoted process being run by the user, checks it memory, and kills it if its using more than 0.5% of the computer's memory. It checks every 60 seconds by default.
PS: Dont run it as root user.