LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2013, 06:55 PM   #1
dburks
LQ Newbie
 
Registered: Aug 2013
Posts: 1

Rep: Reputation: Disabled
Question Need the process currently executing on a given CPU


I know how to obtain the cpu [core] ID that a given process is currently running on (or last ran on) by, for example, looking in /proc/<pid>/stat. But I need it the other way around: I need to know the process that is currently running on a given cpu. Other than the slow, inefficient way -- searching through all the /proc/*/stat for the cpu in question -- is there anything in /proc or /sys or whatever that will give me the answer more directly? What I need is a snapshot of the CPU's status, rather than a snapshot of a process's status.
 
Old 08-02-2013, 03:40 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I think you'll need to go to the source (of the data) - Ingo has doco for perf-sched in the source-tree under ../tools
Note that is not under ../Documentation, but at the same directory level.

Probably not something you'd want to do all the time.
 
  


Reply



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
executing a cpu bound multithreaded process takzee Linux - Newbie 3 04-14-2013 08:30 PM
CPU usage low in top, even though one process is using 80-90% of the CPU mwburden Linux - Software 6 10-23-2012 04:22 PM
grab cpu grabber (non-interactive cpu and process monitor) ezekieldas Linux - Software 8 06-18-2011 02:20 PM
Executing a process at login G4tsu Linux - General 8 11-04-2008 09:21 PM
How to find the process ID of process executing in the background akeneche Linux - Newbie 1 01-03-2008 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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