LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How can the kernel notify which is the current running application ? (https://www.linuxquestions.org/questions/linux-kernel-70/how-can-the-kernel-notify-which-is-the-current-running-application-770057/)

jumanix 11-18-2009 05:01 PM

How can the kernel notify which is the current running application ?
 
Hi,
i need to develop a daemon (user space) which needs to know which is current running application. How can i get notifications from the kernel?
Someone told me there are a thousand ways.
Who can suggest me a bunch of possibly solutions?

Thanks

jtshaw 11-18-2009 05:46 PM

This stuff is available in /proc/<PID>/stat

You can also see what is in the running state using ps (ps aux for example).

salasi 11-18-2009 06:11 PM

Quote:

Originally Posted by jumanix (Post 3761924)
Hi,
i need to develop a daemon (user space) which needs to know which is current running application.

Your daemon will check which is the running application; when it does this, it will be running, so it will be the running application, no?

jumanix 11-19-2009 04:52 AM

Quote:

Originally Posted by salasi (Post 3761998)
Your daemon will check which is the running application; when it does this, it will be running, so it will be the running application, no?

Yeah, but i don't want to check it.
I want the kernel notify me everytime the current running one changes. Is it possible?

sundialsvcs 11-22-2009 01:25 PM

Realistically, no. The computer would simply be spending all of its time sendng you notifications. (An you'd spend all of the computer's time processing them.) :)


All times are GMT -5. The time now is 04:34 AM.