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

Compare with Current View Page History

« Previous Version 33 Next »

We are using PingER, perfSONAR/NDT 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            | Required|
+----------------------+--------------+------+-----+---------------------+-------+
| nodeID               | int(11)      |      |   | 0                  |    0    |
| name                 | varchar(80)  |      |   |                    |    0    |
| hostName             | varchar(80)  | YES  |   | NULL               |    1    |
| ipv4Addr             | varchar(15)  | YES  |   | NULL               |    1    |
| domain               | varchar(80)  | YES  |   | NULL               |    1    |
| description          | varchar(200) | YES  |   | NULL               |    0    |
| pingerNickname       | varchar(50)  | YES  |   | NULL               |    0    |
| pingerMonitor        | tinyint(1)   | YES  |   | NULL               |    0    |
| pingerBeacon         | tinyint(1)   | YES  |   | NULL               |    0    |
| notCheckedAtSlac     | tinyint(1)   | YES  |   | NULL               |    0    |
| enabled              | tinyint(1)   | YES  |   | 1                  |    1    |
| institution          | varchar(100) | YES  |   | NULL               |    1    |
| city                 | varchar(100) | YES  |   | NULL               |    1    |
| state                | varchar(100) | YES  |   | NULL               |    0    |
| country              | varchar(100) | YES  |   | NULL               |    1    |
| continent            | varchar(100) | YES  |   | NULL               |    1    |
| latitude             | float        | YES  |   | NULL               |    1    |
| longitude            | float        | YES  |   | NULL               |    1    |
| serviceInterfaceType | varchar(30)  | YES  |   | NULL               |    1    |
| planetLabScript      | varchar(120) | YES  |   | NULL               |    0    |
| pingURL              | varchar(120) | YES  |   | NULL               |    1    |
| tracerouteURL        | varchar(120) | YES  |   | NULL               |    1    |
| pingPacketSize       | int(11)      | YES  |   | NULL               |    0    |
| tulipScalingFactor   | smallint(6)  | YES  |   | NULL               |    0    |
| tulipTier            | smallint(6)  | YES  |   | NULL               |    1    |
| lastUpdateDate       | timestamp    | YES  |   | 0000-00-00 00:00:00|    0    |
| comments             | text         | YES  |   | NULL               |    0    |
+----------------------+--------------+------+-----+---------------------+-------+

The users enabled to access the various hosts are:

+---------------+---------------+
| user          | host          |
+---------------+---------------+
| scs_tulip_uro | 10.%          |
| scs_tulip_uro | 134.79.%      |
| scs_tulip_u   | 134.79.104.80 |=pinger
| scs_tulip_uro | 172.%         |
| scs_tulip_uro | 192.168.%     |
+---------------+---------------+
  1. There are some mandatory fields required to make the TULIP work. The list is given in the Required column of above table.
  2. Process for making change in database
    1. Login to tulip database (username and password available in escrow -c iepm iepmacct Note: It works from pinger@pinger.slac.stanford.edu 
    2. 24cottrell@pinger:~>mysql -h mysql-node01 -P 3307 -u scs_tulip_u -p scs_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>
      
      The password is in escrow edit -c iepm iepmacct
      or can be obtained by calling (assuming you have the right AFS privs):
      require "/afs/slac/g/scs/net/pinger/bin/admin.pl";\\
      my $wrdw = &gtpwd('tulip');
      
      or by looking in /afs/slac/package/pinger/tulip/dbPwd/pws-tulip
    3. Change the database to tulip by cmd
    4. mysql> use scs_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,domain,pingURL,city,country,continent)
    values ('pinger.stanford.edu','171.66.6.39', 1 ,'37.4285','-122.178','PingER',
    'http://pinger.stanford.edu/cgi-bin/traceroute.pl?','1','stanford.edu',
    'http://pinger.stanford.edu/cgi-bin/traceroute.pl?function=ping','Menlo Park','United States','North America');
    
  5. Or you can update an existing record, e.g.
  6. mysql> update landmarks set latitude='31.4190' 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
    
 

Displaying the database

Use http://www-wanmon.slac.stanford.edu/cgi-wrap/reflector.cgi?function=landmarks

  • No labels