LoginSignup
2
4

More than 5 years have passed since last update.

Linux上でPC上に搭載されてあるCPU使用率を高める

Posted at

htopコマンドでCPU使用率を見た時のたまにある現象

スクリーンショット 2018-01-27 16.54.32.png

  • 6-Coreのみが使用されていて他のCoreが使用されていない
  • GPU環境とかで他のプロセスも使用したい時に困る

① CPUを100%使用したい時に打つコマンド

openssl speed -multi `grep processor /proc/cpuinfo|wc -l`
  • openssl speed : アルゴリズム速度の測定
  • grep processor /proc/cpuinfo|wc -l : cpuの情報をgrepしてその行数をwc -lで数えている

②1つのCPUに負荷をかけたい場合

yes > /dev/null

③CPU負荷状況を確認したい時

ps aux | grep yes | grep -v grep
  • かけたい数だけこのコマンドを押せばいい

  • 最後にkillコマンドを使用して、プロセスを落とすことが出来る

参考文献

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4