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

Compare with Current View Page History

« Previous Version 42 Next »

Currently there is no automated way to install the IEPM-BW monitoring kit on a host. Here are the steps which should be followed, in order, to install the monitoring host software.This assumes that the requirements for hardware and software configuration have been met. Note that if the default account 'iepm' with home directory '/home/iepm' is used,  the source directory '/home/iepm/v3src' is used for the source, '/home/iepm/mysql' is used for the data base, then much of the installation can be done by cutting and pasting from this documentation.

Note that before starting this installation procedure, MySQLmust have been sucessfully installed and all the required perl modules must have been installed. I used to provide MySQL installation instructions, but I have found that the installation procedure depends on the specific system you are installing it on. You must use the information in the  MySQLdocumentation to install it. In addition, the installation of the required perl modules can vary system to system, and so in some cases you can use CPAN directly, but in others you may have to do the installations manually.

The following instructions must be performed as root

  1. Decide what accounts are going to be needed. Assume the account 'cal' will have root privileges and be used for operations requiring root. Assume that the monitoring will run under the non-root access account 'iepm'. Both, for purposes of this documentation are assumed to be in group '<account group>, 'slac'. For this example, I will assume that the home directory for the 'cal' account is '/home/cal', and the home directory for the 'iepm' account is '/home/iepm'. For the sake of consistency beteween monitoring systems, the account 'iepm' with '/home/iepm' is strongly recommended.
  2. The monitoring host has a name. This is referred to as '<fully qualified monitoring host name>'.
  3. The monitoring host should be given an <aliasname>  that starts with 'iepm-bw'. The idea is to hide the real name of the node, but provide it with a name that can recognize its place in the world. This is important. Examples include:
    • iepm-bw.twaren.net
    • iepm-bw.caltech.ul-org
    • iepm-bw.cern.ch
    • iepm-bw.bnl.org
    • iepm-bw.snv.ul-org
    • iepm-bw.fzk.de
  4. If the account mysql:mysql has not been allocated, allocate it by:
    groupadd -g 20000 mysql
    useradd -u 20000 -g mysql mysql
    
  5. Decide on the directory structure for the mysql data base and the monitoring code. It is best to have the mysql data base on a separate physical disk from the system disk, but if this is not possible, use '/home/iepm/mysql' as the base. Make the mysql directory.
    mkdir /home/iepm/mysql
    chown mysql:mysql /home/iepm/mysql
    
  6. Create a configuration file for /etc/my.cnf which MySQL will use when you install the database.
    [mysqld]
    datadir=/home/iepm/mysql
    socket=/home/iepm/mysql/mysql.sock
    port=3306
    [mysqld_safe]
    datadir=/home/iepm/mysql
    socket=/home/iepm/mysql/mysql.sock
    port=3306
    [mysql.server]
    datadir=/home/iepm/mysql
    socket=/home/iepm/mysql/mysql.sock
    port=3306
    [client]
    socket=/home/iepm/mysql/mysql.sock
    port=3306
    
  7. If mysql is already running, it is running with the 'test' database. Kill the mysql daemons.
  8. Restart MySQL with 'mysqld_safe&'. This will restart the MySQL server with the configuration file /etc/my.cnf.
  9. Create the data base by executing 'mysql_install_db'.
  10. Change the ownership of '/home/iepm/mysql' by the command chown 'chown -R mysql:mysql /home/iepm/mysql'.
  11. Set the database root password with 'mysqladmin -u root password "new password" '.
  12. You are now ready to create the directories with '/home/iepm/mysql' that must be owned by the iepm account. These directories are used by the iepm monitoring to track the state of the monitoring system. Execute the following commands with 'iepm:slac' replaced with 'slac' replaced by the appropirate group for the 'iepm' account.
    # the data directory is where the results from the probes are stored.
    # These files are picked up by the 'load-datad' daemon and put into the database.
    mkdir /home/iepm/mysql/data
    chown iepm:slac /home/iepm/mysql/data
    # the logs directory contain the log files from each process
    mkdir /home/iepm/mysql/logs
    chown iepm:slac /home/iepm/mysql/logs
    # the pids from the daemons are stored here
    mkdir /home/iepm/mysql/pids
    chown iepm:slac /home/iepm/mysql/pids
    # the files in the keepalives directory are used by the monitoring software to ascertain that
    # the daemons are running
    mkdir /home/iepm/mysql/keepalives
    # prime the pump with:
    touch /home/iepm/mysql/keepalives/traced.alive
    touch /home/iepm/mysql/keepalives/pingd.alive
    touch /home/iepm/mysql/keepalives/bw-synched.alive
    touch /home/iepm/mysql/keepalives/pathchirpd.alive
    touch /home/iepm/mysql/keepalives/load-datad.alive
    touch /home/iepm/mysql/keepalives/load-scheduled.alive
    touch /home/iepm/mysql/keepalives/owpingd.alive
    # set the permissions so that the iepm account can access them
    chown -R iepm:slac /home/iepm/mysql/data
    chown -R iepm:slac /home/iepm/mysql/logs
    chown -R iepm:slac /home/iepm/mysql/keepalives
    chown -R iepm:slac /home/iepm/mysql/pids
    
  13. The output from the analysis and reports must go into a directory which is writeable by the 'iepm' account. Generally this is '/home/iepm/public_html'. Make this directory with:
    mkdir /home/iepm/public_html
    mkdir /home/iepm/public_html/<aliasname>
    chown -R iepm:<account> /home/iepm/public_html
    
  14. Create a link to this area from /var/www/html
    ln -s /home/iepm/public_html/<aliasname> /var/www/html/<aliasname>
    
  15. IEPM-BW requires a simple configuration file, '/etc/iepm.cnf'. The contents of /etc/iepm.cnf should contain:
    # required iepm configuration parameters
    # /etc/iepm.conf
    
    dataBase = "iepm"
    dataBaseHost = "<fully qualified monitoring host name>"
    dataBaseDir = "/home/iepm/mysql"
    iepmSrcDir = "/home/iepm/v3src"
    updateAcct = "iepm"
    acctGroup = "<account group>"
    readAcct = "readonly"
    # This is provided as the monitoring host and database host could be different machines
    # It is not advisable for them to be different. In monitoring a network, one should avoid using the
    # network for the monitoriong control and data logging.
    monHost = "<fully qualified monitoring host name>";
    aliasName = "<aliasname>";
    monHostip = "<monitoring host ip address>";
    mysqlport = 3306;
    
    #Connie Logg 5/12/04 cal@slac.stanford.edu <- configurator's name and date please
    

The following installation instructions do not need root privileges can be performed under the iepm account.

Currently loading of the monitoring host is done from iepm-bw.slac.stanford.edu.

  1. Enter the node into the 'NODES' data base.
  2. Enter the node into the 'MONHOST' data base.
  3. On iepm-bw.slac.stanford.edu, make a tar file including all the code.
    cd /afs/slac/package/netmon/bandwidth-tests/v3src
    tar -cvf dist.tar -T dist.scripts.list
    scp dist.tar iepm@<fully qualified monitoring host name>:/home/iepm/dist.tar
    
  4. Log onto the new monitoring host node under the 'iepm' account.
  5. Execute the following to install the source code
    mkdir v3src
    cd v3src
    tar -xvf ../dist.tar
    
  6. Now configure the 'config' directory. The following files may need configuration:
    •  The 'config' directory contains a sample .cshrc. Modify this to match the node being installed and copy it to '/home/iepm/.cshrc'. This will defined where java is located, and two environment variables "$bandsrc" which points to the v3src directory and "$banddata" which points to the directory where the data and reports are stored. Note that there is a link from '/var/www/html' to this directory.
    • 'cleanup-list' - should be configured correctly. If there are processes which are known to hang, they should go in this file. 'bw-cleanup' uses this file to clean processes known to hang (now or in the past). If the process with the name in this list exists longer than the number of minutes indicated on its line, it will be killed.
      An example is:
    • # cleanup process list
      # Connie Logg 5/18/06 cal@slac.stanford.edu
      post-test,120
      gnuplot,5
      triganal,120
      runperiod,120
      pathload_rcv,3
      pathchirp_rcv,3
      /bin/ping,3
      /bin/owping,3
      /bin/iperf,3
      /bin/tlaytcp,3
      /bin/bw-iperf-client,3
      
    • 'owampd.conf.template', 'owampd.limits', and 'owampd.keys' are configuration files for owamp.  'owampd.limits' and 'owampd.keys' should be ok.  Look at owampd.conf.template. 'datadir' and 'vardir' are defined to be '/home/iepm/owamp/data' and '/home/iepm/owamp/run' respectively. If this is ok (recommended default), save 'owampd.conf.template' as 'owampd.conf'. Then create the directories:
      mkdir /home/iepm/owamp
      mkdir /home/iepm/owamp/data
      mkdir /home/iepm/owamp/run
      
    • 'servers.alive' may need to be configured. This is the file that has the information for starting the servers. It is used by 'keep-servers-alive' to start, and if necessary, restart the servers. For a standard monitoring host, this file should be:
      bw-iperf-server,bin,-s -p 5000 -w 20M
      thrulayd,bin,
      pathload_snd,bin, -q -i
      map-updated,,
      pathchirp_snd,bin,
      owampd,bin, -c /home/iepm/v3src/config -Z >& /tmp/owampd.log &
      
      The first field is the name of the script. The second field is the directory in $iepmSrcDir where the script resides. The third is a list of parameters to start it with.
    • Make copies of /etc/my.cnf and /etc/iepm.cnf in the config directory. They are used to provide configuration information to the CGI scripts.
      cp /etc/my.cnf /home/iepm/v3src/config
      cp /etc/iepm.cnf /home/iepm/v3src.config/iepm.cnf.<aliasname>
      
  7. Install JAVA, if required. If it must be installed, the recommended installation directory is '/home/iepm'. To install it, copy the 'JDK...bin' in 'home/iepm/iepmtools' to '/home/iepm' and execute it.
  8. Configure Geoplot.
  9. Load the NODES and NODESPECS tables, MONHOST table, TOOLSPECS table, PLOTSPECS table, and ther GROUPS and NODEGROUPS tables if you want to use their functionality.
  10. Once the tables are loaded, run the various reports for them. 'report-nodes' should be run first. If MONHOST is not set up correctly, none of the reports will run. You must fix MONHOST first.
  11. Once all the reports run, you are ready to try the probes. 'schedule-load' will force the probes to be scheduled and run. Look in $mysqldb/data and check the data files that are output from the probes running. If they look ok, you can execute the various 'load-<type>data' scripts to load them into the data base. Do not start 'load-datad' until you have verified that the individual 'load<type>-data' scripts are working correctly. The biggest issue here is making sure MySQL is properly configured.
  • No labels