C API for CPU Usage for particular User Login

From: herft
Date: Wed Oct 08 2003 - 22:26:11 EST


Dear Friends,

I want to read CPU Usage like top command.

What I want is read CPU usage for particular user log in.

Say x,y and z are logged in and they are running separate applications.

What I want is to get the CPU usage of each user separately.

It would be somewhat like top command, but then top gives CPU usage of the machine as a total.

Can anyone help me with giving me any clue about C apis in Linux.

Or if I can get the source code of top command.

Thanks
Sena Seneviratne

Computer Engineering Lab
Sydney University

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/