Page 1 of 1
Auslastung überwachen/auswerten
Posted: 2005-10-20 20:46
by martin.kle
Hallo zusammen
Gibt es eine Möglichkeit um die Auslastung bei Servern zu überwachen und auszuwerten, zb welche Anwenung, Domain hat eine hohe Auslastung, Dateien welche oft aufgerufen werden etc.?
Bin dankbar für jeden Hinweis.
Re: Auslastung überwachen/auswerten
Posted: 2005-10-20 20:55
by hornox
Gibt es eine Möglichkeit um die Auslastung bei Servern zu überwachen und auszuwerten, zb welche Anwenung, Domain hat eine hohe Auslastung, Dateien welche oft aufgerufen werden etc.?
JaBin dankbar für jeden Hinweis.
http://google.de/search?q=webalizer
http://google.de/search?q=MRTG
Re: Auslastung überwachen/auswerten
Posted: 2005-10-20 21:02
by martin.kle
Danke für deine Antwort. Webalizer kenn ich.
Was ich suche sollte jedoch alle Domains auf dem Server
berücksichtigen.
Webalizer kann man dafür doch nicht gebrauchen oder?
Re: Auslastung überwachen/auswerten
Posted: 2005-10-20 21:08
by Joe User
martin.kle wrote:Webalizer kann man dafür doch nicht gebrauchen oder?
Eigene access_log und webalizer.conf pro Domain anlegen und per
webalizer -c /path/to/webalizer.conf auswerten.
Re: Auslastung überwachen/auswerten
Posted: 2005-10-20 21:11
by martin.kle
also entweder verstehe ich euch nicht oder ihr mich nicht ;-)
also das ganze nochmals von vorne.
ich habe einen server mit rund 30 webseiten darauf. von zeit zu zeit ist die auslastung verdammt hoch.
ich suche deshalb ein tool welches meinen server überwacht sprich mir sagt wieso der server so ausgelastet ist, welcher dienst wieviel leistung braucht oder etc.
hoffe ist jetzt verständlicher ;-)
PS: darf auch etwas kosten
Re: Auslastung überwachen/auswerten
Posted: 2005-10-25 01:23
by paulchen
hmmm...wenns um die Last auf der Kiste geht, dann kannste das mit nem kleinen Skript checken. Ich habe bei mir folgendes Skript jede Minute laufen: "/root/checkup"
Code: Select all
PART1=`date |awk -v ORS=" " '{print $2 " " $3 " " $4}'`
PART4=`cat /proc/loadavg|awk '{print $1 " " $2 " " $3 " " $4 }'`
PART5=`df|grep sda7 | awk -v ORS=" " '{print $4}'`
echo $PART1 $PART4 $PART5 >> /root/uptime.log
# ************** Check auf hohe Systemlast LOAD groesser 3 im 15 min-Schnitt
LOADLAST=`cat /proc/loadavg|awk '{print $3 }'|cut -c1-1`
# if [ $LOADLAST = 3 ]
# then
# echo "hohe Last"
# date > /root/hohelast.now
# echo "**********************************************************" >> /root/hohelast.now
# top b n 1 >> /root/hohelast.now
# ps aux >> /root/hohelast.now
# SUBJECT="Root-Warnung: hohe Systemlast - LOAD groesser 3"
# mail -s "$SUBJECT" ich@firma.de < /root/hohelast.now
# mail -s "$SUBJECT" ich@home.de < /root/hohelast.now
# exit 1
# fi
# ************** Check auf hohe Systemlast LOAD groesser 5 im 15 min-Schnitt
# LOADLAST=`cat /proc/loadavg|awk '{print $3 }'|cut -c1-1`
if [ $LOADLAST = 5 ]
then
# echo "hohe Last"
date > /root/hohelast.now
echo "**********************************************************" >> /root/hohelast.now
top b n 1 >> /root/hohelast.now
ps aux >> /root/hohelast.now
SUBJECT="Root-SV10-Warnung: hohe Systemlast - LOAD groesser 5"
mail -s "$SUBJECT" ich@firma.de < /root/hohelast.now
mail -s "$SUBJECT" ich@home.de < /root/hohelast.now
exit 1
fi
# ************** Check auf hohe Systemlast LOAD groesser 9 im 15 min-Schnitt
# LOADLAST=`cat /proc/loadavg|awk '{print $3 }'|cut -c1-1`
if [ $LOADLAST = 9 ]
then
# echo "hohe Last"
date > /root/hohelast.now
echo "**********************************************************" >> /root/hohelast.now
top b n 1 >> /root/hohelast.now
ps aux >> /root/hohelast.now
SUBJECT="Root-SV10-Warnung: SEHR hohe Systemlast - LOAD groesser 9"
mail -s "$SUBJECT" ich@firma.de < /root/hohelast.now
mail -s "$SUBJECT" ich@home.de < /root/hohelast.now
exit 1
fi
Das schreibt jede Minute eine Zeile in die Datei "/root/uptime.log". Sieht dann z.B. so aus:
Code: Select all
server:~ # cat uptime.log
Oct 25 00:47:21 0.00 0.01 0.00 4/145 43031264
Oct 25 00:50:01 0.00 0.00 0.00 5/149 42922144
Oct 25 00:51:01 0.15 0.03 0.01 3/149 42882156
Oct 25 00:52:01 0.11 0.04 0.01 3/148 42840832
Oct 25 00:53:01 0.04 0.03 0.00 3/148 42801012
Oct 25 00:54:01 0.01 0.02 0.00 1/148 42767528
Oct 25 00:55:01 0.00 0.02 0.00 1/150 42757704
Oct 25 00:56:01 0.00 0.01 0.00 2/147 42757748
Oct 25 00:57:01 0.00 0.00 0.00 1/148 42757748
Oct 25 00:58:01 0.00 0.00 0.00 2/147 42757748
Oct 25 00:59:01 0.00 0.00 0.00 3/147 42757748
Oct 25 01:00:01 0.00 0.00 0.00 7/154 42757748
Oct 25 01:01:01 0.00 0.00 0.00 3/147 42756352
Oct 25 01:02:01 0.04 0.01 0.00 1/148 42720072
Wenn man sich das mal so ansieht, bekommste schnell nen Ueberblick, wann Dein Server wieviel zu tun hat...
Sollte die Last auf dem Server hoch werden (ich habe mal LOAD von 5 im 15min-Schnitt angesetzt), dann schreibt Dir der Server ne Mail mit den aktuell laufenden Prozessen.
So..damit das Teil jede Minute checkt noch folgende Zeile in die Crontab rein:
Code: Select all
* * * * * /root/checkup >/dev/null
Gruss Ove