Find the answer to your Linux question:
Results 1 to 3 of 3
Hello All, I have two running processes A and B. After some time, process B stops (SIGSTOP) the process A. Now, process B wants to determine that - " when ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    How to a detect process is running in system call or not?


    Hello All,

    I have two running processes A and B. After some time, process B stops (SIGSTOP) the process A.

    Now, process B wants to determine that - " when the process A was stopped (SIGSTOP), was it (process A) executing some system call or not? "

    And if the process A was in system call, then in which system call was it executing?

    Remember : process B is working via kernel-module.

    Thank you and wishing your reply...

    from,
    Nisarg

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758

    Exclamation

    Just guessing here,may be generate a core dump of process and find whether the process was in kernel mode or not using the dump.
    another guess,time command provides user time and system time --- is possible to retrieve something from there?

    no more guesses....I hope someone comes with better reply than this
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Just Joined!
    Join Date
    May 2008
    Posts
    55
    get the stack trace of the process A
    and scan it.
    you can see whether process was in kernel mode :
    and if it was then get the symbol (of course which was must be telling which system call you were in)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •