Please provide a project overview with information as to what the package does |
Modules |
Function |
---|---|
SelectConvSrcDest1.pm |
This program is to be setup as a cron job to run every 24 hours (after installing on a server with a PingER data source) |
PingERtoSmokeping.pm |
PingERtoSmokeping.pm is a tool to convert PingER data files into Smokeping data files. The output of this program is an rrd file for a SourceSite_DestinationSite_PacketsSize_NumberOfPing combination present in a PingER data file. This tool does not take any arguments from command line. |
Configuration files |
Function |
srcdest.txt |
The file that stores unique SourceSite_DestinationSite_PacketsSize_NumberOfPings(maximum) combinations found in PingER data. |
CGIs |
Function |
form.cgi |
Displays the SourceSite_DestinationSite_PacketsSize_NumberOfPings(maximum) RRDs(data) available for the monitoring site or node slected from pingtable.pl by user. |
graph.cgi |
Generates graphs from the rrd files on the fly and display them to the user and then deletes the graph from cache |
saveimage.cgi |
Displays the contents of the image to the user |
Detailed description can be found at http://maggie.niit.edu.pk/newwebsite/federation_projectdesc2.html
SelectConvSrcDest1.pm
use lib qw(/home/bin); |
my $some_dir="/home/pinger/pingerdata/hep/data"; |
my $srcdest="/home/SRCDEST_FILE"; |
PingERtoSmokeping.pm
my $main_path='/home/PingER_Data_Storage/'; |
my $pathofrrdcache="/home/RRDCache"; |
my $mainpath="/home/asma/SRCDEST_FILE/srcdest.txt"; |
$base_dir="/home/asma/pinger"; |
if ($type =\~ /SMOKE/) { $site = "$table\[$i\]\[$nodecolumn-5\]"; if($FORM{'by'}=~/node/) {$more = "&by=node";} if($FORM{'by'}=~/site/) {$more = "&by=site";} $label = ""; $min = ""; $max=""; $data = ""; } |
$config{URLCOLUMN0} = "SMOKE http://203.99.50.206/cgi-bin/asma/OtherParams2.cgi?src_regexp= "; |
$config{URLCOLUMN1} = "COLLECTION http://www.hep.net/cgi-bin/graph_pings.pl?src_regexp= "; |
use lib qw( /usr/local/rrdtool-1.2.12/lib/perl ); |
http://www.<path-of-server>.com/cgi-bin/graph.cgi |
my $imgsrc='../GraphCache'; It is used in: line (IMG SRC=\'$imgsrc/$destlink1.png\') And line (IMG SRC=\'$imgsrc/$destlink1"."_mini.png\') |
Deployment of PingertoSmokePing
Depends on rrdtool version 1.2.12 or newer version of it. Therefore it must be installed. The RRD tool is already installed on PingER machine.
The perl taint option -T is used in order to taint the input which the cgi will get from the user also "strict" is used.
Configuration Steps:
use lib "/afs/slac.stanford.edu/package/netmon/rrdtool/lib/perl/5.8.8"; use lib "/afs/slac.stanford.edu/package/netmon/rrdtool/lib/perl/5.8.8/i386_linux24"; |
The problem I faced with this is that it was unable to link the dynamic library (.so) file at the run time which I ran it from Flora but when I ran it from
PingER it worked fine. The problem was due to the fact that Flora is a 64 bit machine.
my $imgsrc="$HOME/pinger_smokeping/html/GraphCache where $HOME is my home directory where the project is placed. |
SaveImage.cgi
* *I have written saveimage.cgi which is called from graph.cgi and it prints the image data to the browser. The image is created temporarily and is deleted after it is show to the user.
The image is created in /tmp/ directory
Displays the SourceSite_DestinationSite_PacketsSize_NumberOfPings(maximum) RRDs(data) available for the monitoring site or node slected from pingtable.pl by user.
Configuration Steps:
my $mainpath="$HOME/pinger_smokeping/SRCDEST_FILE/srcdest.txt"; |
where $HOME is home directory where the project is placed.
1. src_regexp (Monitoring Site)
2. by site | node
$config {URLCOLUMN0} = "SMOKE [http://www-dev.slac.stanford.edu/cgi-wrap/smokeping_form.cgi?src_regexp=]"; |
require "$base_dir/pinger.new.cf"; |
where
$base_dir="/afs/slac/u/sg/shahryar/pinger_smokeping"; |
These three scripts are deployed at Test server (/afs/slac.stanford.edu/g/www/cgi-wrap-bin/net/shahryar)
which I guess is not accessable from outside world. These scripts are deployed at:
http://www-dev.slac.stanford.edu/cgi-wrap/pingtable_test.pl
http://www-dev.slac.stanford.edu/cgi-wrap/smokeping_form.cgi
http://www-dev.slac.stanford.edu/cgi-wrap/smokeping_graph.cgi( The perl taint option -t was removed in order to make it work otherwise it gave Internal server Error)
Cron Jobs
I have run SelectSrcDest1.pm as a cron job which is supposed to run every 24 hours to generate the rrd files for unique source destination pairs.