How to create a CPU spike with a bash command

后端 未结 23 1194
小蘑菇
小蘑菇 2020-11-30 16:11

I want to create a near 100% load on a Linux machine. It\'s quad core system and I want all cores going full speed. Ideally, the CPU load would last a designated amount of

23条回答
  •  春和景丽
    2020-11-30 16:37

    I use stress for this kind of thing, you can tell it how many cores to max out.. it allows for stressing memory and disk as well.

    Example to stress 2 cores for 60 seconds

    stress --cpu 2 --timeout 60

提交回复
热议问题