Description of problem: during testing of bug #451119 I have found that mpstat does not show correct results Version-Release number of selected component (if applicable): sysstat-5.0.5-16.rhel4 How reproducible: always, but may take some time to show Steps to Reproduce: 1. run some cpu intensive task, e.g. cat /dev/urandom > /dev/null 2. watch mpstat with some short interval, not from the system boot (watch mpstat -P ALL 1 1) Actual results: Every 2.0s: mpstat -P ALL 1 1 Thu Jan 15 04:05:43 2009 Linux 2.6.9-78.23.ELsmp (ibm-defiant.rhts.bos.redhat.com) 01/15/2009 04:05:43 AM CPU %user %nice %system %iowait %irq %soft %idle intr/s 04:05:44 AM all 0.00 0.00 25.63 0.00 0.00 0.00 74.37 1062.50 04:05:44 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 100.00 19.79 04:05:44 AM 1 0.00 0.00 1.04 0.00 0.00 0.00 100.00 1042.71 04:05:44 AM 2 0.00 0.00 104.17 0.00 0.00 0.00 0.00 0.00 04:05:44 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 104.17 0.00 Average: CPU %user %nice %system %iowait %irq %soft %idle intr/s Average: all 0.00 0.00 25.63 0.00 0.00 0.00 74.37 1062.50 Average: 0 0.00 0.00 0.00 0.00 0.00 0.00 100.00 19.79 Average: 1 0.00 0.00 1.04 0.00 0.00 0.00 100.00 1042.71 Average: 2 0.00 0.00 104.17 0.00 0.00 0.00 0.00 0.00 Average: 3 0.00 0.00 0.00 0.00 0.00 0.00 104.17 0.00 Expected results: sums for the respective CPUs are 100% - if CPU1 has spent 1.04% time on system tasks during the last second, it could not have been 100% idle; CPU2 could not have been utilized more than 100% by the system as it is not a socialist worker and cannot go beyond it's limits :-) Additional info: I was testing on ibm-defiant.rhts.bos.redhat.com with i386 version
Hello, please could you rebuild and run a version which produces more verbose output: http://people.redhat.com/varekova/sysstat-5.0.5-24.TEST.el4.src.rpm and attach the output here. Thanks a lot.
ok, here are some samples: .qa.[root@x86-64-4as-m1 tmp]# mpstat -P ALL 1 3 Linux 2.6.9-78.ELsmp (x86-64-4as-m1.lab.bos.redhat.com) 01/27/2009 05:58:08 AM CPU %user %nice %system %iowait %irq %soft %idle intr/s 05:58:09 AM all 0.00 0.00 12.50 0.25 0.00 0.00 87.25 1040.00 2609337 111630 960637 624183 4169 13389 280241192 2609337 111630 960737 624185 4169 13389 280241890 05:58:09 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 100.00 368.00 --- 496783 4746 173771 193751 1021 10579 34689589 || 100 --- 496783 4746 173771 193751 1021 10579 34689689 || 100 05:58:09 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 100.00 647.00 --- 404163 33165 160064 112728 1051 659 34858815 || 100 --- 404163 33165 160064 112728 1051 659 34858915 || 100 05:58:09 AM 2 0.00 0.00 0.00 0.00 0.00 0.00 100.00 18.00 --- 351620 32816 135448 122746 1035 524 34926412 || 100 --- 351620 32816 135448 122746 1035 524 34926512 || 100 05:58:09 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 101.00 0.00 --- 288251 4824 116176 26101 63 438 35134947 || 100 --- 288251 4824 116176 26101 63 438 35135048 || 100 05:58:09 AM 4 0.00 0.00 100.00 0.00 0.00 0.00 0.00 6.00 --- 282059 4526 103610 81346 241 325 35098067 || 100 --- 282059 4526 103710 81346 241 325 35098067 || 100 05:58:09 AM 5 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 290153 4068 92139 12629 0 282 35171375 || 100 --- 290153 4068 92139 12629 0 282 35171475 || 100 05:58:09 AM 6 0.00 0.00 0.00 2.00 0.00 0.00 98.00 0.00 --- 259966 23395 97440 64045 671 298 35124788 || 100 --- 259966 23395 97440 64047 671 298 35124886 || 100 05:58:09 AM 7 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 236338 4085 81984 10833 84 281 35237196 || 100 --- 236338 4085 81984 10833 84 281 35237296 || 100 05:58:09 AM CPU %user %nice %system %iowait %irq %soft %idle intr/s 05:58:10 AM all 0.00 0.00 12.48 0.00 0.00 0.00 87.52 1011.00 2609337 111630 960737 624185 4169 13389 280241890 2609337 111630 960837 624185 4169 13389 280242591 05:58:10 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 100.00 10.00 --- 496783 4746 173771 193751 1021 10579 34689689 || 100 --- 496783 4746 173771 193751 1021 10579 34689789 || 100 05:58:10 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1001.00 --- 404163 33165 160064 112728 1051 659 34858915 || 100 --- 404163 33165 160064 112728 1051 659 34859015 || 100 05:58:10 AM 2 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 351620 32816 135448 122746 1035 524 34926512 || 100 --- 351620 32816 135448 122746 1035 524 34926612 || 100 05:58:10 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 288251 4824 116176 26101 63 438 35135048 || 100 --- 288251 4824 116176 26101 63 438 35135148 || 100 05:58:10 AM 4 0.00 0.00 100.00 0.00 0.00 0.00 0.00 0.00 --- 282059 4526 103710 81346 241 325 35098067 || 100 --- 282059 4526 103810 81346 241 325 35098067 || 100 05:58:10 AM 5 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 290153 4068 92139 12629 0 282 35171475 || 100 --- 290153 4068 92139 12629 0 282 35171575 || 100 05:58:10 AM 6 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 259966 23395 97440 64047 671 298 35124886 || 100 --- 259966 23395 97440 64047 671 298 35124986 || 100 05:58:10 AM 7 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 236338 4085 81984 10833 84 281 35237296 || 100 --- 236338 4085 81984 10833 84 281 35237396 || 100 05:58:10 AM CPU %user %nice %system %iowait %irq %soft %idle intr/s 05:58:11 AM all 0.00 0.00 12.50 0.00 0.00 0.00 87.50 1033.00 2609337 111630 960837 624185 4169 13389 280242591 2609337 111630 960937 624185 4169 13389 280243291 05:58:11 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 100.00 14.00 --- 496783 4746 173771 193751 1021 10579 34689789 || 100 --- 496783 4746 173771 193751 1021 10579 34689889 || 100 05:58:11 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1001.00 --- 404163 33165 160064 112728 1051 659 34859015 || 100 --- 404163 33165 160064 112728 1051 659 34859115 || 100 05:58:11 AM 2 0.00 0.00 0.00 0.00 0.00 0.00 100.00 18.00 --- 351620 32816 135448 122746 1035 524 34926612 || 100 --- 351620 32816 135448 122746 1035 524 34926712 || 100 05:58:11 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 288251 4824 116176 26101 63 438 35135148 || 100 --- 288251 4824 116176 26101 63 438 35135248 || 100 05:58:11 AM 4 0.00 0.00 100.00 0.00 0.00 0.00 0.00 0.00 --- 282059 4526 103810 81346 241 325 35098067 || 100 --- 282059 4526 103910 81346 241 325 35098067 || 100 05:58:11 AM 5 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 290153 4068 92139 12629 0 282 35171575 || 100 --- 290153 4068 92139 12629 0 282 35171675 || 100 05:58:11 AM 6 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 259966 23395 97440 64047 671 298 35124986 || 100 --- 259966 23395 97440 64047 671 298 35125086 || 100 05:58:11 AM 7 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 236338 4085 81984 10833 84 281 35237396 || 100 --- 236338 4085 81984 10833 84 281 35237496 || 100 Average: CPU %user %nice %system %iowait %irq %soft %idle intr/s Average: all 0.00 0.00 12.49 0.08 0.00 0.00 87.42 1028.00 2609337 111630 960637 624183 4169 13389 280241192 2609337 111630 960937 624185 4169 13389 280243291 Average: 0 0.00 0.00 0.00 0.00 0.00 0.00 100.00 130.67 --- 496783 4746 173771 193751 1021 10579 34689589 || 300 --- 496783 4746 173771 193751 1021 10579 34689889 || 300 Average: 1 0.00 0.00 0.00 0.00 0.00 0.00 100.00 883.00 --- 404163 33165 160064 112728 1051 659 34858815 || 300 --- 404163 33165 160064 112728 1051 659 34859115 || 300 Average: 2 0.00 0.00 0.00 0.00 0.00 0.00 100.00 12.00 --- 351620 32816 135448 122746 1035 524 34926412 || 300 --- 351620 32816 135448 122746 1035 524 34926712 || 300 Average: 3 0.00 0.00 0.00 0.00 0.00 0.00 100.33 0.00 --- 288251 4824 116176 26101 63 438 35134947 || 300 --- 288251 4824 116176 26101 63 438 35135248 || 300 Average: 4 0.00 0.00 100.00 0.00 0.00 0.00 0.00 2.00 --- 282059 4526 103610 81346 241 325 35098067 || 300 --- 282059 4526 103910 81346 241 325 35098067 || 300 Average: 5 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 290153 4068 92139 12629 0 282 35171375 || 300 --- 290153 4068 92139 12629 0 282 35171675 || 300 Average: 6 0.00 0.00 0.00 0.67 0.00 0.00 99.33 0.00 --- 259966 23395 97440 64045 671 298 35124788 || 300 --- 259966 23395 97440 64047 671 298 35125086 || 300 Average: 7 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00 --- 236338 4085 81984 10833 84 281 35237196 || 300 --- 236338 4085 81984 10833 84 281 35237496 || 300
The attached output seems to be ok - the only proobelms are timestamps: 05:58:09 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 101.00 Average: 3 0.00 0.00 0.00 0.00 0.00 0.00 100.33 and the >100 value is caused non-atomic read commands - there is a small amount of time between the reading of cpu values and the time value - so it can't be fixed.
The problem is analogical to 445676.