Atau, seseorang dapat menggunakan stress-ng
. Ini memiliki tes stres CPU sebagai salah satu dari banyak tes stres yang dibangun ke dalam alat. Uji tekanan cpu berisi banyak metode tekanan CPU yang berbeda yang mencakup integer, floating point, operasi bit, komputasi campuran, komputasi prima, dan berbagai macam komputasi.
Instal menggunakan:
sudo apt-get install stress-ng
Untuk melihat metode stres terkait cpu, gunakan:
stress-ng --cpu-method which
Untuk membandingkan, misalnya, produk matriks selama 60 detik pada 4 utas CPU, gunakan:
stress-ng --cpu 4 --cpu-method matrixprod --metrics-brief --perf -t 60
stress-ng: info: [15876] dispatching hogs: 4 cpu
stress-ng: info: [15876] successful run completed in 60.00s (1 min, 0.00 secs)
stress-ng: info: [15876] stressor bogo ops real time usr time sys time bogo ops/s bogo ops/s
stress-ng: info: [15876] (secs) (secs) (secs) (real time) (usr+sys time)
stress-ng: info: [15876] cpu 71657 60.00 239.60 0.00 1194.25 299.07
stress-ng: info: [15876] cpu:
stress-ng: info: [15876] 885,244,279,148 CPU Cycles 14.75 B/sec
stress-ng: info: [15876] 1,289,303,858,968 Instructions 21.49 B/sec (1.456 instr. per cycle)
stress-ng: info: [15876] 201,499,961,692 Cache References 3.36 B/sec
stress-ng: info: [15876] 790,424 Cache Misses 13.17 K/sec ( 0.00%)
stress-ng: info: [15876] 157,689,508,544 Branch Instructions 2.63 B/sec
stress-ng: info: [15876] 1,232,539,732 Branch Misses 20.54 M/sec ( 0.78%)
stress-ng: info: [15876] 5,755,605,036 Bus Cycles 95.92 M/sec
stress-ng: info: [15876] 817,296,440,876 Total Cycles 13.62 B/sec
stress-ng: info: [15876] 8,532 Page Faults Minor 142.19 sec
stress-ng: info: [15876] 0 Page Faults Major 0.00 sec
stress-ng: info: [15876] 220 Context Switches 3.67 sec
stress-ng: info: [15876] 0 CPU Migrations 0.00 sec
stress-ng: info: [15876] 0 Alignment Faults 0.00 sec