Re: cpu0/online No such file or directory

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 07/26/2018 03:39 PM, Justin Michael Schwartzbeck wrote:
> Hello,
> 
> I have compiled oprofile 1.3.0 for wind river linux and have attempted to do a basic test on the installed system:
> 
> # x86_64-wrs-linux-operf ls
> 
> However I get the following error:
> 
> Unable to open /sys/devices/system/cpu/cpu0/online
> No such file or directory
> Unable to open /sys/devices/system/cpu/cpu0/online
> No such file or directory
> Caught runtime_error: Internal Error: Number of online cpus cannot be determined.
> Error running profiler
> 
> I confirmed that I am indeed missing /sys/devices/system/cpu/cpu0/online. I have found that this file is present for cpu1, cpu2, etc. but not for cpu0. I have googled this a lot and most people seem to say that this is because cpu0 cannot go offline, so the file is nonexistent.
> 
> Can someone help me get around this issue?
> 
> Thanks
> -Justin

Hi Justin,

It does seem odd that the /sys/devices/system/cpu/cpu0 directory is missing, but all the others are there. Given that this looks like an issue with the kernel it would be helpftul to provide a bit more information about the kernel.  What version of the kernel is being used.  Are there any unusual configurations or patchs in the kernel.  I know that some MIPS configurations can split a processor off to handle some embedded control and the linux kernel does not manage it (sorrty I don't have a handy link for this).  Is this x86 machine doing something similar?  Take a look through the output of dmesg to see what it is doing to start up the processors.

-Will




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.