You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

 We use "tulip"database to generate our sites.xml which is further used in probing the landmarks. We added pingER nodes from Nodedetails database to tulip database but with some defined rules. We only added those nodes which contain a traceroute server. To implement this and make it working we developed three packages.

  •  TULIP/ANALYSIS/NODEDETAILNODES.pm
  •  insert_sites-xml.pl
  •  create_sites-xml.pl

TULIP/ANALYSIS/NODEDETAILNODES.pm

In order to build this module we used some predefined  perl modules and scripts. To get data from node details database we used require '/afs/slac/package/netmon/pinger/nodes.cf' and we used standard package Text::CSV_XS to convert our data in coma separated values. In order to define our node to be a candidate for tulip landmark we tested it for few conditions which include that the node must have traceroute server, it should not be set to NOT-SET and it's project type should not be set to "D" which means deleted as per node details database semantics. The nodes which qualified these conditions we put them in a separate array. This array is used by insert_sites-xml.pl to insert these sites to Tulip database

 insert_sites-xml.pl

This perl script is used to create the insert query from the data of above nodes. Again using the perl package Text::CSV_XS we divide our data into seperate chunks. The data is then feeded to the structure which contains parameters for the query. This script resolves each hosts with host names taken from nodedetainodes.pm this helps in eliminating bad hosts if exists. Before inserting new nodes into database it checks weather the node is in nodedetail or not. We use ipv4Addr as our unique key. We traverse through the tulip database and check if there exists some node with the same ipv4addr if it exists we ignore the entry and if not we go ahead with inserting it in the database. 

create_sites-xml.pl 

 This perl script is used to create the sites.xml file which is further used in our TULIP project as a source for node information and landmarks. This perl module uses template libraray in order to generate required xml. It treverses through tulip database and gets each node checks the service type and generate the file with all the available parameters in the database.

  • No labels