Re: CPU meter
- From: Baron <baron.nospam@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Apr 2008 20:18:24 +0100
Dances With Crows wrote:
soup_or_power@xxxxxxxxx staggered into the Black Sun and said:
I would like to monitor the CPU load on multiple linux hosts from a
browser. Checked the JMETER from apache and it is too involved.
What was too involved about it?
I would like to view the [CPU] meter in [my] browser by typing
http://192.168.1.1/cpumeter or http://192.168.1.2 . All I need are
the CPU load and RAM.
You'd want to have these things somewhere that wasn't on the document
root for obvious reasons. Install Apache, install PHP, then put
something like this in monitor.php :
<html><head><title>Stats for server 192.168.1.1</title></head>
<body>
<?php
$w=`w`;
$ram=`free -m`;
echo "<pre>$w</pre><hr/>";
echo "<pre>$ram/pre>";
?>
</body></html>
...modify to taste; you can make it look quite a bit fancier with some
easy messing around. Then you'd go to http://192.168.1.1/monitor.php
and see the obvious things.
[Alternatively], if "top" can be run on the browser...
What good would that do? The machine running the browser is not the
machine you're interested in. You may want to read up on how web
servers and web clients work before getting involved in this stuff.
Anyway, HTH,
There is always "gkrellm" ! //gkrellm.net
--
Best Regards:
Baron.
.
- Follow-Ups:
- Re: CPU meter
- From: Unruh
- Re: CPU meter
- References:
- CPU meter
- From: soup_or_power@xxxxxxxxx
- Re: CPU meter
- From: Dances With Crows
- CPU meter
- Prev by Date: Re: vi - hide some line
- Next by Date: Re: [OT] Article - Does foxnews.com Hate Linux Users?
- Previous by thread: Re: CPU meter
- Next by thread: Re: CPU meter
- Index(es):
Relevant Pages
|