We previously published an article on how to check and monitor cpu utilization on linux. When running this command it is advisable to use top, htop or some other program to monitor the CPU utilization in order to verify that it is reaching 100%. $ for i in $(seq $(getconf _NPROCESSORS_ONLN)) do yes > /dev/null & done To begin, enter the following command into your terminal. Additionally, it does not require root privileges to run. The benefit to this approach is that it requires only standard utilities that come out of the box on GNU/Linux systems, so no installation of additional programs or libraries are needed. If the processor supports hyper-threading and it is enabled then it will create twice as many processes, as this is necessary to fully maximize the CPU utilization. On an idle system, each yes process will utilize 100% of a CPU core. yes prints the letter y repeatedly until it is killed. This one-liner will create a yes process to run on each processor core of the machine. In that case, you could run the following command to stress test the processor, making the issue more likely to occur, and therefore observable to you.Īfter you have taken steps to remedy the situation such as uninstalling software, reinstalling software including the operating system or replacing hardware components you could run the command again to determine whether or not it has resolved the issue. In this situation you may want to attempt to reproduce the issue. You may find yourself in a situation where your machine, or one you are maintaining for a user, is experiencing unexpected shutdowns, kernel panics or other intermittent issues. Frequently, intermittent issues do not become reproducible until the system is under heavy load, sometimes for a prolonged period of time. The yes stress test detailed in this article can be very useful for troubleshooting purposes. $ – requires given linux commands to be executed as a regular non-privileged user # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command Privileged access to your Linux system as root or via the sudo command may be required to install other stress test packages. No root privileges required for the yes stress test. Requirements, Conventions or Software Version Used How to stress test your CPU on Linux Software requirements and conventions used Software Requirements and Linux Command Line Conventions Category
0 Comments
Leave a Reply. |