[mrtg] AW: Re: cpu load

Wolfgang Vonlanthen wvonlanthen at zieglerdruck.ch
Fri Jul 30 17:38:44 MEST 1999


Hi Andre,

I have Linux SuSe disribution, you can find the program called "w" in /usr/bin (instead in /usr/ucb)



W(1)                Linux Programmer's Manual                W(1) 
                                                                  
NAME                                                              
       w - Show who is logged on and what they are doing.         
                                                                  
SYNOPSIS                                                          
       w - [husfV] [user]                                         
                                                                  
DESCRIPTION                                                       
       w  displays  information  about the users currently on the 
       machine, and their processes.  The header shows,  in  this 
       order,   the  current  time,  how long the system has been 
       running, how many users are currently logged on,  and  the 
       system load averages for the past 1, 5, and 15 minutes.    


with kind regards 

Wolfgang Vonlanthen


-----Ursprüngliche Nachricht-----
Von:	Andre Kuellenberg [SMTP:meiner at wtal.de]
Gesendet am:	Freitag, 30. Juli 1999 17:05
An:	mrtg at list.ee.ethz.ch
Betreff:	[mrtg] Re: cpu load

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


**********************************************************************
This message has been swept by MIMEsweeper for the presence of viruses
**********************************************************************

**********************************************************************
This message has been swept by MIMEsweeper for the presence of viruses
**********************************************************************

--
* 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