Russ Ross

Forum Replies Created

Viewing 15 replies – 1 through 15 (of 1,065 total)
  • Author
    Replies
  • in reply to: Archive and Remove Files from FTP Server #84751
    Russ Ross
    Participant

      Here is the underlying script (_archive_ftp_files.ksh) I wrote and use to archive my FTP files to our /oldmsgs file system.

      I run it upon receipt of FTP file(s) and then again just before delivery of FTP file(s).


      #!/usr/bin/ksh

      # Begin Module Header ==============================================================================
      #
      #——
      # Name:
      #——
      #
      # archive_ftp_files.ksh
      #
      #———
      # Purpose:
      #———
      #
      # Archive all files in the ftp source directory.
      #
      #——–
      # Inputs:
      #——–
      #

      [code]
      #!/usr/bin/ksh

      # Begin Module Header ==============================================================================
      #
      #


      # Name:
      #


      #
      # archive_ftp_files.ksh
      #
      #


      # Purpose:
      #


      #
      # Archive all files in the ftp source directory.
      #
      #


      # Inputs:
      #


      #

      Russ Ross
      RussRoss318@gmail.com

      in reply to: segment to "root" hl7 formats directory #74218
      Russ Ross
      Participant

        Russ, you seem to discourage the use of symbolic links. [code]Russ, you seem to discourage the use of symbolic links.

        Russ Ross
        RussRoss318@gmail.com

        in reply to: Process continues to auto start #84720
        Russ Ross
        Participant

          I agree with Jim that the alerts are likely to be the problem.

          Since you said the site is down, does that mean the monitor deamon is down, too?

          If the monitor daemon is not down then I don’t consider that site to be down and the alerts could be active.

          If the monitor daemon looks to be down, the alert causing the auto start could be running rogue and doesn’t have a corresponding pid file, which can be really hidden but on unix a “ps -ef” and grep for the site might help locate it in that case.

          Russ Ross
          RussRoss318@gmail.com

          in reply to: tcl help – removing non-printable characters #84697
          Russ Ross
          Participant

            There is also a couple of TCL commands listed below

            Russ Ross
            RussRoss318@gmail.com

            in reply to: "No HL7 Version Existed, Big ERROR!!!, Please REPORT&qu #82646
            Russ Ross
            Participant

              If you are saying the xlate on Cloverleaf 5.7 works and after upgrading to Cloverleaf 6.1 there is a problem, then perhaps running hcixltconvert on the cloverleaf 6.1 xlate after upgrading from cloverleaf 5.7 might be needed.

              There is also hcihl7convert an hcihl7convert for variants if the variant is the problem after upgrade.

              Russ Ross
              RussRoss318@gmail.com

              in reply to: How to migrate site from CL 5.7 to 6.1.2 #84631
              Russ Ross
              Participant

                When I did my upgrade, my cloverleaf sites for 5.6 and 6.0 were on different boxes, too.

                I did a NFS mount read only of the physical location of /cloverleaf/qdx5.6 directory onto my cloverleaf 6.0 server and used a symbolic link to make it look like they existed in the right place on my new cloverleaf 6.0 server.

                Then I was able to trick it into running hcirootcopy copy as if the older cloverleaf 5.6 version existed on the same box as the newly installed cloverleaf 6.0.

                Since the NFS mount is read only no harm can come to the older live cloverleaf version while referencing it on the new cloverleaf box with things like hcirootcopy.

                Nor do I run the risk of stepping on environment variables since each version of cloverleaf is running independently on separate servers, which is a common problem when upgrading in place on the same server.

                This technique has worked on every upgrade I’ve done to date and also had the added benefit of being able to do a clean scratch install of everything including a higher level of the OS without impacting older existing production.

                Here is a directory listing of my /cloverleaf directory on my newer cloverleaf 6.0 server to help illustrate

                Code:


                drwxrwxr-x    3 hci      staff           256 Feb  8 2013  cis6.0
                lrwxrwxrwx    1 hci      staff            41 Mar  1 2013  qdx5.6 -> /nfs/mdahub4sna/upgrade/cloverleaf/qdx5.6

                Russ Ross
                RussRoss318@gmail.com

                in reply to: How to migrate site from CL 5.7 to 6.1.2 #84629
                Russ Ross
                Participant

                  I’ve never used hcisitepromoteprep so I’m not going to try and speak to that.

                  I’ve always used hcirootcopy to upgrade a site from one cloverleaf version to another.

                  I can’t say if one is better than the other but hcirootcopy has done the job for me in case you haven’t tried it.

                  Here is a relevant code snipett of interest to illustrate, which came from my bigger script ( 60_site__hcirootcopy.ksh ) also seen later on.

                  Code:


                  #—————————-
                  # migrate specified site name
                  #—————————-

                  # Name:
                  #    hcirootcopy
                  #
                  # Usage:
                  #    hcirootcopy [-f] [-n] [-v] [-s ] [-l ] sourceRoot
                  #    where
                  #       -f              = don’t query
                  #       -n              = test only
                  #       -v              = verbose
                  #       -s   = copy a single site or colon-separated list of sites
                  #               i.e. site1 or site1:site2:site3
                  #       -l   = copy the sites listed in the file
                  #               should be newline-formatted, i.e.
                  #               site1
                  #               site2
                  #               site3
                  #       sourceRoot      = source root directory
                  #   Options -s and -l may not be used simultaneously
                  #
                  # Description:
                  #    This tool copies files from one root (the source) into another (the
                  #    ‘current,’ setroot-ed destination).  It is normally used during the
                  #    process of installing a new Cloverleaf release (i.e., the new root)
                  #    and preparing it to asuume production-ness from the source root.
                  #
                  #    It identifies root-level configuration files and prompts the user
                  #    for confirmation to copy each (unless ‘-f’ is used).  It also
                  #    identifies site directories and attempts to hcisiteinit/copy them.

                  cd $MDA_UPDIR/work
                  did_or_die “(040) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  $HCIROOT/bin/hcirootcopy -v -s $siteName $oldRoot 2>hcirootcopy.err

                  did_or_die “(050) $HCIROOT/bin/hcirootcopy -n -v -s $siteName $oldRoot 2>hcirootcopy.err”

                  Here is my entire script ( 60_site__hcirootcopy.ksh ) I wrote for to help with my last upgrade I did from cloverleaf 5.6 to cloverleaf 6.0 if that might help illustrate the code snippet above.

                  Code:


                  #!/usr/bin/ksh

                  #————————————————————————————————————-
                  # define subroutine to terminate this script if the last command execute before calling this subroutine failed
                  #————————————————————————————————————-

                  did_or_die ()
                  {
                     if test $? -ne 0 ; then
                         print
                         print “$*”
                         show_fatal_error_marker.ksh
                         exit 1
                     fi
                  }

                  #———————————————————-
                  # set the MDA_UPDIR environment variable if not already set
                  #———————————————————-

                  if [[ “`echo $MDA_UPDIR`” = “” ]]; then
                     export MDA_UPDIR=/upgrade
                  fi

                  #————————–
                  # initialize some variables
                  #————————–

                  timeStamp=$(date +”%Y.%m.%d__%H:%M:%S”)

                  myRoot=$HCIROOT
                  mySite=$HCISITE

                  #————————————-
                  # set the old and new Cloverleaf roots
                  #————————————-

                  export oldRoot=/cloverleaf/qdx5.6/integrator
                  export newRoot=/cloverleaf/cis6.0/integrator

                  oldData=/nfs/data

                  #————————————————
                  # test to be sure the specified directories exist
                  #————————————————

                  if [[ ! -d $oldRoot ]]; then
                     echo “”
                     echo “ERROR – the following oldRoot does not exist”
                     echo “”
                     echo ”     $oldRoot”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 1
                  fi

                  if [[ ! -d $newRoot ]]; then
                     echo “”
                     echo “ERROR – the following newRoot does not exist”
                     echo “”
                     echo ”     $newRoot”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 1
                  fi

                  if [[ ! -d $oldData ]]; then
                     echo “”
                     echo “ERROR – the following oldData does not exist”
                     echo “”
                     echo ”     $oldData”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 1
                  fi

                  #———————————————————
                  # set the default directory to a work directory for safety
                  #———————————————————

                  if [[ ! -d $MDA_UPDIR/work ]]; then
                     echo “”
                     echo “ERROR – the following work directory used for safety does not exist; please create!”
                     echo “”
                     echo ”     $MDA_UPDIR/work”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 1
                  fi

                  cd $MDA_UPDIR/work
                  did_or_die “(010) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  #———————————————
                  # make sure this script is run by the hci user
                  #———————————————

                  me=`whoami`

                  if [ “$me” != “hci” ]; then
                   echo “”
                   echo ”     $0 must be run as hci”
                   echo “”
                   show_fatal_error_marker.ksh
                   exit 1
                  fi

                  #———————————————-
                  # check if old site name was give as argument 1
                  #———————————————-

                  siteName=”$1″
                  if [ “$siteName” = “” ]; then
                     echo “”
                     echo “***** ERROR – must supply OLD site name *****”
                     echo “”
                     echo “Here is one example of normal usage of this scripts:”
                     echo “”
                     echo ”     $MDA_UPDIR/scripts/60_site__hcirootcopy.ksh   test_russ”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 2
                  fi

                  #—————————————————————————–
                  # confirm that site name exists in the old HCIROOT
                  # this if logic will work if the site is either a directory or a symoblic link
                  #—————————————————————————–

                  if [ ! “`ls $oldRoot/$siteName 2>/dev/null`” ]; then
                     echo “”
                     echo “***** ERROR – the site ( $siteName ) does not exist in the old HCIROOT ( $oldRoot )”
                     echo “***** this script is terminating without taking any action”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 3
                  fi

                  #——————————————-
                  # confirm that the old data directory exists
                  #——————————————-

                  if [ ! -d “$oldData/$siteName” ]; then
                     echo “”
                     echo “***** ERROR – the old data directory ( $oldData/$siteName ) does not exist”
                     echo “***** this script is terminating without taking any action”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 3
                  fi

                  #———————————————————————-
                  # confirm that $HCIROOT/siteProto/Alerts/off.alrt file has been created
                  #———————————————————————-

                  if [[ ! -a $HCIROOT/siteProto/Alerts/off.alrt ]]; then
                     echo””
                     echo “***** ERROR – need to create the off.alrt file in $HCIROOT/siteProto/Alerts”
                     echo “***** Also be sure to:”
                     echo””
                     echo “cd $HCIROOT/siteProto/Alerts”
                     echo “cp -p   default.alrt   default.alrt_`date +”%Y.%m.%d”`_original”
                     echo “vi default.alrt”
                     echo “cp -p   default.alrt   off.alrt”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 3
                  fi

                  #——————————————————
                  # warn and prompt if the site has already been migrated
                  #——————————————————

                  if [ “`ls $HCIROOT/$siteName 2>/dev/null`” ]; then
                     echo “”
                     echo “*************************************************”
                     echo “***** IMPORTANT YOU READ THIS CAREFULLY !!! *****”
                     echo “*************************************************”
                     echo “”
                     echo “***** The site ( $siteName ) has already been upgraded”
                     echo “***** type upgrade-again to continue with hiding and re-migrating the site or”
                     echo “***** hit ctrl-c  or to terminate this script”
                     echo “”
                     read xyz
                     if [ ! “$xyz” = “upgrade-again” ]; then
                        echo ” terminating without taking any action”
                        exit
                     fi
                     echo “Now proceeding to continue this script”

                     #——————————————————-
                     # check to be sure the already migrated site is shutdown
                     # before deleting it ad re-migrating
                     #——————————————————-

                     if [ “`find -L $HCIROOT/$siteName -name pid 2>/dev/null`” ]; then
                         echo “”
                         echo “***** ERROR – the site ( $siteName ) is NOT shutdown and contains the following pid file(s)”
                         echo “”
                         find -L $HCIROOT/$siteName -name pid 2>/dev/null
                         echo “”
                         echo “***** you must shutdown the active processes listed above before proceeding”
                         echo “***** this script is terminating without taking any action”
                         echo “”
                         show_fatal_error_marker.ksh
                         exit 4
                     fi

                     #—————————————————————————
                     # hide the previously migrated site that is now shutdown
                     # NOTE:  will get rid of later manually in case picked wrong site by mistake
                     #—————————————————————————

                     mv $HCIROOT/${siteName}
                        $HCIROOT/${siteName}__${timeStamp}__hide
                        2>/dev/null

                     did_or_die “(020) hide the previously migrated site $HCIROOT/${siteName} that is now shutdown”

                     if [ “`ls /sites/$HCIVERSION/${siteName} 2>/dev/null`” ]; then
                         mv /sites/$HCIVERSION/${siteName}
                            /sites/$HCIVERSION/${siteName}__${timeStamp}__hide
                            2>/dev/null
                         did_or_die “(030) hide the previously migrated site /sites/$HCIVERSION/${siteName} that is now shutdown”
                     fi

                  fi

                  #—————————-
                  # migrate specified site name
                  #—————————-

                  # Name:
                  #    hcirootcopy
                  #
                  # Usage:
                  #    hcirootcopy [-f] [-n] [-v] [-s ] [-l ] sourceRoot
                  #    where
                  #       -f              = don’t query
                  #       -n              = test only
                  #       -v              = verbose
                  #       -s   = copy a single site or colon-separated list of sites
                  #               i.e. site1 or site1:site2:site3
                  #       -l   = copy the sites listed in the file
                  #               should be newline-formatted, i.e.
                  #               site1
                  #               site2
                  #               site3
                  #       sourceRoot      = source root directory
                  #   Options -s and -l may not be used simultaneously
                  #
                  # Description:
                  #    This tool copies files from one root (the source) into another (the
                  #    ‘current,’ setroot-ed destination).  It is normally used during the
                  #    process of installing a new Cloverleaf release (i.e., the new root)
                  #    and preparing it to asuume production-ness from the source root.
                  #
                  #    It identifies root-level configuration files and prompts the user
                  #    for confirmation to copy each (unless ‘-f’ is used).  It also
                  #    identifies site directories and attempts to hcisiteinit/copy them.

                  cd $MDA_UPDIR/work
                  did_or_die “(040) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  $HCIROOT/bin/hcirootcopy -v -s $siteName $oldRoot 2>hcirootcopy.err

                  did_or_die “(050) $HCIROOT/bin/hcirootcopy -n -v -s $siteName $oldRoot 2>hcirootcopy.err”

                  #———————————–
                  # confirm that the site got migrated
                  #———————————–

                  if [[ ! -d $HCIROOT/$siteName ]]; then
                     echo “”
                     echo “***** ERROR – the site ( $HCIROOT/$siteName ) didn’t get migrated”
                     echo “***** this script is terminating without taking any action”
                     echo “”

                     #—————————————————————————————–
                     # if exists, unhide previously migrated site
                     # since hcirootcopy did not migrate the specified site
                     # probably because the user did not answer “y” when prompted to migrate the specified site
                     #—————————————————————————————–

                     if [ “`ls $HCIROOT/${siteName}__${timeStamp}__hide 2>/dev/null`” ]; then
                         mv $HCIROOT/${siteName}__${timeStamp}__hide
                            $HCIROOT/$siteName                      
                            2>/dev/null
                         did_or_die “(060) unhide the previously migrated site $HCIROOT/${siteName}__${timeStamp}__hide since hcirootcopy did not migrate the specified site”
                     fi

                     if [ “`ls /sites/$HCIVERSION/${siteName}__${timeStamp}__hide 2>/dev/null`” ]; then
                         mv /sites/$HCIVERSION/${siteName}__${timeStamp}__hide
                            /sites/$HCIVERSION/${siteName}                    
                            2>/dev/null
                         did_or_die “(070) unhide the previously migrated site /sites/$HCIVERSION/${siteName}__${timeStamp}__hide since hcirootcopy did not migrate the specified site”
                     fi

                     show_fatal_error_marker.ksh
                     exit 5
                  fi

                  #————————————
                  # make first backup copy of NetConfig
                  #————————————

                  cp -p $HCIROOT/$siteName/NetConfig $HCIROOT/$siteName/NetConfig_`date +”%Y.%m.%d”`_before_6.0_fix
                  did_or_die “(075) not able to make first backup copy of NetConfig”

                  #———————–
                  # clean up migrated site
                  #———————–

                  echo “”
                  echo “cleaning up migrated site”

                  cd $MDA_UPDIR/work
                  did_or_die “(080) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName
                  did_or_die “(090) not able to cd to $HCIROOT/$siteName”

                  rm -f $(                                  
                     ls -al | grep “^-” | awk ‘{print $9}’
                     | grep -v “keep”                      
                     | grep -v “^NetConfig*”              
                     | grep -v “^siteInfo$”                
                     | grep -v “template”
                  )
                  rm -rf lock; mkdir lock
                  rm -rf logs; mkdir logs
                  rm -rf revisions; mkdir revisions
                  rm -rf stats; mkdir stats
                  rm  -f NetConfig_before_*

                  #——————————————-
                  # hide Alerts and clean out Alerts directory
                  # ??? probably need to make sure if default.alrt is not a symbolic link before doing hcirootcopy
                  #——————————————-

                  echo “”
                  echo “Hiding alerts and cleaning out Alerts directory”
                  echo “”
                  if [[ ! -d $HCIROOT/$siteName/Alerts ]]; then
                     echo “”
                     echo “***** ERROR – no Alerts directory exists”
                     echo “”
                     show_fatal_error_marker.ksh
                     exit 9
                  fi

                  cd $MDA_UPDIR/work
                  did_or_die “(100) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName/Alerts
                  did_or_die “(110) not able to cd to $HCIROOT/$siteName/Alerts”

                  if [[ ! -a ${HCIVERSION}_hide_default.alrt ]]; then
                     cp -p default.alrt ${HCIVERSION}_hide_original_default.alrt
                     did_or_die “(120) cp -p default.alrt ${HCIVERSION}_hide_original_default.alrt”
                  fi

                  ls -al

                  rm -rf `ls -1 | grep -v “${HCIVERSION}_hide_original_default.alrt”`
                  cp -p $HCIROOT/siteProto/Alerts/off.alrt $HCIROOT/$siteName/Alerts/off.alrt
                  did_or_die “(130) cp -p $HCIROOT/siteProto/Alerts/off.alrt $HCIROOT/$siteName/Alerts/off.alrt”
                  ln -sf off.alrt default.alrt
                  did_or_die “(140) ln -sf off.alrt default.alrt”

                  echo “——————-”
                  ls -al

                  #———————————-
                  # clean up and sync views directory
                  # ??? see what views directory looks like after hcirootcopy
                  #———————————-

                  echo “”
                  echo “cleaning up views directory and synching netconfig view with netmonitor view”

                  cd $MDA_UPDIR/work
                  did_or_die “(150) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName/views
                  did_or_die “(160) cd $HCIROOT/$siteName/views”
                  rm -f .* 2>/dev/null
                  rm -f $(                                  
                     ls -al | grep “^-” | awk ‘{print $9}’
                     | grep -v “^dflt.mvw$”                
                  )
                  cp -p config_dflt.view monitor_dflt.view 2>/dev/null
                  # did_or_die “(170) cp -p config_dflt.view monitor_dflt.view 2>/dev/null”

                  #————————————————–
                  # clean up any parallel copies of scripts directory
                  #————————————————–

                  echo “”
                  echo “cleaning up any parallel copies of scripts directory”

                  cd $MDA_UPDIR/work
                  did_or_die “(172) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  rm -rf $HCIROOT/$siteName/scripts_*

                  #——————————–
                  # recreate site scripts directory
                  #——————————–

                  echo “”
                  echo “recreating site scripts directory”
                  rm -rf $HCIROOT/$siteName/scripts
                  mkdir $HCIROOT/$siteName/scripts
                  did_or_die “(180) mkdir $HCIROOT/$siteName/scripts”
                  tar_tar_dir $oldRoot/$siteName/scripts $newRoot/$siteName/scripts
                  did_or_die “(190) tar_tar_dir $oldRoot/$siteName/scripts $newRoot/$siteName/scripts”

                  echo “”
                  echo “recreating site startup backups directory”
                  rm -rf $HCIROOT/$siteName/scripts/site_startup_backups
                  did_or_die “(195) rm -rf $HCIROOT/$siteName/scripts/site_startup_backups”
                  mkdir $HCIROOT/$siteName/scripts/site_startup_backups
                  did_or_die “(196) mkdir $HCIROOT/$siteName/scripts/site_startup_backups”

                  #—————————
                  # get rid of all *.bak files
                  #—————————

                  echo “”
                  echo “getting rid of bak files”

                  cd $MDA_UPDIR/work
                  did_or_die “(200) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName
                  did_or_die “(210) $HCIROOT/$siteName”
                  find . -name “*.bak” -exec rm -rf {} ;
                  find . -name “backup” -exec rm -rf {} ;
                  find . -name “x.x” -exec rm -rf {} ;
                  find . -name “core” -exec rm -rf {} ;

                  #————————————————-
                  # clean up any backup copies of tclprocs directory
                  #————————————————-

                  echo “”
                  echo “cleaning up any parallel copies of tclprocs directory”

                  cd $MDA_UPDIR/work
                  did_or_die “(215) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  rm -rf $HCIROOT/$siteName/bkup_tclprocs
                  rm -rf $HCIROOT/$siteName/tclprocs_*
                  rm -rf $HCIROOT/$siteName/tclprocs/backup_*

                  #——————————————-
                  # clean up any backups of format directories
                  #——————————————-

                  echo “”
                  echo “cleaning up any backups of format directories”

                  cd $MDA_UPDIR/work
                  did_or_die “(217) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  rm -rf $HCIROOT/$siteName/formats/fixed_*

                  #————————————————————————-
                  # make sure the site specific tclprocs directory only contains *.tcl files
                  #————————————————————————-

                  echo “”
                  echo “making sure the tclporcs directory only contains TCL files”

                  cd $MDA_UPDIR/work
                  did_or_die “(220) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName/tclprocs
                  did_or_die “(230) cd $HCIROOT/$siteName/tclprocs”
                  rm -f .* 2>/dev/null
                  rm -f $(                                  
                     ls -al | grep “^-” | awk ‘{print $9}’
                     | grep -v “keep”                      
                     | grep -v “.tcl$”                    
                     | grep -v “template”                  
                  )
                  rm -rf *.pre38

                  #—————————————————
                  # clean up any parallel copies of tclprocs directory
                  #—————————————————

                  echo “”
                  echo “cleaning up any parallel copies of Xlate directory”

                  cd $MDA_UPDIR/work
                  did_or_die “(215) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  rm -rf $HCIROOT/$siteName/Xlate_*

                  #———————————————————————-
                  # make sure the site specific Xlate directory only contains *.xlt files
                  #———————————————————————-

                  echo “”
                  echo “making sure the Xlate directory only contains xlt files”

                  cd $MDA_UPDIR/work
                  did_or_die “(240) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName/Xlate
                  did_or_die “(250) cd $HCIROOT/$siteName/Xlate”
                  rm -f .* 2>/dev/null
                  rm -f $(                                  
                     ls -al | grep “^-” | awk ‘{print $9}’
                     | grep -v “keep”                      
                     | grep -v “.xlt$”                    
                     | grep -v “template”                  
                  )

                  #————————————————–
                  # set the ownership of the entire site to hci:staff
                  #————————————————–

                  chown -R hci:staff $HCIROOT/$siteName
                  did_or_die “(260) chown -R hci:staff $HCIROOT/$siteName”

                  #———————————————————-
                  # recreate the process directories defined in the NetConfig
                  #———————————————————-

                  echo “”
                  echo “recreating the process directories defined in the Netconfig”

                  rm -rf $HCIROOT/$siteName/exec/processes
                  mkdir $HCIROOT/$siteName/exec/processes
                  did_or_die “(270) mkdir $HCIROOT/$siteName/exec/processes”

                  cd $MDA_UPDIR/work
                  did_or_die “(280) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName/exec/processes
                  did_or_die “(290) $HCIROOT/$siteName/exec/processes”

                  procList=`grep “^process” $HCIROOT/$siteName/NetConfig | awk ‘{print $2}’ | sort`
                  for proc in $procList; do
                     rm -rf $proc
                     mkdir $proc
                     did_or_die “(300) mkdir $proc”
                  done

                  ls -al
                  echo “”

                  #——————–
                  # link data directory
                  #——————–

                  echo “”
                  echo “—————”
                  echo “ln -s   /data/$siteName   $HCIROOT/$siteName/data”
                  echo “—————”
                  echo “”

                  rm -rf $HCIROOT/$siteName/data
                  rm -rf /data/$siteName

                  mkdir         /data/$siteName
                  did_or_die “(310) mkdir         /data/$siteName”
                  ln -sf        /data/$siteName     $HCIROOT/$siteName/data
                  did_or_die “(320) ln -sf        /data/$siteName     $HCIROOT/$siteName/data”
                  tar_tar_dir   $oldData/$siteName   /data/$siteName
                  did_or_die “(330) tar_tar_dir   $oldData/$siteName   /data/$siteName”

                  #——————————————————————-
                  # make TCL index
                  # NOTE: I noticed that in Cloverleaf 6.0 mktclindex creates 2 files
                  # .upocindex
                  # tclIndex
                  #——————————————————————-

                  echo “”
                  echo “Doing a mktclindex”

                  cd $MDA_UPDIR/work
                  did_or_die “(340) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName/tclprocs
                  did_or_die “(350) cd $HCIROOT/$siteName/tclprocs”

                  cd $HCIROOT/$siteName/tclprocs
                  if [ “`ls $HCIROOT/$siteName/tclprocs/*.tcl 2>/dev/null`” ]; then
                     mktclindex
                     did_or_die “(360) mktclindex”
                  fi
                  ls -al
                  echo “”

                  #————————
                  # make TCL packages index
                  #————————

                  cd $MDA_UPDIR/work
                  did_or_die “(370) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  if [[ -d $HCIROOT/$siteName/tclprocs/packages ]]; then
                     if [ “`ls $HCIROOT/$siteName/tclprocs/packages/*.tcl 2>/dev/null`” ]; then
                        echo “”
                        echo “Doing a mkpkgindex.tcl”
                        cd $HCIROOT/$siteName/tclprocs/packages
                        did_or_die “(380) cd $HCIROOT/$siteName/tclprocs/packages”
                        # ??? skip this step until we figure out how to get mkpkgindex.tcl to work in cloverleaf 6.0
                        ### mkpkgindex.tcl -verbose —
                        ### did_or_die “(390) mkpkgindex.tcl -verbose –”
                     fi
                     ls -al
                     echo “”
                  fi

                  #———————-
                  # compile any PDL files
                  #———————-

                  echo “”
                  echo “Compiling via hcipdc any PDL file(s)”

                  cd $MDA_UPDIR/work
                  did_or_die “(400) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName/pdls
                  did_or_die “(405) cd $HCIROOT/$siteName/pdls”

                  if [ “`ls $HCIROOT/$siteName/pdls/*.pdl 2>/dev/null`” ]; then
                     hcipdc *.pdl 2>/dev/null
                     did_or_die “(410) hcipdc *.pdl”
                  fi

                  echo “”

                  #————————————————
                  # clear database for safety
                  # and reset shared memory pointer/file for safety
                  #————————————————

                  echo “”
                  echo “About to clear data base for safety”

                  setroot -clear
                  did_or_die “(420) setroot -clear”
                  setroot $myRoot $siteName
                  did_or_die “(430) setroot $myRoot $siteName”

                  showroot
                  clear_db.ksh
                  did_or_die “(440) clear_db.ksh”

                  cd $MDA_UPDIR/work
                  did_or_die “(450) set the default directory to a work directory ( $MDA_UPDIR/work ) for safety”

                  cd $HCIROOT/$siteName/exec
                  did_or_die “(460) cd $HCIROOT/$siteName/exec”
                  rm -f monitorShmemFile
                  hcimsiutil -R
                  did_or_die “(470) hcimsiutil -R”

                  setroot -clear
                  did_or_die “(480) setroot -clear”
                  setroot $myRoot $siteName
                  did_or_die “(490) setroot $myRoot $mySite”

                  #———————————————————————————————————————-
                  #  no longer necessary to reconcile symbolic links in the formats directory now that cloverleaf knows about master site
                  #———————————————————————————————————————-

                  #———————————
                  # sort the sites listed in the IDE
                  #———————————

                  $HCIROOT/mda_global/scripts/set_server_ini_environs.ksh
                  did_or_die “(500) set_server_ini_environs.ksh”

                  Russ Ross
                  RussRoss318@gmail.com

                  in reply to: syntax for hcienginestop #84501
                  Russ Ross
                  Participant

                    I use a homegrown script called stop_all_procs.ksh to shutdown all active Cloverleaf processes in the current site.

                    Code:


                    #!/usr/bin/ksh
                    #
                    # Begin Module Header ==============================================================================
                    #
                    #——
                    # Name:
                    #——
                    #
                    # stop_all_procs.ksh
                    #
                    #———
                    # Purpose:
                    #———
                    #
                    # stop all running procs defined in the process directory
                    #
                    #——-
                    # Notes:
                    #——-
                    #
                    # none
                    #
                    #———
                    # History:
                    #———
                    #
                    # 2000.10.05 Russ Ross
                    #          – wrote initial version
                    #
                    # 2005.03.28 Russ Ross
                    #          – made script smarter by checking if the pid file exists before shutting down the process
                    #
                    # End of Module Header =============================================================================

                    for process_name in `ls $HCISITEDIR/exec/processes`; do
                      if [[ -f $HCISITEDIR/exec/processes/$process_name/pid ]]; then
                          hcienginestop -p $process_name
                      fi
                    done

                    Russ Ross
                    RussRoss318@gmail.com

                    in reply to: The option to not use the Recovery Database #84474
                    Russ Ross
                    Participant

                      Look at turning off SMAT to reduce the disk I/O bottlenecks, especially if some of the SMAT is redundant like with local interfaces from one process to another or from one site to another.

                      Also if you didn’t already know this, recovery DB turned on typically only makes sense for receiving interfaces and not for sending interfaces.

                      Turn off recovery DB for sending interfaces, but not for listening interfaces, because like mentioned earlier messages will be lost if an interface with messages queued or in flight is cycled.

                      Russ Ross
                      RussRoss318@gmail.com

                      in reply to: SSL Connection #84467
                      Russ Ross
                      Participant

                        If you are able to determine the name of a license needed for what you are interested in, which is not always easy especially if you don’t have it, then you can use hcilictest to confirm if it is defined and working in your license file ($HCIROOT/vers/license.dat).

                        So if these are the moduels of interest like mentioned above

                        cl-aom-ftps

                        cl-aom-sftp

                        cl-aom-ssl

                        you can run the following commands to see if they are OK.

                        hcilictest cl-aom-ftps

                        hcilictest cl-aom-sftp

                        hcilictest cl-aom-ssl

                        This still leaves you the work of figuring out which modules are of interest.

                        Russ Ross
                        RussRoss318@gmail.com

                        in reply to: Extreme Slowness with CL 6.1.2 Windows #84384
                        Russ Ross
                        Participant

                          Now having said that bit about OBMSGID being part of the new improved check_reply, let me say I have seen the sort of error you mentioned often enough I recall it.

                          I’m talking about

                          ‘KILL ‘ (returned by ‘cl_check_ack ‘) does not match { }

                          even when the reply handling is properly configured.

                          The most common cause of this has been an extra new-line character after the ending message encapsulation and before the beginning message encapsulation of the next message.

                          This situation confuses the check_reply proc and if it results in a timeout and resend then that would cause message flow speed to be potentially horrible since this might happen for every message.

                          Russ Ross
                          RussRoss318@gmail.com

                          in reply to: Extreme Slowness with CL 6.1.2 Windows #84383
                          Russ Ross
                          Participant

                            Mike Kim you are welcome to call me and discuss.

                            We saw inexplicable slowdown and bottle necks when upgrading from cloverleaf 5.6 to cloverleaf 6.0 on the same hardware and AIX 6.1 OS.

                            We did several things that ended up being band aids but did help.

                            One significant speed improvement was upgrading the OS from AIX 6.1 to AIX 7.1 in place, which actually worked without any observed issue.

                            My suspicion is that one culprit might of been our check_reply proc did not look at OBMSGID (which I think is state 16).

                            What we had in place from before was dealing with messages in state 14.

                            When Viken held our hand through our Epic go-live, I had him add the logic to work both the old way and new way with OBSMGID that also utlizies a different NetConfig setup that our old way of implementing check reply.

                            One easy way to determine if your check_reply proc is current is to grep it for OBMSGID and see if you get any hit at all.

                            Russ Ross
                            RussRoss318@gmail.com

                            in reply to: Multiple email address on alert #84318
                            Russ Ross
                            Participant

                              See attached screen shot of how I had the security set to be able to send to a to a group email address from cloverleaf to Outlook so that Exchange would not filter it out.

                              Jim also spoke about the from and our AT&T to Black Berry was filtering because out Cloverleaf box was hci@mdanderson.edu which is an unknown domain to the world and deemed an invalid email and filtered by AT&T.

                              I was able to use the from switch to change it to NoReply@mdanderson.org which the world sees as a valid email address, plus this helped with people try to send back text replies.

                              Russ Ross
                              RussRoss318@gmail.com

                              in reply to: CAA-WS, https to and from a Cloverleaf #84347
                              Russ Ross
                              Participant

                                I collect past clovertech URLs in case I need to leverage something from the past myself.

                                Here are a couple of HTTP related URLs that talk a little about certificates even thought it is something I haven’t done myself.

                                <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=5539&#8243; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=5539

                                <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=7074&#8243; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=7074

                                Russ Ross
                                RussRoss318@gmail.com

                                in reply to: AIX 7.1 TL4 #84345
                                Russ Ross
                                Participant

                                  We are running cloverleaf 6.0.0 on AIX 7.1 TL4 SP1 without observed issue.

                                  We had upgraded in place from AIX 6.1 something.

                                  Russ Ross
                                  RussRoss318@gmail.com

                                Viewing 15 replies – 1 through 15 (of 1,065 total)