* Getting CPU Usage of a running child process
@ 2006-03-02 9:20 ` Arijit Das
2006-03-02 12:46 ` Prosenjit Kundu
2006-06-21 6:58 ` Alex Riesen
0 siblings, 2 replies; 3+ messages in thread
From: Arijit Das @ 2006-03-02 9:20 UTC (permalink / raw)
To: linux-kernel
The times() function gets me the system/user CPU usage of me (invoking
process) and all my terminated/waited children.
Is there any User Space API/way for me (a process) to get the
system/user CPU usage of one of my currently running child process? Am
looking for a portable solution...not sure if there is any
Thanks,
Arijit
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Getting CPU Usage of a running child process
2006-03-02 9:20 ` Getting CPU Usage of a running child process Arijit Das
@ 2006-03-02 12:46 ` Prosenjit Kundu
2006-06-21 6:58 ` Alex Riesen
1 sibling, 0 replies; 3+ messages in thread
From: Prosenjit Kundu @ 2006-03-02 12:46 UTC (permalink / raw)
To: Arijit Das; +Cc: linux-kernel
try to get the info from "top"
PK
On 3/2/06, Arijit Das <Arijit.Das@synopsys.com> wrote:
> The times() function gets me the system/user CPU usage of me (invoking
> process) and all my terminated/waited children.
>
> Is there any User Space API/way for me (a process) to get the
> system/user CPU usage of one of my currently running child process? Am
> looking for a portable solution...not sure if there is any
>
> Thanks,
> Arijit
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Regards,
Prosenjit Kundu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Getting CPU Usage of a running child process
2006-03-02 9:20 ` Getting CPU Usage of a running child process Arijit Das
2006-03-02 12:46 ` Prosenjit Kundu
@ 2006-06-21 6:58 ` Alex Riesen
1 sibling, 0 replies; 3+ messages in thread
From: Alex Riesen @ 2006-06-21 6:58 UTC (permalink / raw)
To: Arijit Das; +Cc: linux-kernel
On 3/2/06, Arijit Das <Arijit.Das@synopsys.com> wrote:
> The times() function gets me the system/user CPU usage of me (invoking
> process) and all my terminated/waited children.
>
> Is there any User Space API/way for me (a process) to get the
> system/user CPU usage of one of my currently running child process? Am
> looking for a portable solution...not sure if there is any
There is a way to get the times for all children:
getrusage(RUSAGE_CHILDREN, &usage);
You can double-fork to get the info for a specific subprocess.
/proc is, as you probably noticed, not portable.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-21 6:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <AcY92pPSyN42OXgfQIad3rhpQJCOmw==>
2006-03-02 9:20 ` Getting CPU Usage of a running child process Arijit Das
2006-03-02 12:46 ` Prosenjit Kundu
2006-06-21 6:58 ` Alex Riesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®