lvs_stats is program which generate graph for Linux Virtual Server by utilizing rrdtool.
Program is written by Ruby.
lvs_stats consists of following three component.
#--------------------------------------------------------
# About LVS Statistics Grapher
#--------------------------------------------------------
############### READ THIS STATEMENT FIRST ##############
Of course I publish this program hoping this program is
useful for other people.
But, you have to use this program at your own risk.
I'm not responsible for your usage of this program.
#####################################################
Generate graph about ip_vs kernel module information.
This scripts generate following type of graph
All Virtual Server Aggregated graph
* Connection per sconds(CPS)
* Throughput(BPS)
* Active/Inactive Concurrent Connections
Per Virtual Server View
* Connection per sconds(CPS)
* Throughput(BPS)
* Active/Inactive Concurrent Connections
* Packets per seconds(PPS) and Average packet size
* Bit/connection and Packet/connection
You can see sample screen shot from my BLOG
################# IMPORTANT #############################
This scripts expect following commands to work properly.
/sbin/ipvsadm -L -n --stats --exact
And I strongly recomend to manage /etc/hosts file for
VIP entry which enable rrd_stats scripts use service name
as graph title.
#########################################################
#--------------------------------------------------------
* required software
#--------------------------------------------------------
ruby >= 1.8
ruby-rrdtool >= 1.2
rrdtool >= 1.2
#--------------------------------------------------------
# Files
#--------------------------------------------------------
ipvs_rrd.rb
=> library used to generate several type of graph.
index.cgi
=> GUI frontand which enable you to view graph via browser
lvs_rrdgraph.rb
=> generate graph from rrd database
lvs_rrdstore.rb
=> parse /sbin/ipvsadm output and store to rrd database
lvs_stats.sh
=> shell scripts executed from cron
#--------------------------------------------------------
# Install example
#--------------------------------------------------------
* install
#--------------------------------------------------------
cd /usr/local/src
tar xzf lvs_stats.tgz
mv lvs_stats /usr/local
cd /usr/local/lvs_stats
mkdir /usr/local/apache/htdocs/lvs_stats
mkdir /usr/local/apache/htdocs/lvs_stats/graph
mkdir /usr/local/apache/htdocs/lvs_stats/graph/{w,m,y}
mkdir /usr/local/apache/htdocs/lvs_stats/rrd
mv index.cgi /usr/local/apache/htdocs/lvs_stats
ln -s /usr/local/apache/htdocs/lvs_stats/graph
ln -s /usr/local/apache/htdocs/lvs_stats/rrd
#--------------------------------------------------------
* check
#--------------------------------------------------------
/usr/local/lvs_rrdstore.rb
ls -l rrd
/usr/local/lvs_rrdgraph.rb
ls -l graph
access following URL via browser
http://LVS_IP_ADDRESS/lvs_stats/index.cgi
#--------------------------------------------------------
* register to cron
#--------------------------------------------------------
mv lvs_stats.cron /etc/cron.d/lvs_stats
#--------------------------------------------------------
#--------------------------------------------------------
# About LVS Statistics Grapher
#--------------------------------------------------------
############### READ THIS STATEMENT FIRST ##############
Of course I publish this program hoping this program is
useful for other people.
But, you have to use this program at your own risk.
I'm not responsible for your usage of this program.
#####################################################
Generate graph about ip_vs kernel module information.
This scripts generate following type of graph
All Virtual Server Aggregated graph
* Connection per sconds(CPS)
* Throughput(BPS)
* Active/Inactive Concurrent Connections
Per Virtual Server View
* Connection per sconds(CPS)
* Throughput(BPS)
* Active/Inactive Concurrent Connections
* Packets per seconds(PPS) and Average packet size
* Bit/connection and Packet/connection
You can see sample screen shot from my BLOG
################# IMPORTANT #############################
This scripts expect following commands to work properly.
/sbin/ipvsadm -L -n --stats --exact
And I strongly recomend to manage /etc/hosts file for
VIP entry which enable rrd_stats scripts use service name
as graph title.
#########################################################
#--------------------------------------------------------
* required software
#--------------------------------------------------------
ruby >= 1.8
ruby-rrdtool >= 1.2
rrdtool >= 1.2
#--------------------------------------------------------
# Files
#--------------------------------------------------------
ipvs_rrd.rb
=> library used to generate several type of graph.
index.cgi
=> GUI frontand which enable you to view graph via browser
lvs_rrdgraph.rb
=> generate graph from rrd database
lvs_rrdstore.rb
=> parse /sbin/ipvsadm output and store to rrd database
lvs_stats.sh
=> shell scripts executed from cron
#--------------------------------------------------------
# Install example
#--------------------------------------------------------
* install
#--------------------------------------------------------
cd /usr/local/src
tar xzf lvs_stats.tgz
mv lvs_stats /usr/local
cd /usr/local/lvs_stats
mkdir /usr/local/apache/htdocs/lvs_stats
mkdir /usr/local/apache/htdocs/lvs_stats/graph
mkdir /usr/local/apache/htdocs/lvs_stats/graph/{w,m,y}
mkdir /usr/local/apache/htdocs/lvs_stats/rrd
mv index.cgi /usr/local/apache/htdocs/lvs_stats
ln -s /usr/local/apache/htdocs/lvs_stats/graph
ln -s /usr/local/apache/htdocs/lvs_stats/rrd
#--------------------------------------------------------
* check
#--------------------------------------------------------
/usr/local/lvs_rrdstore.rb
ls -l rrd
/usr/local/lvs_rrdgraph.rb
ls -l graph
access following URL via browser
http://LVS_IP_ADDRESS/lvs_stats/index.cgi
#--------------------------------------------------------
* register to cron
#--------------------------------------------------------
mv lvs_stats.cron /etc/cron.d/lvs_stats
#--------------------------------------------------------
2008-11-25 t9md
* cange initial RRD DataSource type for from COUNTER to DERIVE with minimal
value of '0'.
2008-11-24 t9md
* initial version released.
2008-11-25 t9md
* cange initial RRD DataSource type for from COUNTER to DERIVE with minimal
value of '0'.
2008-11-24 t9md
* initial version released.