[mrtg] Re: cpu load

Andre Kuellenberg meiner at wtal.de
Fri Jul 30 17:04:44 MEST 1999


Hi,
thank you for your help! I still have a little problem: i don't have anything
like `/usr/ucb/w'. What does this program do?

	Andre



Am Thu, 29 Jul 1999 schrieben Sie:
> 1.On the target machine foo (if it's Solaris; other UNIXen may require
> tweaking, don't know NT), install "loadavg": 
> 
> #!/usr/local/bin/perl
> @w = `/usr/ucb/w`;
> while(!$w[0] =~ /\s+load average:\s+(\S+),\s/)
> { shift(@w) ; }
> $w[0] =~ /\s+load average:\s+(\S+),\s/;
> printf "%d\n0\n0\n0\n",100*$1;
> 
> 2.Set up MRTG host to be able to no-password ssh into foo.
> 
> 3.target[foo.cpu] `{fullpath}/ssh foo {fullpath}/loadavg`
> 
> 4.(if target foo is occasionally down), on MRTG host (same caveats
> regarding Solaris above), install "sshq":
> 
> #!/usr/local/bin/perl
> if(system("/usr/sbin/ping $ARGV[0] > /dev/null"))
> { printf "\n\n\n%s appears to be down\n",$ARGV[0]; }
> else
> { system("/usr/local/bin/ssh @ARGV"); }
> 
> , then substitute sshq for ssh in #3 above.
> 
> 	-g
> 
> 
> On Thu, 29 Jul 1999, Andre Kuellenberg wrote:
> 
> > Date: Thu, 29 Jul 1999 12:19:20 +0200
> > From: Andre Kuellenberg <meiner at wtal.de>
> > To: mrtg at list.ee.ethz.ch
> > Subject: [mrtg] cpu load
> > 
> > Hi everybody!
> > 
> > I'd like use MRTG to display the load of my server cpu on my homepage, but i
> > have no idea how to do this. I'm running Linux with the kernel 2.2.7 and
> > cmu-snmp 3.6 on my server.
> > Thank you in advance!
> > 
> > 	Andre

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list