{"id":164,"date":"2020-02-06T15:12:45","date_gmt":"2020-02-06T14:12:45","guid":{"rendered":"http:\/\/xv6.de\/?page_id=164"},"modified":"2022-08-15T09:56:30","modified_gmt":"2022-08-15T08:56:30","slug":"generate-100-cpu-load-from-bash","status":"publish","type":"page","link":"https:\/\/xv6.de\/?page_id=164","title":{"rendered":"Generate 100% CPU Load from Bash"},"content":{"rendered":"\n<p>The following command will generate 100% CPU load on the number of cores specified by 1 2 3 4. This is bash save and works also with older versions of bash. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in 1 2 3 4; do while : ; do : M done &amp; done<\/code><\/pre>\n\n\n\n<p>A new C-style loop may be used in newer versions of bash:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in {1..4};  do while : ; do : ; done &amp; done<\/code><\/pre>\n\n\n\n<p>Source:  <a href=\"https:\/\/superuser.com\/questions\/443406\/how-can-i-produce-high-cpu-load-on-a-linux-server\">https:\/\/superuser.com\/questions\/443406\/how-can-i-produce-high-cpu-load-on-a-linux-server<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following command will generate 100% CPU load on the number of cores specified by 1 2 3 4. This is bash save and works also with older versions of bash. A new C-style loop may be used in newer versions of bash: Source: https:\/\/superuser.com\/questions\/443406\/how-can-i-produce-high-cpu-load-on-a-linux-server<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-164","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/pages\/164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xv6.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=164"}],"version-history":[{"count":6,"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/pages\/164\/revisions"}],"predecessor-version":[{"id":248,"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/pages\/164\/revisions\/248"}],"wp:attachment":[{"href":"https:\/\/xv6.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}