Ich habe seit ein paar Tagen das Problem, das mein Rechner alle paar Minuten für ca 30 Sekunden komplett ausgelastet ist. d.h. die Maus ruckelt beim Bewegen, selbst Text in Eingabefeldern wie diesem erscheint erst mit deutlicher Verzögerung. Das K-Tray Icon der Systemüberwachung schlägt bei Prozessorauslastung ebenfalls treffend voll aus (Sowohl in Blau=User als auch in Rot=System, bzw. nicht eindeutig zuzuordnen). Auch die KDE-Überwachung zeigt diese "Spannungsspitzen" im Diagramm an, allerdings kann ich sie keinem Prozess zuordnen, da in der "normalen" Prozessliste zumindestens kein Prozess plötzlich auf 100% oä. geht (zumindenst während ich gucke
)
Ich nehme an, dass es sich um eine aktualisierte Software handelt, vermutlich systemnah, weil ich testweise alles deaktiviert habe was sonst noch so im Hintergrund an User-Anwendungen läuft (KWeather, AmaroK, Kopete, Kmix, Opera...)
Zum Updaten von KDE benutze ich eigentlich immer nur Yast, bzw. hab auch software von anderen Quellen, aber die "sollte" ja eigentlich nicht laufen.
Gibt es irgendwelchen bekannten Fehler in Yast-Updates (nicht unbedingt das allerletzte). Oder wie kann ich den faulen Prozess richtig rausfinden?
Ich habs mal mit folgendem Script versucht, allerdings kommen da 2 Fehlermeldungen beim start, und so ganz sicher bin ich mir bei der Einsatzweise nicht (Ich nehme an, es muss die ganze Zeit laufen und schreibt bei einer Auslastung die jeweiligen Protokolldateien)
Fehler:
Script:
Ich nehme an, dass es sich um eine aktualisierte Software handelt, vermutlich systemnah, weil ich testweise alles deaktiviert habe was sonst noch so im Hintergrund an User-Anwendungen läuft (KWeather, AmaroK, Kopete, Kmix, Opera...)
Zum Updaten von KDE benutze ich eigentlich immer nur Yast, bzw. hab auch software von anderen Quellen, aber die "sollte" ja eigentlich nicht laufen.
Gibt es irgendwelchen bekannten Fehler in Yast-Updates (nicht unbedingt das allerletzte). Oder wie kann ich den faulen Prozess richtig rausfinden?
Ich habs mal mit folgendem Script versucht, allerdings kommen da 2 Fehlermeldungen beim start, und so ganz sicher bin ich mir bei der Einsatzweise nicht (Ich nehme an, es muss die ganze Zeit laufen und schreibt bei einer Auslastung die jeweiligen Protokolldateien)
Fehler:
Code:
./proc-state: line 25: /usr/local/sbin/tools.include: Datei oder Verzeichnis nicht gefunden
./proc-state: line 255: [: 9:35am: integer expression expected
Script:
Code:
#!/bin/bash
#
#
# Write about running processes if an given load level is reached
#
#
# 2003-07-21, Ralf Beckesch
# Licensed under the GNU GPL v2
# see: http://www.gnu.org/licenses/gpl.html
#
if [ "$1" = "-d" ]; then
D="1"
else
D="0"
fi
if [ "$1" = "-v" ]; then
V="1"
else
V="0"
fi
. /usr/local/sbin/tools.include
TARGETDIR=/usr/local/load_log
MAXLOAD="300"
SLEEPVAL="60"
PROGNAME=$(basename $0)
HHEAD="<html><head></head><body><pre>"
HFOOT="</pre></body></html>"
#
#
# Hier stehen die namen der Shellfunktionen drinne, die aufgerufen werden sollen...
#
#
LOGS2WRITE=" \
date_log \
vmstat_log \
iostat_log \
top_log \
ps_log \
pstree_log \
"
load () {
local LOAD=$1
local LVAL=""
case $LOAD in
"1")
LVAL=1
#
# Die Last der letzten Minute
#
;;
"5")
LVAL=2
#
# Die Last der letzten fuenf Minuten
#
;;
"15")
LVAL=3
#
# Die Last der letzten fuenfzehn Minuten
#
;;
*)
LVAL=1
#
# Default
#
;;
esac
echo $(uptime | sed 's/^.*load average://g' | awk '{print $'$LVAL'}' | sed 's/,/\./g' | sed 's/\.//g')
}
print_line() {
echo '------------------------------------------------------------------------------------'
}
print_title() {
TITLE="$1"
print_line
echo -e "\t\t$TITLE"
print_line
}
print_divider() {
print_line
echo -e "\n\n"
}
date_log () {
echo -e "\t$(date)"
}
top_log () {
top -b -n1
}
vmstat_log () {
vmstat
}
iostat_log () {
iostat -x
}
pstree_log () {
pstree -acnpul
}
ps_log () {
ps fax
}
write_proc_report() {
local LOAD="$1"
local NOW=$(date +%Y%m%d-%H.%M.%S)
local LOG=$TARGETDIR/$NOW.txt
print_line>> $LOG
print_title "$PROGNAME">> $LOG
echo -e " *** LOAD VALUE: $LOAD ***">> $LOG
print_divider>> $LOG
for i in $LOGS2WRITE; do
debug $i
print_title $i>> $LOG
$i2>&1>> $LOG
print_divider>> $LOG
sync
done
if [ -n "$MAIL" ]; then
(echo $HHEAD; cat $LOG; echo $HFOOT) | mail -s "$PROGNAME LOAD _ALARM_, $NOW" $MAIL
fi
gzip $LOG
sync
}
print_help () {
echo -e "\n\t$PROGNAME\n"
echo -e "\twritten by ralf {remove} [at] beckesch [dot] de\n"
echo -e "Syntax:"
echo -e " -h | --help"
echo -e "\t\tShow this help and exit"
echo -e " -m | --maxload"
echo -e "\t\tSet the load where to begin logging. Attention, normaly a load value"
echo -e "\t\tconsist of an float value like \"2.56\". For this script, you have got to"
echo -e "\t\tmultiply the ment load value by 100 (or simple leave the dot away :)"
echo -e " -s | --sleep"
echo -e "\t\tNumber of seconds between the load checks"
echo -e " -M | --mailto"
echo -e "\t\tMail this file to the specified Emailadress"
echo -e "\n"
echo -e "Example: $PROGNAME --maxload 150 --sleep 90 --mailto root@localhost\n"
}
####
#### MAIN
####
while [ -n "$1" ]; do
case "$1" in
-h|--help)
print_help
exit
;;
-m|--maxload)
shift
MAXLOAD="$1"
expr "$MAXLOAD" '*' "0" 2>&1 >/dev/null
if [ -z "$MAXLOAD" -o "$?" -eq "2" ]; then
print_help
echo -e "\tWrong formated parameter for maxload ...\n\nEXIT\n"
exit
fi
;;
-t|--targetdir)
shift
TARGETDIR="$1"
if [ ! -d "$TARGETDIR" ]; then
print_help
echo -e "\t$TARGETDIR is not an directory or does not exist ...\n\nEXIT\n"
exit
fi
;;
-s|--sleep)
shift
SLEEPVAL="$1"
expr "$SLEEPVAL" '*' "0" 2>&1 >/dev/null
if [ -z "$SLEEPVAL" -o "$?" -eq "2" ]; then
print_help
echo -e "\tWrong formated parameter for sleep ...\n\nEXIT\n"
exit
fi
;;
-M|--mailto)
shift
MAIL="$1"
if [ -z "$MAIL" ]; then
print_help
echo -e "\tNo email address after --mailto parameter ...\n\nEXIT\n"
exit
fi
;;
-d)
;;
*)
echo UNKNOWN PARAMETER $1...
exit
;;
esac
shift
done
while true; do
LOAD="$(load 1)"
if [ "$LOAD" -gt "$MAXLOAD" ];then
debug 'LOAD > '$MAXLOAD'! -->' "$LOAD"
write_proc_report "$LOAD"
fi
sleep $SLEEPVAL
done
exit
top -n1 -b
iostat -x