LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: lvs-rrd

To: "'LinuxVirtualServer.org users mailing list.'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: lvs-rrd
From: Peter Mueller <pmueller@xxxxxxxxxxxx>
Date: Tue, 20 Jan 2004 11:46:22 -0800
> Simple, right?
> It's overwhelming at first, but it's not that bad once you've done a
> few. Really.

Yes cut & paste is a lot better than doing it all from scratch.  SNPMWALK
for me, thank you!  Here's the data collection part:

/usr/local/mrtg-2.9.4/bin/cfgmaker --global 'workdir:
/home/httpd/html/mrtg/servername' --ifref=descr --global 'options[_]:
growright,bits' snmp-name-here@xxxxxxxxxxxxxxxxxxxxxx

Add this to the config:
PathAdd: /usr/local/bin/rrdtool/bin/
LibAdd: /usr/local/bin/rrdtool/perl-shared/
LogFormat: rrdtool

For the actual graphing I use a script called 14all.cgi.

This is a processor info script I use, split by user & total.  System time
can be calculated easily via subtraction by the user.

Title[servername-servicename]: processor stats for servername.goes.here
Target[servername-servicename]: `/usr/local/bin/nc -w 5 server.ip.goes.here
port`
PageTop[servername-servicename]: <H1>Processor stats</H1>
MaxBytes[servername-servicename]: 100
Unscaled[servername-servicename]: ymwd
Options[servername-servicename]: growright,nopercent
LegendI[servername-servicename]: &nbsp;user:
LegendO[servername-servicename]: &nbsp;total:
Ylegend[servername-servicename]: %
ShortLegend[servername-servicename]: %
Legend1[servername-servicename]: Time spent in user mode
Legend2[servername-servicename]: Time spent in user mode + time spent in
system mode
Legend3[servername-servicename]: Maximum occurance of time spent in user
mode
Legend4[servername-servicename]: Maximum occurance of (time spent in user
mode + time spent in system mode)

<script that runs under xinetd on 'port' to get processor info>
#!/bin/bash
    </proc/stat /bin/awk '
    /cpu /  {
            print $2+$3
            print $2+$3+$4
            }
    '
    /usr/bin/uptime
    /bin/hostname

</etc/xinetd/cpuload> (or whatever)
# CPU info reported to mrtg
service cpuload
{
        socket_type     = stream
        flags           = REUSE NAMEINARGS
        wait            = no
        protocol        = tcp
        port            = port#here
        user            = root
        server          = /usr/sbin/tcpd
        server_args     = /usr/local/bin/cpuload
        only_from       = your.network.goes.here/cidr
        bind            = your.private.ip.here
        disable         = no
}

Etc.!  Don't forget tcp-wrappers.  

P

---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.563 / Virus Database: 355 - Release Date: 1/17/2004
 
<Prev in Thread] Current Thread [Next in Thread>