Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have used many times ab for measuring web performance, hdparm for measuring hard disk performance and netperf for measuring network performance. But I didn't find any tools to measure cpu performance.

Do you know a tool allowing to measure cpu performance? I am more specifically looking to measure Gflops.

share|improve this question
see "serverfault.com/questions/88357/estimate-flops-in-linux"; for measuring gflops and you can use mpstat or sar command for cpu performance – harish.venkat Jan 26 '12 at 10:21
sar and mpstat indicates cpu activity, not cpu performance. Serverfault question indicates to use LINPACK, which is not open source. – Coren Jan 26 '12 at 10:44
up vote 6 down vote accepted

You should take a look at the Wikipedia page on benchmarking, it gives quite a few benchmark tools including the CPU ones that will work on Linux. LinPack is free but a pain to compile. But you can certainly look at NBench and some others in the list.

share|improve this answer
$ date; i=0; while (( i < 1000000 )); do (( i ++ )); done; date
Tue Jul 15 11:26:37 EDT 2014
Tue Jul 15 11:26:43 EDT 2014
share|improve this answer
Would that be 43 - 37 = 6 GigaFlops? I fail to see how an integer increment in a shell, relates to floating point performance. – Anthon Jul 15 '14 at 16:58
The general goal was "measure cpu performance". Later mentions Gflops but I think that's actually a misguided tangent. If Gflops was the true goal then asking about CPU performance was a mistake. – JohnMudd Jul 16 '14 at 15:29
Quicker way to get to the number you're really after, i.e. seconds that have passed: DATE=$(date +%s); i=0; while (( i < 1000000 )); do (( i ++ )); done; echo $(( $(date +%s)-DATE )) – xenithorb Mar 7 '15 at 21:23
Good point, I should have updated this earlier. Here's my current approach: time ( i=0; while (( i < 1000000 )); do (( i ++ )); done ) – JohnMudd Mar 9 '15 at 12:58
This is not 6 gigaflops, this is ~0.17 megabashincrements. And, my macbook owns all: ( i=0 ; while (( i < 1000000 )); do; (( i ++ )); done; ) 1.33s user 0.00s system 99% cpu 1.337 total – Steven Lu Jan 29 at 16:39

The kernel measures bogomips at boot. But as harish says - the question has already been answered on serverfault

share|improve this answer
Bogomips does not measure performance, it only gives some indications about processor speed. Wikipedia page you linked confirm this : It is not usable for performance comparison between different CPUs. – Coren Jan 26 '12 at 11:59
I've never seen it displaying anything other then CPU MHz * 2. – Karlson Jan 26 '12 at 21:01
Bogomips are, by definition, useless as an indicator of performance... – Cerin Oct 23 '15 at 21:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.