Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-11-2009, 02:22 AM   #1
LQ Newbie
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
userland: how to find the cpu currently running at

Hi everyone,

In a userland program (C), how to get the current cpu? e.g. Is there any API for it?
I do not want to use CPUID:1.

Excuse me if I didn't express it clear, as I am not native English speaker.
Old 02-11-2009, 04:14 AM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 13,253

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Perhaps you might like to look at containers. You can define a control group to only contain the CPUs you wish to be scheduled on (i.e avoid dispatch on any other(s)).
Not really what you asked, but it works fine.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU running at 100% usage while no applications are running mike_morley Linux - Desktop 14 05-17-2007 09:39 PM
CPU running above threshold!!! visris Linux - General 9 10-30-2006 02:48 AM
CPU running hot? stitchman Slackware 19 05-11-2006 03:17 PM
How to find CPU Cache ? (apart from dmesg|grep CPU) Dark Carnival Linux - Hardware 3 12-22-2005 07:10 PM
Seeing what processes are running and how much CPU they are using? DiZASTiX Linux - General 2 06-07-2003 03:05 PM

All times are GMT -5. The time now is 08:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration