On Wed, Mar 23, 2022 at 09:15:16PM +0530, Pintu Agarwal wrote:
> Hi,
> 
> For one of my requirements I need to find cpu usage or load_avg of an
> individual process or thread using "for_each_process_thread(process,
> thread)" where process/thread is a pointer to "task_struct".

Who is making such a crazy requirement?

Have you looked at how normal tools get this information today?  We have
loads of userspace examples and libraries that provide you this
information, no need to reinvent the wheel.

Unless this is a homework assignment.  Then that's up to you to solve,
not us :)

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to