View Full Version : Monitoring server resources
matta
03-01-2005, 09:17 PM
Many are wondering how to monitor resources inside their VM's so they can get a good overview and history of how everything is performing. For this there is the "sysstat" package that is included with most every distribution.
A general overview of common functions..
To view CPU history: sar
To view run queue/process list size and load averages: sar -q
To view swap activity: sar -W
Swap activity is more important than swap usage. You might be using swap space, but it an idle program that is swapped out. If swap activity is high then it means you are constantly swapping in/out which is causing the disks to thrash.
sar has many more options, these are just the few that we find ourselves using more commonly.
Fuzzyman
10-13-2005, 04:26 PM
I tried to use sar and got :
-bash: sar: command not found
So I did : apt-get install sysstat
Which whirred away and semmed quite happy.
Then I did sar and got :
Cannot open /var/log/sysstat/sa13: No such file or directory
Any clues ?
Fuzzyman
matta
10-13-2005, 05:17 PM
sysstat collects statistics every 10 minutes, you need to let it collect a few times before it will return meaningful statistics.
gvartser
12-13-2005, 02:51 PM
[QUOTE=Fuzzyman]I tried to use sar and got :
-bash: sar: command not found
So I did : apt-get install sysstat
Which whirred away and semmed quite happy.
Then I did sar and got :
Cannot open /var/log/sysstat/sa13: No such file or directory
Any clues ?
Fuzzyman[/QUOTE]
Maby you already found the answere to this one "old post".
Anyway,
here is what I did to make it work..
1. Edit the /etc/default/sysstat:
-> Set ENABLED="[COLOR=YellowGreen]true[/COLOR]" - (Default set to "false")
2. Then start sysstat:
-> /etc/init.d/sysstat start
3. Check var/log/sysstat/ and you will find the file that were missing..
4. Run sar.
Done..
Best Regz,
/Gvartser
mikelp
12-17-2005, 03:50 PM
you can also use the commands free and top
darin_arrick
01-11-2006, 06:02 AM
I understand roughly how Xen works, and I understand roughly how each virtual server is allocated resources.
If I've got this all right, the following happens: if no one else is on my server, I basically have 100% of the CPU to myself (minus the Xen overhead which is, what, 10%?). As other people do things, virtual servers get slices based on their CPU allocation. If the server is at 100% load you are guaranteed at least your minimum number of slices for CPU.
So, here's my question:
How can I see what the "max CPU usage" is on my virtual server? Basically, this is somewhat like "the load of the machine itself" filtered through my minimum CPU slice allocation. I would be able to see how much of the actual CPU time I am using. If everyone's compiling kernels at the same time, of course I would have a much smaller "slice". But, if I'm a new customer, on a new machine, I may have 90% of all available CPU cycles. This may need some sort of intermittent CPU test, like running a loop of 1000 iterations and timing it.
Ideas? Suggestions? Blatant command lines? :-P
sebyte
04-01-2006, 05:16 PM
Earlier in this thread gioeleb lamented the lack of lighttpd in Debian Sarge and another user suggested downloading and building from source.
An easier way is to use backports.org. Adding their repository to your sources.list allows you to install packages only otherwise available in testing without introducing the instability usually inherent in mixing trees. Although not an 'official' Debian repository, it may as well be:
[color=Blue]http://backports.org[/color]
Add the following line to your sources.list:
deb http://www.backports.org/debian/ sarge-backports mainAnd then update and install:
$ sudo apt-get update
[...]
$ sudo apt-get install lighttpd
vBulletin v3.0.6, Copyright ©2000-2009, Jelsoft Enterprises Ltd.