LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   unable to disable a core (https://www.linuxquestions.org/questions/linux-general-1/unable-to-disable-a-core-939591/)

aluchko 04-13-2012 01:45 AM

unable to disable a core
 
I'm attempting to disable one of the two cores in my laptop, I've done it previously by setting /sys/devices/system/cpu/cpu1/online to 0, but this time the file simply rewrites to 1
Code:

[root@losgar ~]# echo 0> /sys/devices/system/cpu/cpu1/online ; cat /sys/devices/system/cpu/cpu1/online

1
[root@losgar ~]# cat /proc/cpuinfo
processor      : 0
vendor_id      : GenuineIntel
cpu family      : 6
model          : 23
model name      : Pentium(R) Dual-Core CPU      T4300  @ 2.10GHz
stepping        : 10
microcode      : 0xa0b
cpu MHz        : 1200.000
cache size      : 1024 KB
physical id    : 0
siblings        : 2
core id        : 0
cpu cores      : 2
apicid          : 0
initial apicid  : 0
fpu            : yes
fpu_exception  : yes
cpuid level    : 13
wp              : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dts
bogomips        : 4189.93
clflush size    : 64
cache_alignment : 64
address sizes  : 36 bits physical, 48 bits virtual
power management:

processor      : 1                                                                                         
vendor_id      : GenuineIntel                                                                               
cpu family      : 6                                                                                         
model          : 23
model name      : Pentium(R) Dual-Core CPU      T4300  @ 2.10GHz
stepping        : 10
microcode      : 0xa0b
cpu MHz        : 2100.000
cache size      : 1024 KB
physical id    : 0
siblings        : 2
core id        : 1
cpu cores      : 2
apicid          : 1
initial apicid  : 1
fpu            : yes
fpu_exception  : yes
cpuid level    : 13
wp              : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dts
bogomips        : 4189.93
clflush size    : 64
cache_alignment : 64
address sizes  : 36 bits physical, 48 bits virtual
power management:

[root@losgar ~]# uname -a
Linux losgar 3.3.1-3.fc16.x86_64 #1 SMP Wed Apr 4 18:08:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Anyone know why this might not be working, or another way to disable the core?

aluchko 04-19-2012 08:10 PM

For further information the laptop dual boots Ubuntu and I have the same issue there. When I try editing the file with VI I get the message

Code:

"/sys/devices/system/cpu/cpu1/online" E667: Fsync failed
WARNING: Original file may be lost or damaged


syg00 04-19-2012 08:28 PM

Quote:

Originally Posted by aluchko (Post 4651618)
I'm attempting to disable one of the two cores in my laptop, I've done it previously by setting /sys/devices/system/cpu/cpu1/online to 0, but this time the file simply rewrites to 1
Code:

[root@losgar ~]# echo 0> /sys/devices/system/cpu/cpu1/online ; cat /sys/devices/system/cpu/cpu1/online

1


Note the blank line prior to the cat output ???. Try "echo 0 > ..." yes, with a space/blank character.

aluchko 04-19-2012 09:33 PM

Yup...

Code:

echo 0 > /sys/devices/system/cpu/cpu1/online ; cat /sys/devices/system/cpu/cpu1/online
Does the trick. Note sure what bash was doing with the "0>", maybe it's related to stream redirection 2>.

thanks!


All times are GMT -5. The time now is 02:01 AM.