LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to read Load of a System using C++ in Linux ! (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-read-load-of-a-system-using-c-in-linux-105012/)

avios 10-17-2003 02:29 AM

How to read Load of a System using C++ in Linux !
 
Hi guys ! A few things I want to do in linux ! First of all this is my first post on this site !


I would Like to memory , CPU and Process % and Average a load for the system. I have tried using TOP but its of no use ! I have also used the proc table to read the process time span and load but still unable to determine a proper way to find the load of the system.

The load has to be from 0 - 100% and I intend to port a process across a network based on this load ! Basic load balancing scheme ICHU !


I need real time access to this load and would like to display this load dynamically to a website using PHP stats page !

Avinash Shanakar :Pengy:

seidren 10-17-2003 08:42 PM

Check the glibc documentation. I am not sure but there might be some function to do what you want.
Or checkout some source code for monitoring programs like gkrellm or ksim. They will definely have a method to do it.


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