Re: CPU meter
- From: Dances With Crows <danceswithcrows@xxxxxxx>
- Date: 30 Apr 2008 00:28:29 GMT
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,
--
Outside of a dog, a book is a man's best friend. Inside of a dog
it's too dark to read.
My blog and resume: http://crow202.dyndns.org:8080/wordpress/
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.
- Follow-Ups:
- Re: CPU meter
- From: Baron
- Re: CPU meter
- References:
- CPU meter
- From: soup_or_power@xxxxxxxxx
- CPU meter
- Prev by Date: dict not piping through less/pager
- Next by Date: Re: dict not piping through less/pager
- Previous by thread: CPU meter
- Next by thread: Re: CPU meter
- Index(es):
Relevant Pages
|