JD

Forum Replies Created

Viewing 15 replies – 1 through 15 (of 22 total)
  • Author
    Replies
  • in reply to: Run hcicmd from a tcl script #121072
    JD
    Participant

      Initially I tested explicitly with one process, one thread, one site, and it all worked smoothly; now it looks like a time out (as you mentioned) may be occurring and the threads do not stop.  Also, seems the hcicmd command to stop the thread works when script is run when setsite is set to the site where the thread lives.  Can the perl command be run from a tcl script via “exec”?

      in reply to: Run hcicmd from a tcl script #121054
      JD
      Participant

        Great to know and good news – thanks.

        in reply to: NetConfig Parse – Basic #120597
        JD
        Participant

          Hello – thank you for the details.  I’ll play around with the code, have lots to learn still.

          in reply to: NetConfig Parse – Basic #120593
          JD
          Participant

            Hello – thanks for the code.  I tried running a test, but still having probs.  Below is that I have tested, and the output of the run.   I run the script when setsite is “dev_lab”.   Running CL version 20.1.   Thanks

            #!/bin/env tcl
            #####################################################################
            # need to reditect output to file to capture output
            # based on clovertech sample
            # Tcl program to obtain Routing info for each thread
            # Author: James Cobane
            ##########################################################

            global hciRoot global hciSite
            global siteDir

            set hciRoot $env(HCIROOT)
            set hciSite $env(HCISITE)
            set siteDir $env(HCISITEDIR)

            set netConfigName [lindex $argv 0]
            netcfgLoad $netConfigName
            #set connList [lsort [netcfgGetConnList]]

            #jd
            #headings
            puts “Site#Process#SourceThrd#IbHost#IbPort#IbType#IbAutoStrt#IsSrvr#IbDirParseProc#IbFtpDir#SrcInDataProc#SrcOutDataProc#TrxID#RawRtProc#XlPreProc#XlPostProc#XlType#Xlate#DestThrd#ObHost#ObPort#ObType#ObAutoStrt#ObIsSrvr#ObFtpDir#DestInDataProc#DestOutDataProc”
            #jd end
            #set site1 “dev_misc”
            set site1 “devcb2a”

            # from clovertech
            set ret_cd [catch {eval [exec ${::env(HCIROOT)}/sbin/hcisetenv -site tcl $site1]} err]
            sleep 1
            if {$ret_cd} {
            echo “>>> Switch to site >$site1< failed… EXITING <<<”
            exit
            }

            if ![catch {netcfgLoad $hciRoot/$site1/NetConfig} err] {
            if {$err} {
            puts “>>> Failed to load NetConfig >$site1< failed EXITING <<< ”
            exit
            }
            set connList [lsort [netcfgGetConnList]]
            echo “CONN LIST: ” $connList
            }
            exit

            === output ====
            [hci WIP]$ ./tpsTest.tcl
            Site#Process#SourceThrd#IbHost#IbPort#IbType#IbAutoStrt#IsSrvr#IbDirParseProc#IbFtpDir#SrcInDataProc#SrcOutDataProc#TrxID#RawRtProc#XlPreProc#XlPostProc#XlType#Xlate#DestThrd#ObHost#ObPort#ObType#ObAutoStrt#ObIsSrvr#ObFtpDir#DestInDataProc#DestOutDataProc
            Global variable name ‘ukg’ not found
            Global variable name ‘ukg_login’ not found
            Global variable name ‘lawprod’ not found
            Global variable name ‘lawprod’ not found
            Global variable name ‘lawprod’ not found
            Global variable name ‘lawprod’ not found
            Global variable name ‘lawprod’ not found
            Global variable name ‘lawprod’ not found
            Global variable name ‘ftp_proview’ not found
            Global variable name ‘ftp_gempos’ not found
            Global variable name ‘lawprod’ not found
            Global variable name ‘ftp_proview’ not found
            >>> Failed to load NetConfig >devcb2a< failed EXITING <<<

            in reply to: NetConfig Parse – Basic #120590
            JD
            Participant

              Hello – still having some issues with the NetConfig read/parse script that I have been “playing” with.  The script is based on feedback/input from this forum and its highly appreciated.

              The script is mostly fuctional (?! 🙂 ), but it hits an error when the NetConfig that is being read/parsed has references to global variables. I’ve tried a few suggestions found in the forum, but I can’t get this to work.

              For example, if setsite is set to dev_lab, and I ran the script the script throws errors when it reads the NetConfig for the devcb2a site because the NetConfig for devcb2a has references to global variables, but the global variables don’t exist in the dev_lab site or environment (at least that’s what I think the issue is).  I believe I need to set the site to the site that corresponds to the NetConfig that is being read/parsed.   How can I change or set the site (setsite) environment to the appropriate site?   Thanks in advance.

              Script segment below:

              #!/bin/env tcl
              #####################################################################
              # need to reditect output to file to capture output
              # based on clovertech sample
              # Tcl program to obtain Routing info for each thread
              # Author: James Cobane
              #####################################################################

              global hciRoot global hciSite
              global siteDir

              set hciRoot $env(HCIROOT)
              set hciSite $env(HCISITE)
              set siteDir $env(HCISITEDIR)

              set netConfigName [lindex $argv 0]

              netcfgLoad $netConfigName

              set connList [lsort [netcfgGetConnList]]
              #jd
              #headings
              puts “Site#Process#SourceThrd#IbHost#IbPort#IbType#IbAutoStrt#IsSrvr#IbDirParseProc#IbFtpDir#SrcInDataProc#SrcOutDataProc#TrxID#RawRtProc#XlPreProc#XlPostProc#XlType#Xlate#DestThrd#ObHost#ObPort#ObType#ObAutoStrt#ObIsSrvr#ObFtpDir#DestInDataProc#DestOutDataProc”
              #jd end
              #set site1 “dev_misc”
              set site1 “devcb2a”

              ##if ![catch {netcfgLoad} err] {
              ##NCFG:ChangeSite $site1
              ##puts “>>>> CHANGING SITE pre netconfig load<<<<<”
              ##netcfgLoad
              ##puts “>>>> post netconfig load<<<<<”
              ##}
              ##exit

              set siteList [lsort $site1]
              foreach site $siteList {
              if ![catch {netcfgLoad $hciRoot/$site/NetConfig} err] {
              NCFG:ChangeSite $site
              netcfgLoad
              if [string equal $err “1”] {
              puts “>>>> $site ERROR HERE?!?! $err <<<<<”
              exit
              }
              .
              .
              .

              in reply to: NetConfig Parse – Basic #120573
              JD
              Participant

                Hello – found that I was missing one command in the sequence I was originally testing.

                [dev_pt_mgmt]$ tcl
                tcl>netconfig load
                1
                tcl>netconfig get version
                3.20
                tcl>netconfig get connection list
                to_masimo_NPE_adt to_collectivemed_adt to_iecg_adt …..
                ///// was missing this command
                tcl> set to_masimo_NPE_adt [netconfig get connection data to_masino_NPE_adt]
                    { AUTOSTART 1 }
                    { BITMAP {} }
                    { COORDS {0 0} }
                    { DATAFORMAT {
                        { FRLTYPE offlen }
                        { OFFLEN {
                            { LEN 0 }
                . . .
                tcl>keylget to_masimo_NPE_adt PROTOCOL.PORT
                10974
                tcl> keylkeys to_masimo_NPE_adt
                AUTOSTART BITMAP COORDS
                . . .
                tcl>
                in reply to: Extra step to keep processes/threads down #120572
                JD
                Participant

                  Hello – thanks for the details.  The bulk of the interfaces are new and will need new sites created when moved to live; a few interfaces will be additions to existing sites in production.  Maybe have a sort of template NetConfig to use after the interfaces are moved to live and swap with the new production NetConfigs as you suggest.  Thanks again.

                  in reply to: NetConfig Parse – Basic #120569
                  JD
                  Participant

                    Hello!  I need to explore this a lot more – thanks for the details.

                    in reply to: NetConfig Parse – Basic #120568
                    JD
                    Participant

                      Hello – thanks!  Works great!  A great reference for sure.  Ideally need to capture site, process,  source information (name, ip, port) , destination information (name, ip, port), xlate info, tcl info all in one line/record; your script seems like great starting place.  Thanks again.

                      in reply to: NetConfig Parse – Basic #120567
                      JD
                      Participant

                        Hello – thanks!  Works great!  A great reference for sure.  Ideally need to capture site, process,  source information (name, ip, port) , destination information (name, ip, port), xlate info, tcl info all in one line/record; your script seems like great starting place.  Thanks again.

                        in reply to: Extra step to keep processes/threads down #120560
                        JD
                        Participant

                          Hello – comments noted.  The plan is to move interfaces to prod well ahead of the to live date with the setting set to not auto start.  I was looking for another layer of assurance to keep threads down until ready to be started.  Apologies for the late reply and thank you.

                          in reply to: Extra step to keep processes/threads down #120542
                          JD
                          Participant

                            Hello – thanks for the insight.   We’re looking to have things in the live environment well ahead of the actual go live.  The threads will be set to not auto start, but I was curious to see if there might be another layer of safety to prevent anything from coming up.

                            What happens if siteA, siteB ad SiteC are removed from the server.ini file?  This will prevent the sites from coming up?  But, this will also prevent the sites from being accessed via the IDE GUI, right?  Thanks

                            JD
                            Participant

                              Hello – thank you for the recommendation and the link to the details very much; will keep that option handy.   Have discovered that a pdl tcpip thread can be set up to delay the connection so that it connects when there is data to transmit and it would transmit one message per connection; would this option  generally be a performance issue in the engine for an adt thread with a steady flow of data?   Thanks again.

                              in reply to: steps post moving threads to new site #120434
                              JD
                              Participant

                                Hello – thank you; will take that into account as well.  JD

                                in reply to: remove \F\ or \T\ or \R\ or \T\ from an HL7 field #120421
                                JD
                                Participant

                                  Thanks – looking at the string map option. Seems to work from tclsh prompt.  Now try in xlate.  Appreciate the offer, I may be ok, will find out this afternoon.

                                Viewing 15 replies – 1 through 15 (of 22 total)