<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Linux Hotplug a CPU</title> <atom:link href="http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Alex</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-60179</link> <dc:creator>Alex</dc:creator> <pubDate>Thu, 23 Jun 2011 01:46:54 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-60179</guid> <description>For the people confused by &quot;echo: write error: Invalid argument&quot;: Is the CPU already enabled (if trying to enable it) or disabled (if trying to disable it)? AFAICT, the kernel produces an error when you try to put the CPU in the state it is already in, instead of just ignoring the request.
For the people getting permission errors:
Use &quot;echo 0 &#124; sudo tee /sys/devices/system/cpu/cpu6/online&quot; instead of &quot;sudo echo 0 &gt; /sys/devices/system/cpu/cpu6/online&quot;.
As Vivek points out, you need to be root to hotplug a CPU. You might think &quot;But I used sudo&quot;. However, when you use &quot;&gt;&quot;, bash (or your shell, if you use something else) is responsible for opening the file that you&#039;re trying to write to, and then setting that opened file as the destination for stdout (file descriptor 1). bash will then execute &quot;sudo echo 0&quot;, which will cause sudo to do its magic and run &quot;echo 0&quot; as root. Unfortunately, bash isn&#039;t running as root, so it will fail to open /sys/devices/system/cpu/cpu6/online.
By instead piping the output of the echo to sudo tee, tee becomes responsible for opening the file and writing to it. Since tee is run under sudo, it can actually succeed.</description> <content:encoded><![CDATA[<p>For the people confused by &#8220;echo: write error: Invalid argument&#8221;: Is the CPU already enabled (if trying to enable it) or disabled (if trying to disable it)? AFAICT, the kernel produces an error when you try to put the CPU in the state it is already in, instead of just ignoring the request.</p><p>For the people getting permission errors:<br
/> Use &#8220;echo 0 | sudo tee /sys/devices/system/cpu/cpu6/online&#8221; instead of &#8220;sudo echo 0 &gt; /sys/devices/system/cpu/cpu6/online&#8221;.</p><p>As Vivek points out, you need to be root to hotplug a CPU. You might think &#8220;But I used sudo&#8221;. However, when you use &#8220;&gt;&#8221;, bash (or your shell, if you use something else) is responsible for opening the file that you&#8217;re trying to write to, and then setting that opened file as the destination for stdout (file descriptor 1). bash will then execute &#8220;sudo echo 0&#8243;, which will cause sudo to do its magic and run &#8220;echo 0&#8243; as root. Unfortunately, bash isn&#8217;t running as root, so it will fail to open /sys/devices/system/cpu/cpu6/online.</p><p>By instead piping the output of the echo to sudo tee, tee becomes responsible for opening the file and writing to it. Since tee is run under sudo, it can actually succeed.</p> ]]></content:encoded> </item> <item><title>By: Martin Dimitrov</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-55413</link> <dc:creator>Martin Dimitrov</dc:creator> <pubDate>Mon, 07 Feb 2011 22:04:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-55413</guid> <description>I also get the same problem: &quot;echo: write error: Invalid argument&quot;
Did anyone find a resolution for this?
Thank you</description> <content:encoded><![CDATA[<p>I also get the same problem: &#8220;echo: write error: Invalid argument&#8221;<br
/> Did anyone find a resolution for this?</p><p>Thank you</p> ]]></content:encoded> </item> <item><title>By: VA_DOS</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-53168</link> <dc:creator>VA_DOS</dc:creator> <pubDate>Tue, 21 Dec 2010 20:53:07 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-53168</guid> <description>It works. But system will crash if you unplugging CPU or core which currently busy by some process.
I&#039;m looking at taskset utility to resolve this problem</description> <content:encoded><![CDATA[<p>It works. But system will crash if you unplugging CPU or core which currently busy by some process.</p><p>I&#8217;m looking at taskset utility to resolve this problem</p> ]]></content:encoded> </item> <item><title>By: Callan Bryant</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-48700</link> <dc:creator>Callan Bryant</dc:creator> <pubDate>Mon, 09 Aug 2010 15:17:55 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-48700</guid> <description>sudo does not support the &gt; operator
Run the command using sudo -i to get an interactive prompt first</description> <content:encoded><![CDATA[<p>sudo does not support the &gt; operator<br
/> Run the command using sudo -i to get an interactive prompt first</p> ]]></content:encoded> </item> <item><title>By: Anonymous</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-47831</link> <dc:creator>Anonymous</dc:creator> <pubDate>Tue, 15 Jun 2010 12:16:06 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-47831</guid> <description>Could you please tell us how you managed, I get the same error &quot;access denied&quot; when run as root</description> <content:encoded><![CDATA[<p>Could you please tell us how you managed, I get the same error &#8220;access denied&#8221; when run as root</p> ]]></content:encoded> </item> <item><title>By: Fabian Kempers</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-43620</link> <dc:creator>Fabian Kempers</dc:creator> <pubDate>Tue, 08 Sep 2009 11:15:29 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-43620</guid> <description>I have put cpu 1 to 3 offline.
When I online a cpu I get the following message:
(root @ rhel5)
# echo 1 &gt; /sys/devices/system/cpu/cpu1/online
-bash: echo: write error: Invalid argument
Anyone else got the same message and a solution to this problem?</description> <content:encoded><![CDATA[<p>I have put cpu 1 to 3 offline.<br
/> When I online a cpu I get the following message:<br
/> (root @ rhel5)<br
/> # echo 1 &gt; /sys/devices/system/cpu/cpu1/online<br
/> -bash: echo: write error: Invalid argument</p><p>Anyone else got the same message and a solution to this problem?</p> ]]></content:encoded> </item> <item><title>By: mangoo</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-42331</link> <dc:creator>mangoo</dc:creator> <pubDate>Wed, 01 Jul 2009 09:42:18 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-42331</guid> <description>Not only high-end servers - CPU/memory hotplugging is often used in virtualized systems.</description> <content:encoded><![CDATA[<p>Not only high-end servers &#8211; CPU/memory hotplugging is often used in virtualized systems.</p> ]]></content:encoded> </item> <item><title>By: Stephan</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41265</link> <dc:creator>Stephan</dc:creator> <pubDate>Mon, 20 Apr 2009 11:03:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41265</guid> <description>Ok, I&#039;v managed.
Thx.
S.</description> <content:encoded><![CDATA[<p>Ok, I&#8217;v managed.<br
/> Thx.<br
/> S.</p> ]]></content:encoded> </item> <item><title>By: Stephan</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41262</link> <dc:creator>Stephan</dc:creator> <pubDate>Mon, 20 Apr 2009 07:34:09 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41262</guid> <description>I also tried with sudo, as I reported in the post, but didn&#039;t work.
Moreover, in visudo I&#039;ve set:
stefano ALL=(ALL) ALL
Thx.
S.</description> <content:encoded><![CDATA[<p>I also tried with sudo, as I reported in the post, but didn&#8217;t work.<br
/> Moreover, in visudo I&#8217;ve set:</p><p>stefano ALL=(ALL) ALL</p><p>Thx.</p><p>S.</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41258</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Sun, 19 Apr 2009 16:03:37 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41258</guid> <description>You must be root user to hotplug a CPU.</description> <content:encoded><![CDATA[<p>You must be root user to hotplug a CPU.</p> ]]></content:encoded> </item> <item><title>By: Stephan</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41257</link> <dc:creator>Stephan</dc:creator> <pubDate>Sun, 19 Apr 2009 15:57:36 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41257</guid> <description>I tried to offline a core  in my i386 (kernel 2.6), but I was notified a permission denied.
stefano@stefano-laptop:~$ echo 1 &gt; /sys/devices/system/cpu/cpu1/online
bash: /sys/devices/system/cpu/cpu1/online: Permission denied
stefano@stefano-laptop:~$ sudo echo 1 &gt; /sys/devices/system/cpu/cpu1/online
bash: /sys/devices/system/cpu/cpu1/online: Permission denied
Can anybody tell me y? Is it by default enabled in the latest versions?
Thx
S.</description> <content:encoded><![CDATA[<p>I tried to offline a core  in my i386 (kernel 2.6), but I was notified a permission denied.</p><p>stefano@stefano-laptop:~$ echo 1 &gt; /sys/devices/system/cpu/cpu1/online<br
/> bash: /sys/devices/system/cpu/cpu1/online: Permission denied<br
/> stefano@stefano-laptop:~$ sudo echo 1 &gt; /sys/devices/system/cpu/cpu1/online<br
/> bash: /sys/devices/system/cpu/cpu1/online: Permission denied</p><p>Can anybody tell me y? Is it by default enabled in the latest versions?<br
/> Thx</p><p>S.</p> ]]></content:encoded> </item> <item><title>By: jrush</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41254</link> <dc:creator>jrush</dc:creator> <pubDate>Sun, 19 Apr 2009 13:09:31 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41254</guid> <description>It&#039;s really works !
On my desktop Atom 330 (dual core + hyperthreading = 4 CPU), i can disable 3 CPUs of 4 :)</description> <content:encoded><![CDATA[<p>It&#8217;s really works !<br
/> On my desktop Atom 330 (dual core + hyperthreading = 4 CPU), i can disable 3 CPUs of 4 :)</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41034</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Fri, 03 Apr 2009 15:01:22 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41034</guid> <description>You need high end servers such as IBM Power6 series to actually add or remove CPU / memory without rebooting the server. This is called Capacity Upgrade on Demand (CUoD). Other vendor such as Sun and HP also provides the same stuff. Your average server only support hard disk hot-plug. Another example is HP ProLiant ML570 G2  business server powered by Intel Xeon CPUs. Ask, your vendor for CUoD aware server and you will get the list. Be prepared to pay extra for all these fancy features ;)
HTH</description> <content:encoded><![CDATA[<p>You need high end servers such as IBM Power6 series to actually add or remove CPU / memory without rebooting the server. This is called Capacity Upgrade on Demand (CUoD). Other vendor such as Sun and HP also provides the same stuff. Your average server only support hard disk hot-plug. Another example is HP ProLiant ML570 G2  business server powered by Intel Xeon CPUs. Ask, your vendor for CUoD aware server and you will get the list. Be prepared to pay extra for all these fancy features ;)</p><p>HTH</p> ]]></content:encoded> </item> <item><title>By: Miker</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41032</link> <dc:creator>Miker</dc:creator> <pubDate>Fri, 03 Apr 2009 14:32:13 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41032</guid> <description>I&#039;m really curious about this.  Can anyone comment if they&#039;ve actually tried it?  I&#039;m not sure if any of the x86_(64) systems I&#039;ve ever worked with support this capability - anyone know of systems that do?</description> <content:encoded><![CDATA[<p>I&#8217;m really curious about this.  Can anyone comment if they&#8217;ve actually tried it?  I&#8217;m not sure if any of the x86_(64) systems I&#8217;ve ever worked with support this capability &#8211; anyone know of systems that do?</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41031</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Fri, 03 Apr 2009 14:29:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41031</guid> <description>Just unmount it and if it is hotplug just replace it.</description> <content:encoded><![CDATA[<p>Just unmount it and if it is hotplug just replace it.</p> ]]></content:encoded> </item> <item><title>By: Akshay Sulakhe</title><link>http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/#comment-41030</link> <dc:creator>Akshay Sulakhe</dc:creator> <pubDate>Fri, 03 Apr 2009 13:57:22 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3555#comment-41030</guid> <description>How to do such a similar thing for a hard disk...Juts unmount it or anything else is necessaey to remove and then add other???</description> <content:encoded><![CDATA[<p>How to do such a similar thing for a hard disk&#8230;Juts unmount it or anything else is necessaey to remove and then add other???</p> ]]></content:encoded> </item> </channel> </rss>
