Reputation: 6302
I would like to create script that will monitor resources(CPU,RAM,DISK) on remote linux servers (client servers). What would be the best way to access these parameters remotely ?
I would prefer something based on PHP. I don't need ready-to-use solution, I need to create it myself as I need possibility for customization.
Client side script/program must be easy to configure/install.
Upvotes: 0
Views: 5671
Reputation: 21
I wrote a Java application called the remote-linux-monitor. You can find the source at https://github.com/dbothwell/remote-linux-monitor . If you study the code you will find techniques for calculating CPU and memory load. I hope you find it helpful.
Upvotes: 2
Reputation: 596
Hey sorry for late reply. I have written this program in PHP that will show you the CPU and RAM usage stats of your server.
You can check it out here - http://code.google.com/p/php-cpu-monitor/
I know you said you're not really looking for a completed solution but it is quite simple and I've documented it all so it would be easy to modify.
Hope this helps,
Steve
Upvotes: 1
Reputation: 11606
Since you say you just need pointers, you'll need to parse /proc/cpuinfo
, /proc/meminfo
and /proc/diskstats
. These contain real time data exported by the kernel.
Upvotes: 1