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: |
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. |