* Cpu utilization per thread
@ 2005-06-21 12:50 N Chandra Shekhar REDDY
2005-06-22 1:31 ` J.A. Magallon
2005-06-22 17:41 ` Joe Seigh
0 siblings, 2 replies; 6+ messages in thread
From: N Chandra Shekhar REDDY @ 2005-06-21 12:50 UTC (permalink / raw)
To: linux-kernel
Hi all,
Can any body tell me
How to find cpu utilization per thread excluding wait times and sleep times?
Regards
ncs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cpu utilization per thread
2005-06-21 12:50 Cpu utilization per thread N Chandra Shekhar REDDY
@ 2005-06-22 1:31 ` J.A. Magallon
2005-06-23 6:18 ` N Chandra Shekhar REDDY
2005-06-22 17:41 ` Joe Seigh
1 sibling, 1 reply; 6+ messages in thread
From: J.A. Magallon @ 2005-06-22 1:31 UTC (permalink / raw)
To: N Chandra Shekhar REDDY; +Cc: linux-kernel
On 06.21, N Chandra Shekhar REDDY wrote:
> Hi all,
> Can any body tell me
> How to find cpu utilization per thread excluding wait times and sleep times?
> Regards
> ncs
>
man getrusage.
Pay special attention to the RUSAGE_SELF or RUSAGE_CHILDREN
flag, but I think current linux kernel does not perform a correct account
for threads rusage in the parent. Probably you will have to account each
thread, return info to the parent and sum or average (sum cpu times,
average elapsed times...)
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.12-jam1 (gcc 4.0.1 (4.0.1-0.2mdk for Mandriva Linux release 2006.0))
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Cpu utilization per thread
2005-06-22 1:31 ` J.A. Magallon
@ 2005-06-23 6:18 ` N Chandra Shekhar REDDY
0 siblings, 0 replies; 6+ messages in thread
From: N Chandra Shekhar REDDY @ 2005-06-23 6:18 UTC (permalink / raw)
To: 'J.A. Magallon'; +Cc: linux-kernel
Thanks for the reply.
I have tried with getrusage it is giving zero as the result.
I have found one more method(using setitimer(ITIMER_PROF,&enc_timer,NULL);
and signal SIGPROF) which will give the user and system time of a process.
Is it applicable for the thread?
Does this method give the expected results for thread?
--ncs
-----Original Message-----
From: J.A. Magallon [mailto:jamagallon@able.es]
Sent: Wednesday, June 22, 2005 7:01 AM
To: N Chandra Shekhar REDDY
Cc: linux-kernel@vger.kernel.org
Subject: Re: Cpu utilization per thread
On 06.21, N Chandra Shekhar REDDY wrote:
> Hi all,
> Can any body tell me
> How to find cpu utilization per thread excluding wait times and sleep
times?
> Regards
> ncs
>
man getrusage.
Pay special attention to the RUSAGE_SELF or RUSAGE_CHILDREN
flag, but I think current linux kernel does not perform a correct account
for threads rusage in the parent. Probably you will have to account each
thread, return info to the parent and sum or average (sum cpu times,
average elapsed times...)
--
J.A. Magallon <jamagallon()able!es> \ Software is like
sex:
werewolf!able!es \ It's better when it's
free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.12-jam1 (gcc 4.0.1 (4.0.1-0.2mdk for Mandriva Linux release
2006.0))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cpu utilization per thread
2005-06-21 12:50 Cpu utilization per thread N Chandra Shekhar REDDY
2005-06-22 1:31 ` J.A. Magallon
@ 2005-06-22 17:41 ` Joe Seigh
1 sibling, 0 replies; 6+ messages in thread
From: Joe Seigh @ 2005-06-22 17:41 UTC (permalink / raw)
To: linux-kernel
N Chandra Shekhar REDDY wrote:
> Hi all,
> Can any body tell me
> How to find cpu utilization per thread excluding wait times and sleep times?
> Regards
> ncs
>
man 5 proc
The thread stuff is in the /proc/<pid>/tasks subdirectory but I think
the status is process specific not thread specific.
--
Joe Seigh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Cpu utilization per thread
@ 2005-06-21 6:31 N Chandra Shekhar REDDY
0 siblings, 0 replies; 6+ messages in thread
From: N Chandra Shekhar REDDY @ 2005-06-21 6:31 UTC (permalink / raw)
To: linux-kernel
Can anybody tell me
How to find the cpu utilization per thread excluding thread blocking/waiting times?
Thanks
ncs
^ permalink raw reply [flat|nested] 6+ messages in thread
* CPU utilization per thread
@ 2005-06-21 5:29 N Chandra Shekhar REDDY
0 siblings, 0 replies; 6+ messages in thread
From: N Chandra Shekhar REDDY @ 2005-06-21 5:29 UTC (permalink / raw)
To: 'linux-kernel-Mailing-list'; +Cc: ncs.reddy
Can anybody tell me
How to find the cpu utilization per thread excluding thread blocking/waiting times?
Thanks
Regards
ncs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-23 6:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-21 12:50 Cpu utilization per thread N Chandra Shekhar REDDY
2005-06-22 1:31 ` J.A. Magallon
2005-06-23 6:18 ` N Chandra Shekhar REDDY
2005-06-22 17:41 ` Joe Seigh
-- strict thread matches above, loose matches on Subject: below --
2005-06-21 6:31 N Chandra Shekhar REDDY
2005-06-21 5:29 CPU " N Chandra Shekhar REDDY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox