All of lore.kernel.org
 help / color / mirror / Atom feed
* /proc question
@ 2005-08-05  6:08 Davy Durham
  2005-08-05  6:24 ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Davy Durham @ 2005-08-05  6:08 UTC (permalink / raw)
  To: linux-kernel

After much research.. I have a question regarding /proc

I have a zombie process which has apparently died for some unknown 
reason.. I know it was terminated by a signal (found that from the 9th 
field (sheduler flags) in /proc/pid/stat)

However, I'm trying to figure out what signal killed it.

Also, it would be nice if /proc could show what the exit status of a 
dead process is.. seems strange that it doesn't contain that information 
(or am I just not seeing it in there).


Any info would be helpful.. thanks,
  Davy



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: /proc question
  2005-08-05  6:08 /proc question Davy Durham
@ 2005-08-05  6:24 ` Jan Engelhardt
  2005-08-05  6:31   ` Davy Durham
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2005-08-05  6:24 UTC (permalink / raw)
  To: Davy Durham; +Cc: linux-kernel


> I have a zombie process which has apparently died for some unknown reason.. I
> know it was terminated by a signal (found that from the 9th field (sheduler
> flags) in /proc/pid/stat)

Start the process under the observation of strace.

> However, I'm trying to figure out what signal killed it.


Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: /proc question
  2005-08-05  6:24 ` Jan Engelhardt
@ 2005-08-05  6:31   ` Davy Durham
  0 siblings, 0 replies; 5+ messages in thread
From: Davy Durham @ 2005-08-05  6:31 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel

Jan Engelhardt wrote:

>>I have a zombie process which has apparently died for some unknown reason.. I
>>know it was terminated by a signal (found that from the 9th field (sheduler
>>flags) in /proc/pid/stat)
>>    
>>
>
>Start the process under the observation of strace.
>
>  
>
>>However, I'm trying to figure out what signal killed it.
>>    
>>
>
>
>Jan Engelhardt
>  
>
Wish I could.. but it's already happened (to a lot of processes for the 
same reason)

It's an intermittant problem and can't really reproduce it at will.

I've redeployed the binary now so I can hopefully attach to it with gdb 
to figure out some things next time it does happen.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* /proc question
       [not found] <c694e184-2b7c-4fa4-b97e-5b7247388b50@mail5.gatech.edu>
@ 2012-02-08  7:54 ` Surenkumar Nihalani
  2012-02-08  8:31   ` Philipp Ittershagen
  0 siblings, 1 reply; 5+ messages in thread
From: Surenkumar Nihalani @ 2012-02-08  7:54 UTC (permalink / raw)
  To: kernelnewbies

Hello All, 

I am writing a kernel module and I wanted to know which data structure backs up the /proc/self or how do I get the process id of my call and number of it's threads from within the kernel? 

Thanks, 
Suren. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120208/4b7dc509/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* /proc question
  2012-02-08  7:54 ` Surenkumar Nihalani
@ 2012-02-08  8:31   ` Philipp Ittershagen
  0 siblings, 0 replies; 5+ messages in thread
From: Philipp Ittershagen @ 2012-02-08  8:31 UTC (permalink / raw)
  To: kernelnewbies

Hello Surenkumar,

On Wed, Feb 8, 2012 at 8:54 AM, Surenkumar Nihalani <suren@gatech.edu> wrote:
> Hello All,
>
> I am writing a kernel module and I wanted to know which data structure backs
> up the /proc/self or how do I get the process id of my call and number of
> it's threads from within the kernel?


You can get the process id of the current context using the directive
"current->pid". The macro "current" refers to the current task struct,
so it should also be possible to get the number of threads.


Philipp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-08  8:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-05  6:08 /proc question Davy Durham
2005-08-05  6:24 ` Jan Engelhardt
2005-08-05  6:31   ` Davy Durham
     [not found] <c694e184-2b7c-4fa4-b97e-5b7247388b50@mail5.gatech.edu>
2012-02-08  7:54 ` Surenkumar Nihalani
2012-02-08  8:31   ` Philipp Ittershagen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.