Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-13-2012, 05:27 AM
|
#1
|
|
LQ Newbie
Registered: Nov 2012
Posts: 5
Rep: 
|
Measure load of ubuntu server
I have Ubuntu server and apache2 installed on it. I want to benchmark it using ab tool from another machine. I want to know how measure load of this program. In top is showing this:
Code:
top - 06:02:19 up 3 min, 2 users, load average: 0.28, 0.26, 0.12
Tasks: 94 total, 2 running, 92 sleeping, 0 stopped, 0 zombie
Cpu(s): 67.2%us, 5.5%sy, 0.0%ni, 26.3%id, 0.5%wa, 0.0%hi, 0.5%si, 0.0%st
Mem: 499320k total, 342028k used, 157292k free, 42504k buffers
Swap: 514044k total, 0k used, 514044k free, 71388k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1521 www-data 20 0 49180 22m 4144 S 23 4.6 0:00.68 apache2
1520 www-data 20 0 49180 22m 4152 S 22 4.6 0:00.66 apache2
1124 www-data 20 0 49180 22m 4152 S 22 4.6 0:00.70 apache2
1519 www-data 20 0 49180 22m 4152 S 20 4.6 0:00.70 apache2
1525 www-data 20 0 49180 22m 4144 S 16 4.6 0:00.47 apache2
1123 www-data 20 0 49168 22m 4152 S 9 4.6 0:00.78 apache2
1125 www-data 20 0 49168 22m 4152 S 9 4.6 0:00.77 apache2
1126 www-data 20 0 49168 22m 4152 S 9 4.6 0:00.73 apache2
1127 www-data 20 0 49168 22m 4152 S 9 4.6 0:00.74 apache2
1523 www-data 20 0 42896 14m 3388 R 5 3.1 0:00.14 apache2
1038 whoopsie 20 0 24476 3720 2856 S 0 0.7 0:00.01 whoopsie
1089 root 20 0 34060 6988 3640 S 0 1.4 0:00.05 apache2
1338 ubuntu 20 0 2832 1192 944 S 0 0.2 0:00.30 top
1417 ubuntu 20 0 9652 1456 824 S 0 0.3 0:00.02 sshd
1 root 20 0 3540 1876 1248 S 0 0.4 0:00.83 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0 0.0 0:00.03 ksoftirqd/0
4 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/0:0
5 root 20 0 0 0 0 S 0 0.0 0:00.48 kworker/u:0
6 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
7 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
8 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/1
9 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/1:0
10 root 20 0 0 0 0 S 0 0.0 0:00.01 ksoftirqd/1
11 root 20 0 0 0 0 S 0 0.0 0:00.17 kworker/0:1
12 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
13 root 0 -20 0 0 0 S 0 0.0 0:00.00 cpuset
14 root 0 -20 0 0 0 S 0 0.0 0:00.00 khelper
15 root 20 0 0 0 0 S 0 0.0 0:00.00 kdevtmpfs
16 root 0 -20 0 0 0 S 0 0.0 0:00.00 netns
17 root 20 0 0 0 0 S 0 0.0 0:00.32 kworker/u:1
18 root 20 0 0 0 0 S 0 0.0 0:00.00 sync_supers
19 root 20 0 0 0 0 S 0 0.0 0:00.00 bdi-default
20 root 0 -20 0 0 0 S 0 0.0 0:00.00 kintegrityd
21 root 0 -20 0 0 0 S 0 0.0 0:00.00 kblockd
22 root 0 -20 0 0 0 S 0 0.0 0:00.00 ata_sff
23 root 20 0 0 0 0 S 0 0.0 0:00.00 khubd
So its difficult to do it without any script or program. How can I do this?
|
|
|
|
11-13-2012, 06:19 AM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
generally the load average value would be good enough: "load average: 0.28, 0.26, 0.12" this shows the 1m 5m and 15m load averages
|
|
|
|
11-13-2012, 06:50 AM
|
#3
|
|
LQ Newbie
Registered: Nov 2012
Posts: 5
Original Poster
Rep: 
|
But I want measure load only for specific time not all uptime of srver.
|
|
|
|
11-13-2012, 07:01 AM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
why is that a but? did you read my reply??
|
|
|
|
11-13-2012, 12:39 PM
|
#5
|
|
LQ Newbie
Registered: Nov 2012
Posts: 5
Original Poster
Rep: 
|
Thanks sorry I was reading in hurry. But this can't help me make charts.
|
|
|
|
11-13-2012, 01:33 PM
|
#6
|
|
Senior Member
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 1,411
Rep: 
|
Quote:
Originally Posted by Fajkowsky
But I want measure load only for specific time not all uptime of srver.
|
sar is a tool that can do as you are asking. In the package sysstat.
NOTE: default install values only collect data every Ten Minutes for 7 days.
During that time, you can inspect the CPU Load for any 10 minute time period by issuing a
Code:
sar -f /var/log/sysstat/sann -q
where nn in /var/log/sysstat/sann above is one of the last 7 days log file.
Getting a "window" of CPU activity Report using sar on a system on the 5th between 3am and 5am is:
Code:
sar -f /var/log/sysstat/sa05 -q -s 03:00:00 -e 05:00:00
and spits out
Code:
Linux 2.6.31-302-ec2 (mysql12) 11/05/2012 _x86_64_ (8 CPU)
03:05:01 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked
03:15:01 AM 24 318 12.86 15.39 15.03 0
03:25:01 AM 7 274 7.25 7.13 11.13 0
03:35:01 AM 20 274 3.34 5.17 8.33 0
03:45:01 AM 5 282 2.67 3.55 6.00 0
03:55:01 AM 8 278 0.32 0.92 3.50 0
04:05:01 AM 4 281 0.25 0.41 2.04 0
04:15:01 AM 4 280 0.89 3.69 3.44 0
04:25:01 AM 26 307 10.98 7.64 5.06 0
04:35:01 AM 27 317 5.85 8.40 7.18 0
04:45:01 AM 3 268 1.87 3.82 5.43 1
04:55:01 AM 15 296 1.83 3.01 4.35 0
Average: 13 289 4.37 5.38 6.50 0
Code:
sudo apt-get install sysstat
I documented some of the various switches that seemed important for Reports here...
I hope that is helpful,
JJ
NOTE0:
Code:
Package isag - Interactive System Activity Grapher for sysstat
Last edited by Habitual; 11-13-2012 at 01:34 PM.
|
|
|
|
11-13-2012, 04:27 PM
|
#7
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
Quote:
Originally Posted by Fajkowsky
Thanks sorry I was reading in hurry. But this can't help me make charts.
|
If you wanted to chart it, why didn't you say so? It certainly CAN help you chart things, but depends on what other tools or frameworks you're working within.
|
|
|
|
11-17-2012, 06:29 AM
|
#8
|
|
Member
Registered: Jul 2003
Posts: 211
Rep:
|
benchmark is in interesting term as it can mean a lot of things to a lot of people.
as previously mentioned loadavg can produce interesting numbers but if you don't really understand what it's telling you it can be more misleading than anything else. I first found this when it was reporting a load of over 80 on a perfectly normal running nfs server.
sar can be helpful but not at a 10 minute interval. personally I think to get an accurate picture of what an application is doing to your system you want to look at everything from cpu, to disk, to memory to network and perhaps other things as well like the number of sockets in use, files open, etc... probably plot them over a reasonable period of time. then you run your application (whatever that means) for some period of time and take measurements and plot them again to compare the two. Also, if the application does some sort of transaction processing, or reading/processig of data, etc, of course you want to load it and see where it falls over. this can all be very complex.
of course I use collectl which I designed for this very type of thing and then pump its output through colplot to get very detailed plots. I use it every day and collect data samples once a second on a ton of servers and make the data available as text through collectl's cli as well as graphics via colplot.
-mark
|
|
|
|
11-17-2012, 07:00 AM
|
#9
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,236
|
Is this not veering a little off-track maybe ?.
Quote:
Originally Posted by Fajkowsky
I have Ubuntu server and apache2 installed on it. I want to benchmark it using ab tool from another machine.
|
Not knowing the least about apache, a quick search found this little gem
Quote:
|
ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving.
|
The loadavg thing is a bit of a side-track here - possibly true of all loadavg discussions.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:08 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|