Search Results

Search found 3392 results on 136 pages for 'average joe'.

Page 4/136 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • c++ programming- Tryin to get a number within an array that is twice the average

    - by max
    i have been assigned to set up an array with points. I am told to get the maximum value, average, nd within this same array, if any point in the array is twice the average, i should cout an "outlier." So far i have gotten the average and maximum numbers in the array. but i am unable to set the programme to cout the outlier. Instead it gives me a multiple of the average. pls help! here is the programme; int main() { const int max = 10; int ary[max]={4, 32, 9, 7, 14, 12, 13, 17, 19, 18}; int i,maxv; double out,sum=0; double av; maxv= ary[0]; for(i=0; i } cout<<"maximum value: "< for(i=0; i sum = sum + ary[i]; av = sum / max; } cout<<"average: "< out = av * 2; if(ary[i]out) { cout<<"outlier: "< return 0; }

    Read the article

  • numpy array mapping and take average

    - by user566653
    Dear all, I have three array value = np.array ([1, 3, 3, 5, 5, 7, 3]) index = np.array ([1, 1, 3, 3, 6, 6, 6]) data = np.array ([1, 2, 3, 4, 5, 6]) and want to take average for item of "value" by array "index", and assign a new array with value of "data", such as [2, nan, 4, nan, nan, 5] first value is the average of 1st and 2nd of "value" second value is nan because there is not any key in "index" third value is the average of 3rd and 4th of "value" ... Thanks for your help!!! Regards, Roy

    Read the article

  • Average Difference and Direction Between Values in Excel with Blanks

    - by 114
    I have a sheet that looks something like this: Sheet 1 1 2 3 4 5 6 7 8 9 10 11 1 6 2 3 5 3 4 2 4 9 4 5 6 4 6 6 7 5 3 3 3 10 8 4 8 8 9 4 11 12 12 6 10 11 8 5 5 4 9 4 7 6 What I would like to be able to do is find the average difference and direction between values in each column. For example, the first 4 rows would look like: Average Difference # + Movements # -Movements 1 2 2 1 0 3 4 (2+5+5)/3 2 1 Blanks represent N/A values due to insufficient information, and differences are calculated successively i.e. col2-col1, col3-col2, col4-col3 If I just take the differences and make a duplicate table with the formula =C2-B2 copied across issues arise whenever there is a blank space between two values or at the beginning of the row. Is there an easy way to fix this or another way to do this that I might be missing?

    Read the article

  • How can you get the average of the count of records in Reporting Services

    - by Tim Coker
    I have a report where I'm counting the number of records for a day. At the bottom, I have the total records for that time period. I'd like to display the average records for each day. An example: Day Tests 1/1/2010 5 1/2/2010 10 1/3/2010 8 Average 7.7 Total 23 I can accomplish this by aggregating the data by date in SQL then just doing the Average and Sum of the count from SQL, but that would complicate the report considerably as I'm doing other column filters for the types of tests performed. There seems to be a simple way to accomplish this that I'm missing. I can't do Average(Count(field)) in SSRS, unfortunately. Is there something I'm missing, or is there really not a way to accomplish this simply?

    Read the article

  • Getting average from 3 columns in MS SQL

    - by barbarian
    I have table with 3 columns(smallint) in MS SQL 2005. Table Ratings ratin1 smallint, ratin2 smallint ratin3 smallint These columns can have values from 0 to 5 How to select average value of these fields, but only compare fields where value is greater then 0. So if column values are 1,3,5 - average had to be 3 if values are 0,3,5 - average had to be 4

    Read the article

  • MySQL : AVG of AVG impossible ?

    - by Tristan
    Hi, I want to do an average : the problem is for 1 item i'm calculating the AVG of each elements (working) but as soon as i want the GLOBAL average the average of the elements (something and foo) it doesn't work. I need to do that because i want to sort the result by the global average SELECT AVG(AVG(something)+AVG(foo)) /2 as moy ..... ORDER BY moy DESC Thanks,

    Read the article

  • No clue for high load average on top

    - by Oz.
    We have several machines on Amazon (ec2) of the type c1.xlarge with 16 cpus, running the Amazon AMI. Details on the machine: 7 GB of memory 20 EC2 Compute Units (8 virtual cores with 2.5 EC2 Compute Units each) 1690 GB of instance storage 64-bit platform I/O Performance: High API name: c1.xlarge One out of the several machines is showing a high load average, since we have run the last yum upgrade a couple of weeks a go. We did not yet update the other machines, and everything looks normal on them. The strange thing is that the top command not showing any hint for the cause of the load. CPUs are 4.8%us, 1.1%sy, 0.0%ni, 94.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st(see below). Mem is about 1.5GB free. Any idea what could it be, or where else can we check? Many thanks for the help. # # top # top - 07:57:42 up 4:18, 1 user, load average: 1.36, 1.45, 1.47 Tasks: 131 total, 1 running, 130 sleeping, 0 stopped, 0 zombie Cpu(s): 4.8%us, 1.1%sy, 0.0%ni, 94.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 7120092k total, 5644920k used, 1475172k free, 532888k buffers Swap: 0k total, 0k used, 0k free, 3463936k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1557 mysql 20 0 1829m 374m 6448 S 14.3 5.4 11:15.09 mysqld 6655 apache 20 0 416m 49m 3744 S 9.3 0.7 0:04.85 httpd 27683 apache 20 0 421m 54m 3708 S 9.0 0.8 0:00.99 httpd 6682 apache 20 0 424m 57m 3788 S 8.3 0.8 0:03.81 httpd 16816 apache 20 0 419m 51m 3760 S 4.3 0.7 0:04.09 httpd 22182 apache 20 0 417m 50m 3756 S 1.7 0.7 0:06.34 httpd 219 root 20 0 0 0 0 S 0.3 0.0 0:00.34 kworker/7:1 699 root 20 0 0 0 0 S 0.3 0.0 0:00.40 kworker/3:1 1 root 20 0 19376 1508 1212 S 0.0 0.0 0:00.29 init 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 0:00.71 ksoftirqd/0

    Read the article

  • load average in top and procs in vmstat

    - by Mingfei.hua
    As far as I know, the load average in top is the numbers of precess(threads) in running or uninterrupted sleep status, So it should be equal to (procs-r +1 )+ procs-b in vmstat, but in practice, this two number always have big gap. Any wrongs in my understanding, appreciate so much if some guys give me some guide. top - 05:34:50 up 1 day, 20:56, 5 users, load average: 2.83, 2.67, 1.62 Tasks: 79 total, 1 running, 78 sleeping, 0 stopped, 0 zombie Cpu(s): 6.8%us, 1.8%sy, 0.0%ni, 91.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.4%st Mem: 1758000k total, 582636k used, 1175364k free, 103932k buffers Swap: 917500k total, 0k used, 917500k free, 180868k cached procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 1182524 103784 180860 0 0 1 9 6 53 7 2 91 0 0 0 0 0 1182524 103784 180860 0 0 0 36 70 117 0 0 100 0 0 0 0 0 1182516 103784 180860 0 0 0 0 73 132 0 1 100 0 0 0 0 0 1182516 103784 180860 0 0 0 0 60 127 0 0 100 0 0 1 0 0 1182516 103784 180860 0 0 0 0 62 102 0 0 100 0 0 0 0 0 1182628 103784 180860 0 0 0 0 289 238 1 2 97 0 0 2 0 0 1152160 103784 180892 0 0 0 8 1481 2371 54 12 34 0 0 1 0 0 1182192 103784 180860 0 0 0 0 681 834 19 4 78 0 0 0 0 0 1182200 103784 180860 0 0 0 0 80 147 0 1 100 0 0 0 0 0 1182200 103784 180860 0 0 0 0 53 107 0 0 100 0 0 0 0 0 1182208 103788 180856 0 0 0 72 64 123 0 0 100 1 0

    Read the article

  • ubuntu's average load never below "0.00 0.01 0.05"

    - by Karma Fusebox
    I have several ubuntu 12.04 VMs running on a ubuntu 12.04 KVM host. Those of the virtual machines that are totally idle with no services (except syslog and the other "small" standard stuff of a fresh installation) show a constant load of "0.00 0.01 0.05" in top/htop as average 1/5/15. When there are "real" applications running, the load averages behave perfectly normal but they never fall below the mentioned values. While this doesn't affect performance at all and could easily be ignored, it screws up the monitoring graphs in a very annoying way: (Notice how load15 behaves nicely if 0.05 for a short time in the right half of the pic) Unfortunately I don't know what diagnostic outputs might be helpful for you, so here's some default stuff: # top top - 16:31:01 up 1:05, 1 user, load average: 0.00, 0.01, 0.05 Tasks: 62 total, 1 running, 61 sleeping, 0 stopped, 0 zombie Cpu(s): 0.2%us, 0.2%sy, 0.0%ni, 99.2%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1019464k total, 73452k used, 946012k free, 6140k buffers Swap: 0k total, 0k used, 0k free, 22504k cached . # free -m total used free shared buffers cached Mem: 995 72 923 0 6 21 -/+ buffers/cache: 43 951 Swap: 0 0 0 . # iostat -x /dev/vda Linux 3.2.0-32-virtual (vm3) 11/15/2012 _x86_64_ (2 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 0.25 0.00 0.65 0.20 0.24 98.66 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util vda 0.14 0.12 0.51 0.22 6.74 1.46 22.50 0.02 23.26 20.64 29.30 7.63 0.56 Need something else? Has anyone ever seen this behavior? Might this be a bug in kvm/ubuntu/kernel 3.x in the end? Thanks a lot!

    Read the article

  • Apache jamming at low load average

    - by Apikot
    Apache seems to stop responding sometimes even though apache processes are still running. After restarting apache, the load average usually shoots up from 1 - 2 to 13 - 15 in a matter of seconds. What would the cause of this be, or how could I find out why apache stops serving? My httpd.conf is: <IfModule mpm_prefork_module> StartServers 8 MinSpareServers 5 MaxSpareServers 20 MaxClients 50 ServerLimit 50 MaxRequestsPerChild 4000 </IfModule> It's running on an EC2 c1.medium (1.7 GB of memory) Thanks

    Read the article

  • Server load spikes several times a day, load average for the past month is 5 times the load average all year

    - by AMF
    My Munin notifications set up for our (Debian) LAMP cluster have been notifying me continuously that our load on our production machine has been at dangerous levels. While the average load all year typically runs between 2 and 8, the load in the past month and only the past month -- has been skyrocketing to 10, 18, and occasionally even 50-60. The spikes last only 5-10 minutes at a time and occur about every 2-3 hours. The spikes do not effect performance only because I have a script that sends traffic off our server to a mirror CDN when the load goes above 10. I've looked for cron jobs that correlate with this timeframe but there is nothing I can see that would cause this. Site traffic is also normal (we receive about 200K visits per day). I'm also trying to think of anything I've changed around the time this problem began, and I really cannot think of anything. This is probably not much to go on. Maybe there is a clue in the top print-out (below) that I'm not seeing. How do I proceed to find the cause? -- Typical top when the load is NOT spiking: top - 11:13:09 up 472 days, 25 min, 1 user, load average: 6.08, 4.29, 3.80 Tasks: 105 total, 1 running, 104 sleeping, 0 stopped, 0 zombie Cpu(s): 41.2%us, 5.8%sy, 0.0%ni, 49.5%id, 2.7%wa, 0.1%hi, 0.7%si, 0.0%st Mem: 3369592k total, 2166980k used, 1202612k free, 559504k buffers Swap: 2650684k total, 1892k used, 2648792k free, 1129116k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 32046 apache 15 0 36300 12m 9828 S 20 0.4 0:01.97 apache2 32679 apache 15 0 36568 13m 10m S 19 0.4 0:01.69 apache2 31441 apache 15 0 36616 13m 10m S 19 0.4 0:04.13 apache2 31477 apache 15 0 36596 13m 9.8m S 15 0.4 0:01.99 apache2 31993 apache 15 0 36876 16m 12m S 12 0.5 0:02.01 apache2 31782 apache 15 0 36836 14m 10m S 8 0.4 0:02.17 apache2 32198 apache 15 0 36536 13m 10m S 7 0.4 0:01.59 apache2 880 apache 15 0 36508 9708 6236 S 7 0.3 0:00.42 apache2 31945 apache 17 0 36876 16m 13m S 5 0.5 0:03.17 apache2 32197 apache 16 0 36636 10m 7504 S 5 0.3 0:02.70 apache2 32326 apache 15 0 37024 11m 7632 S 5 0.3 0:02.15 apache2 32565 apache 15 0 37280 13m 9.8m S 5 0.4 0:03.75 apache2 32676 apache 15 0 36896 16m 12m S 4 0.5 0:00.95 apache2 32678 apache 15 0 36536 12m 9692 S 4 0.4 0:02.27 apache2 974 apache 16 0 37064 9888 6016 D 4 0.3 0:00.13 apache2 32150 apache 16 0 36832 13m 10m S 3 0.4 0:01.74 apache2 31780 apache 16 0 36848 11m 7660 S 3 0.3 0:02.87 apache2

    Read the article

  • CPU/Mem/Disk utilization (average) after process has completed

    - by BassKozz
    Ubuntu Server 9.10 So there is the time command which will show you the time it took for a specific process/command to run after the command has completed. For example: :~$ time ls real 0m0.020s user 0m0.000s sys 0m0.000s I'd like to also collect the average CPU usage, Memory, and Disk (i/o) utilization after the process has completed using time (or another command if necessary). How can I accomplish this? Mainly I am using this to benchmark MySQL import performance using different innodb_buffer_pool_size settings.

    Read the article

  • 4.5 Load average on single CPU

    - by Webnet
    I'm currently looking at... top - 16:27:37 up 27 min, 1 user, load average: 4.96, 3.75, 2.87 Tasks: 141 total, 6 running, 135 sleeping, 0 stopped, 0 zombie Cpu(s): 91.4%us, 6.9%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 1.3%si, 0.0%st Mem: 514952k total, 507500k used, 7452k free, 5652k buffers Swap: 1044184k total, 281400k used, 762784k free, 89164k cached This is a single 2.0 Ghz CPU with 2 GB RAM Is it time for an upgrade? I'm watching and it seems to stick around 50% CPU "us" which I assume means usage.

    Read the article

  • mysql: Average over multiple columns in one row, ignoring nulls

    - by Sai Emrys
    I have a large table (of sites) with several numeric columns - say a through f. (These are site rankings from different organizations, like alexa, google, quantcast, etc. Each has a different range and format; they're straight dumps from the outside DBs.) For many of the records, one or more of these columns is null, because the outside DB doesn't have data for it. They all cover different subsets of my DB. I want column t to be their weighted average (each of a..f have static weights which I assign), ignoring null values (which can occur in any of them), except being null if they're all null. I would prefer to do this with a simple SQL calculation, rather than doing it in app code or using some huge ugly nested if block to handle every permutation of nulls. (Given that I have an increasing number of columns to average over as I add in more outside DB sources, this would be exponentially more ugly and bug-prone.) I'd use AVG but that's only for group by, and this is w/in one record. The data is semantically nullable, and I don't want to average in some "average" value in place of the nulls; I want to only be counting the columns for which data is there. Is there a good way to do this? Ideally, what I want is something like UPDATE sites SET t = AVG(a*a_weight,b*b_weight,...) where any null values are just ignored and no grouping is happening.

    Read the article

  • Low load average with plenty of cpu-intersive processes

    - by sds
    I see loadavg at about 1 with at least 3 processes running at full tile. How can that be? top - 11:48:32 up 147 days, 5:38, 8 users, load average: 1.08, 1.11, 1.05 Tasks: 416 total, 4 running, 410 sleeping, 2 stopped, 0 zombie Cpu0 : 43.3%us, 13.7%sy, 0.0%ni, 43.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu1 : 48.8%us, 12.4%sy, 0.0%ni, 38.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu2 : 0.7%us, 0.7%sy, 0.0%ni, 98.3%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu3 : 99.3%us, 0.7%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu4 : 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu5 : 5.7%us, 0.7%sy, 0.0%ni, 93.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu6 : 2.3%us, 0.3%sy, 0.0%ni, 97.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu7 : 0.3%us, 0.3%sy, 0.0%ni, 99.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu8 : 38.4%us, 17.4%sy, 0.0%ni, 44.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu9 : 43.4%us, 13.5%sy, 0.0%ni, 43.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu10 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu11 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu12 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu13 : 0.3%us, 0.3%sy, 0.0%ni, 99.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu14 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu15 : 1.0%us, 0.7%sy, 0.0%ni, 98.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 132145404k total, 88125080k used, 44020324k free, 516476k buffers Swap: 8388600k total, 620232k used, 7768368k free, 55729064k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 25424 jonathan 20 0 4404m 4.1g 3268 R 99.7 3.3 212:58.17 python2.7 20939 sam 20 0 908m 733m 3376 R 81.2 0.6 603:08.07 python2.7 20987 sam 20 0 908m 732m 3376 R 79.8 0.6 598:49.18 python2.7 25428 jonathan 20 0 774m 164m 15m S 14.2 0.1 24:22.60 java 20996 sam 20 0 98.4m 7780 1880 S 4.3 0.0 17:48.15 vw 20941 sam 20 0 161m 70m 1880 S 3.0 0.1 18:10.03 vw 20940 sam 20 0 98.4m 8068 1880 S 2.6 0.0 18:06.28 vw 20942 sam 20 0 98.4m 8080 1880 S 2.6 0.0 17:39.45 vw 20944 sam 20 0 161m 71m 1880 S 2.6 0.1 17:29.29 vw 20947 sam 20 0 161m 71m 1880 S 2.6 0.1 17:25.58 vw 20959 sam 20 0 161m 70m 1880 S 2.6 0.1 17:28.00 vw 20962 sam 20 0 161m 70m 1880 S 2.6 0.1 17:26.96 vw 20963 sam 20 0 98.4m 8076 1880 S 2.6 0.0 18:07.19 vw 20965 sam 20 0 161m 71m 1880 S 2.6 0.1 18:08.13 vw 20995 sam 20 0 161m 71m 1880 S 2.6 0.1 17:38.67 vw 6399 root 20 0 558m 19m 5028 S 2.3 0.0 4329:56 BESClient 20945 sam 20 0 98.4m 8068 1880 S 2.3 0.0 17:35.38 vw 20948 sam 20 0 98.4m 8068 1880 S 2.3 0.0 17:26.01 vw 20950 sam 20 0 161m 70m 1880 S 2.3 0.1 17:25.79 vw 20952 sam 20 0 98.4m 8076 1880 S 2.3 0.0 17:32.94 vw 20955 sam 20 0 161m 70m 1880 S 2.3 0.1 17:26.61 vw 20956 sam 20 0 98.4m 8072 1880 S 2.3 0.0 17:34.76 vw 20960 sam 20 0 98.4m 8072 1880 S 2.3 0.0 17:34.04 vw Adding up CPU loads gives about 300%. The top process list also adds up to about 300%. Why is load average about 1?

    Read the article

  • postgresql weighted average?

    - by milovanderlinden
    say I have a postgresql table with the following values: id | value ---------- 1 | 4 2 | 8 3 | 100 4 | 5 5 | 7 If I use postgresql to calculate the average, it gives me an average of 24.8 because the high value of 100 has great impact on the calculation. While in fact I would like to find an average somewhere around 6 and eliminate the extreme(s). I am looking for a way to eliminate extremes and want to do this "statistically correct". The extreme's cannot be fixed. I cannot say; If a value is over X, it has to be eliminated. I have been bending my head on the postgresql aggregate functions but cannot put my finger on what is right for me to use. Any suggestions?

    Read the article

  • Load average is have been high over some period

    - by user111196
    We have a dedicated MySQL server and below is the a snapshot of the top. The load average has been staying at nearly 100 for an hour plus ready. top - 20:54:28 up 7:31, 2 users, load average: 83.08, 96.88, 106.23 Tasks: 278 total, 2 running, 274 sleeping, 2 stopped, 0 zombie Cpu0 : 18.8%us, 10.2%sy, 0.0%ni, 70.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu1 : 51.2%us, 4.3%sy, 0.0%ni, 44.2%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu2 : 9.0%us, 10.3%sy, 0.0%ni, 80.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu3 : 18.8%us, 7.4%sy, 0.0%ni, 73.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu4 : 7.8%us, 8.8%sy, 0.0%ni, 83.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu5 : 10.3%us, 8.4%sy, 0.0%ni, 81.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu6 : 6.2%us, 7.5%sy, 0.0%ni, 86.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu7 : 6.2%us, 6.2%sy, 0.0%ni, 87.3%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu8 : 8.8%us, 10.4%sy, 0.0%ni, 80.5%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu9 : 63.7%us, 4.6%sy, 0.0%ni, 12.2%id, 0.0%wa, 4.3%hi, 15.2%si, 0.0%st Cpu10 : 9.2%us, 10.2%sy, 0.0%ni, 80.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu11 : 17.3%us, 5.9%sy, 0.0%ni, 76.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu12 : 8.0%us, 8.7%sy, 0.0%ni, 83.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu13 : 10.9%us, 7.4%sy, 0.0%ni, 81.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu14 : 6.2%us, 6.9%sy, 0.0%ni, 86.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu15 : 4.8%us, 6.1%sy, 0.0%ni, 89.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 33009800k total, 23174396k used, 9835404k free, 120604k buffers Swap: 35061752k total, 0k used, 35061752k free, 16459540k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3341 mysql 20 0 14.3g 4.6g 4240 S 417.8 14.5 1673:51 mysqld 24406 root 20 0 15008 1292 876 R 0.3 0.0 0:00.19 top 1 root 20 0 4080 852 608 S 0.0 0.0 0:01.92 init 2 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root RT -5 0 0 0 S 0.0 0.0 0:00.32 migration/0 4 root 15 -5 0 0 0 S 0.0 0.0 0:00.29 ksoftirqd/0 5 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0 6 root RT -5 0 0 0 S 0.0 0.0 0:03.21 migration/1 7 root 15 -5 0 0 0 S 0.0 0.0 0:00.07 ksoftirqd/1 8 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/1 9 root RT -5 0 0 0 S 0.0 0.0 0:00.17 migration/2 10 root 15 -5 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/2 11 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/2 12 root RT -5 0 0 0 S 0.0 0.0 0:00.32 migration/3 13 root 15 -5 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/3 14 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/3 15 root RT -5 0 0 0 S 0.0 0.0 0:00.10 migration/4 16 root 15 -5 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/4 17 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/4 18 root RT -5 0 0 0 S 0.0 0.0 0:00.35 migration/5 We have also tried to run this command. What else command can help us diagnose the exact problem of this high load? netstat -nat |grep 3306 | awk '{print $6}' | sort | uniq -c | sort -n 1 LISTEN 1 SYN_RECV 410 ESTABLISHED 964 TIME_WAIT Output of vmstat 1: ---------------memory--------------- --swap-- --io-- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 2 0 0 12978936 30944 15172360 0 0 259 3 184 265 6 6 77 12 0

    Read the article

  • Get Average Using LINQ

    - by obautista
    Hoping someone can help me with the LINQ syntax to calculate an average. For example, I have the following LINQ query: var rates = from rating in ctx.Rates where rating.Id == Id select new { UserId = rating.UserId, Rating = rating.Rating }; If 10 records are returned, I need to calculate average on the Rating field. It is defined as as a Double in my DB. I am using LINQ to EF. So I would be assigning the UserId, MiscId, and the Rating would be the average on the records returned. I am passing one object back to the client code.

    Read the article

  • Return segmented average from SQL Query?

    - by Guillaume Filion
    Hi, I measure the load on DNS servers every minute and store that into an SQL DB. I want to draw a chart of the load for the last 48 hours. That's 69120 (48*24*60) data points but my chart's only 800 pixels wide so to make things faster I would like my SQL query to return only ~800 data points. It's seems to me like a pretty standard thing to do, but I've been searching the web and in books for such a thing for a while now and the closest I was able to find was a rolling average. What I'm looking for a more of a "segmented average": divide the 69120 data points in ~800 segments, then average each segment. My SQL table is: CREATE TABLE measurements ( ip int, measurement_time int, queries int, query_time float ) My query looks like this SELECT ip, queries FROM measurements WHERE measurement_time>(time()-172800) Thanks a lot!

    Read the article

  • Average of a Sum in Mysql query

    - by chupeman
    I am having some problems creating a query that gives me the average of a sum. I read a few examples here in stackoverflow and couldn't do it. Can anyone help me to understand how to do this please? This is the data I have: Basically I need the average transaction value by cashier. I can't run a basic avg because it will take all rows but each transaction can have multiple rows. At the end I want to have: Cashier| Average| 131 | 44.31 |(Which comes from the sum divided by 3 transactions not 5 rows) 130 | 33.15 | etc. This is the query I have to SUM the transactions but don't know how or where to include the AVG function. SELECT `products`.`Transaction_x0020_Number`, Sum(`products`.`Sales_x0020_Value`) AS `SUM of Sales_x0020_Value`, `products`.`Cashier` FROM `products` GROUP BY `products`.`Transaction_x0020_Number`, `products`.`Date`, `products`.`Cashier` HAVING (`products`.`Date` ={d'2010-06-04'}) Any help is appreciated.

    Read the article

  • Load Average runaway

    - by mewrei
    Is there any way to chase down lockups and runaway load averages? Every so often (pretty randomly) I'll get my load average spike up over 5 usually to around 10-15 and sometimes as high as 75 (dual core machine), and cause my system to lock for an indeterminate amount of time. The only thing I can possibly chase it to is using nVidia fakeraid (RAID-1) with JFS on top of that for my /home partition. Also I noticed that when my load averages spike, the power management system doesn't step up my processor speed from 1.6 to its maximum 2.13Ghz clock speed (not sure if this makes a huge difference with this problem). Any ideas?

    Read the article

  • Virtual Machine Manager 2012 CPU Average

    - by Grant
    What exactly is the CPU Average field in VMM 2012 showing me? I'm running Server 2008 R2 with VMM 2012. My server has 2x16 core CPUs installed. An example virtual machine has 4 virtual processors, and shows 20% CPU usage. Is that: 20% of the entire system's available CPU power? 20% of 4 of the 32 core's CPU power? 20% of one core's CPU? (in which case it could go as high as 400%) Something else entirely? How can I tell how much of the entire system's CPU power is being used (all 32 cores)? Edit: Well, I can tell for sure it's not 20% of the entire system's CPU power - since the entire server's CPU averages add up to well over 100% right now.

    Read the article

  • How to calculate the average rgb color values of a bitmap

    - by Matthias
    In my C# (3.5) application I need to get the average color values for the red, green and blue channels of a bitmap. Preferably without using an external library. Can this be done? If so, how? Thanks in advance. Trying to make things a little more precise: Each pixel in the bitmap has a certain RGB color value. I'd like to get the average RGB values for all pixels in the image.

    Read the article

  • Ruby on Rails activerecord find average in one sql and Will_Paginate

    - by Darkerstar
    Hi all I have the following model association: a student model and has_many scores. I need to make a list showing their names and average, min, max scores. So far I am using student.scores.average(:score) on each student, and I realise that it is doing one sql per student. How can I make the list with one joined sql? Also how would I use that with Will_Paginate plugin? Thank you

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >