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

Compare with Current View Page History

« Previous Version 16 Next »

We are using PingER and PlanetLab landmarks for geolocation in TULIP. PlanetLab landmarks are manually updated with the help of perl script "insert_planetlab.pl" which is under the tulip directory /afs/slac.stanford.edu/package/pinger/tulip. This script loops over monthly active hosts in PlanetLab and inserts new one based on their availability. PingER nodes are updated with the help of  automated script "create_sites-xml"(updated by trscrontab job running at 2:40am in pinger@pinger.slac.stanford.edu)  which is located under TULIP directory.

We can also update landmarks manually using the following process. To update/add new nodes first we need to skim through the table schema to get to know mandatory and optional fields.  Schema for reference  is as under

 +----------------------+--------------+------+-----+---------------------+-------+
| Field                | Type         | Null | Key | Default             | Extra |
+----------------------+--------------+------+-----+---------------------+-------+
| nodeID               | int(11)      |      |     | 0                   |       |
| name                 | varchar(80)  |      |     |                     |       |
| hostName             | varchar(80)  | YES  |     | NULL                |       |
| ipv4Addr             | varchar(15)  | YES  |     | NULL                |       |
| domain               | varchar(80)  | YES  |     | NULL                |       |
| description          | varchar(200) | YES  |     | NULL                |       |
| pingerNickname       | varchar(50)  | YES  |     | NULL                |       |
| pingerMonitor        | tinyint(1)   | YES  |     | NULL                |       |
| pingerBeacon         | tinyint(1)   | YES  |     | NULL                |       |
| notCheckedAtSlac     | tinyint(1)   | YES  |     | NULL                |       |
| enabled              | tinyint(1)   | YES  |     | 1                   |       |
| institution          | varchar(100) | YES  |     | NULL                |       |
| city                 | varchar(100) | YES  |     | NULL                |       |
| state                | varchar(100) | YES  |     | NULL                |       |
| country              | varchar(100) | YES  |     | NULL                |       |
| continent            | varchar(100) | YES  |     | NULL                |       |
| latitude             | float        | YES  |     | NULL                |       |
| longitude            | float        | YES  |     | NULL                |       |
| serviceInterfaceType | varchar(30)  | YES  |     | NULL                |       |
| planetLabScript      | varchar(120) | YES  |     | NULL                |       |
| pingURL              | varchar(120) | YES  |     | NULL                |       |
| tracerouteURL        | varchar(120) | YES  |     | NULL                |       |
| pingPacketSize       | int(11)      | YES  |     | NULL                |       |
| tulipScalingFactor   | smallint(6)  | YES  |     | NULL                |       |
| tulipTier            | smallint(6)  | YES  |     | NULL                |       |
| lastUpdateDate       | timestamp    | YES  |     | 0000-00-00 00:00:00 |       |
| comments             | text         | YES  |     | NULL                |       |
+----------------------+--------------+------+-----+---------------------+-------+
  1. There are some mandatory fields required to make the TULIP work.
    1. hostName, ipv4Addr, enabled (1 or 0), latitude, longitude, serviceInterfaceType(PingER/PlanetLab) ,tracerouteURL and tulipTier
    2. Additionally we can also give city,country,state,institution etc
  2. Process for making change in database
    1. Login to tulip database (username and password available in escrow -c iepm iepmacct
    2. 24cottrell@pinger:~>mysql -u root -p tulip
      Enter password:
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
      
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 664 to server version: 4.1.22-log
      
      Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
      
      mysql>
      
    3. Change the database to tulip by cmd
    4. mysql> use tulip;
      Database changed
      
  3. Now insert new records using the following sql cmd; in this instance we are using ipv4Addr = 141.22.213.35;
  4. insert into landmarks (hostName,ipv4Addr,enabled,latitude,longitude,serviceInterfaceType,tracerouteURL,tulipTier)
    values ('mars.planetlab.haw-hamburg.de','141.22.213.35','1','53.55','10','PlanetLab','141.22.213.35','1');
    
  5. Or you can update an existing record, e.g.
  6. mysql> update landmarks set latitude=31.4190 and longitude=-122.2017 where hostname like '%www-wanmon.slac.stanford.edu%';
    Query OK, 1 row affected (0.01 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    
  7. Update Sites.xml so that it can now use the updated landmarks using following cmd
    create_sites-xml.pl >! /afs/slac/www/comp/net/wan-mon/tulip/sites.xml
    
  • No labels