LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 01-30-2013, 03:31 PM   #1
dutchgold92
LQ Newbie
 
Registered: Jan 2013
Location: Ireland
Distribution: Debian
Posts: 6

Rep: Reputation: Disabled
Explanation of /proc/sched_debug


Hi, I'm developing a process management application, and for particular reasons I'm looking into /proc/sched_debug at the moment. Unfortunately, I can't find documentation about this file anywhere, so I have a couple of questions if anyone can help:
  1. Does .curr->pid under a CPU indicate a process that was physically executing WHEN sched_debug was read, or simply the last process to be scheduled on that CPU?
  2. If the .curr->pid field is 0 for a CPU, what exactly does this indicate? Does this simply mean no process is currently scheduled?

Thanks for your time, I hope to receive some useful insight.
 
Old 01-30-2013, 07:53 PM   #2
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,042

Rep: Reputation: 952Reputation: 952Reputation: 952Reputation: 952Reputation: 952Reputation: 952Reputation: 952Reputation: 952
I doubt that you can get that degree of useful-detail from such a source ... and here is why: whatever results you get will be those of "that particular instant," not plus-or-minus one microsecond later. Perhaps you could tell us more about what your "process management application" needs to do, and to report? Tell us all where you're coming from and where you need to go.
 
Old 01-31-2013, 10:54 AM   #3
dutchgold92
LQ Newbie
 
Registered: Jan 2013
Location: Ireland
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
I doubt that you can get that degree of useful-detail from such a source ... and here is why: whatever results you get will be those of "that particular instant," not plus-or-minus one microsecond later. Perhaps you could tell us more about what your "process management application" needs to do, and to report? Tell us all where you're coming from and where you need to go.
I'm aware of that. One thing I'm trying to do at the moment is display a time line of PIDs that are physically executing on the CPUs across a period of time. I know that ideally I would need to monitor this from the kernel, but it seems as though that can't realistically be done without significant overhead.

I'm looking into this file as a possible simpler solution. If I could instead read this file at short intervals (1 second?), and read from it which PIDs were physically executing at the particular instant the file is generated, that should suffice. I just can't find information as to exactly what the relevant contents of the file indicate.
 
Old 02-01-2013, 02:42 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,795

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
I had a look at this some time back - just looking for some light reading whilst watching some footy on television ....

Basically you'll have to trawl through lkml, and after that you'll discover the attitude seems to be - "read the source". There is damn-all doco on it, and Ingo doesn't seem the least bit interested in changing the situation.
 
1 members found this post helpful.
Old 02-01-2013, 05:52 AM   #5
dutchgold92
LQ Newbie
 
Registered: Jan 2013
Location: Ireland
Distribution: Debian
Posts: 6

Original Poster
Rep: Reputation: Disabled
I feared as much, maybe I'll just have to search through the scheduler source to find mention of the file, and hopefully then comprehend how it works.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need of explanation for /proc/net/sockstat file geddysekar Linux - Kernel 1 06-21-2011 11:15 AM
what is /proc/interrupts & /proc/irq/*/spurious mean? nesta Linux - Embedded & Single-board computer 2 06-16-2009 09:33 AM
CPU architecture explanation with /proc/cpuinfo tanveer Linux - General 3 12-16-2008 08:18 AM
Boot hang after 'proc on /proc type proc (rw)' Hagoromo Slackware 13 10-05-2007 05:03 PM
hidden directories under proc... what are they for? : (/proc/.23142) syssyphus Linux - General 1 04-10-2006 03:23 PM


All times are GMT -5. The time now is 05:19 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration