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

Compare with Current View Page History

« Previous Version 3 Next »

 We use the "tulip" database to generate our sites.xml which is further used in probing the landmarks. We added pingER nodes from the Nodedetails database to the 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 comma separated values. In order to define our node to be a candidate for a tulip landmark we tested it for a 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 nodedetails database semantics. The nodes which qualified these conditions were put into 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 separate chunks. The data is then fed to the structure which contains parameters for the query. This script resolves each hosts with host names taken from nodedetailnodes.pm this helps in eliminating bad hosts if they exist. 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 the template library in order to generate required xml. It traverses through tulip database and gets each node, checks the service type and generates the file with all the available parameters in the database.

  • No labels