Cycle SMAT with hcicyclesavemsgs

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Cycle SMAT with hcicyclesavemsgs

  • Creator
    Topic
  • #50099
    Sandy McQuay
    Participant

    Cloverleaf 5.2, AIX 5.2

    I have a thread that will not cyclesave with hcicyclesavemsgs.  I can cycle it from the gui and from the command line but not from the script that is scheduled in cron.  Every other thread in the site will cycle, except this one.  

    I’ve tried renaming the file then stopping/starting the process, but no dice.  I have not stopped the thread, opened SMAT, closed SMAT, then restarted the thread.  The “Save outbound messages” is selected in thread configuration.  There are no other thread names similar to this one.

    Here’s how we’re set up

    Cron job:

    59 23 * * * /usr/integrator/scripts/cycle_sbmc_adt

    cycle_sbmc_adt script


    #!/usr/bin/ksh

    setroot /qdx/qdx5.2/integrator

    setsite sbmc_adt

    #  This will cycle messages consistently with the night job.

    #  No data will be lost EVER if this script is used.

    /usr/bin/ksh -c ‘eval `/qdx/qdx5.2/integrator/bin/hcisetenv -root ksh /qdx/qdx5.

    2/integrator/sbmc_adt`;hcicyclesavemsgs -d -o 120 -f /usr/integrator/CycleLog_sb

    mc_adt’ >/tmp/cycle_sbmc_adt.log 2>&1


    Here’s an excerpt from the log file:

    Processing

       Root: /qdx/qdx5.2/integrator, site: sbmc_adt, proc: sbmc_adt1, thread: emcare_adt

           20080611.00:00:03 No saved IB msg file for this thread

           20080611.00:00:04 No saved OB msg file for this thread

    I’ve talked to Quovadx (or Healthvision) support, but we haven’t been able to resolve this issue.  Any help would be greatly appreciated.

Viewing 15 reply threads
  • Author
    Replies
    • #64890
      Tom Rioux
      Participant

      The entry from the log file mentions the process name as: sbmc_adt1

      The screen shot you provided has the process name as: sbmctest_adt1

      I’m not sure where the script is pulling the process name from but you may a good place to start.

      Thanks…Tom Rioux

    • #64891
      Sandy McQuay
      Participant

      My bad  ðŸ˜³ ; here’s the production thread screenshot (I didn’t make any changes, I swear!) 😀

    • #64892
      Jim Kosloskey
      Participant

      Sandy,

      You have probably already checked for this but make sure no other thread in the same site uses the same SMAT file name.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #64893
      Alan James
      Participant

      …and, that is an outbound thread, right?

    • #64894
      Sandy McQuay
      Participant

      Yeah it’s outbound – but I just noticed I did not have the Outbound Only box checked . . . I checked it and saved the config and will bounce the process shortly.  I’ll see what happens tonight when the cycle script runs.

      Jim – the save file name is unique.  I’ve even changed it a couple of times to try to get it to cycle.  Thanks.

    • #64895
      Gary Atkinson
      Participant

      Check your log for the same thread being picked up twice by the perl script.  I had an issue where I had two threads with similar names, so one of the threads was getting picked up twice.  Also, I make sure my thread names are less than 15 characters, so hciconnstatus displays all the thread name.

    • #64896
      Sandy McQuay
      Participant

      Checking the Outbound Only box didn’t help.  The thread name is unique and under 15 characters.  Here are all the thread names in the site:

      Process            Connection    

      sbmc_adt2       adt_dump2

      sbmc_adt1       mercuryMD_adt

      sbmc_adt1       wellsoft

      sbmc_adt1       hh_adt

      sbmc_adt1       sunquest_adt

      sbmc_adt1       lab_orr

      sbmc_adt1       adt1

      sbmc_adt1       rals_adt

      sbmc_adt1       medrite_adt

      sbmc_adt1       sr_health

      sbmc_adt2       radiology

      sbmc_adt1       watchchild

      sbmc_adt2       adt2

      sbmc_adtIB      adt_IB

      sbmc_adt1       sbbh_mpi

      sbmc_adt2       inv_2_sci

      sbmc_adt2       clinic_ar_adt

      sbmc_adt2       rad_med

      sbmc_adtIB      adt1_LH

      sbmc_adt1       misys_adt

      sbmc_adt2       clinic_neaa_adt

      sbmc_adt2       ipath

      sbmc_adt2       bed_track

      sbmc_adt2       mos

      sbmc_adt2       OPC_Quantim

      sbmc_adt1       drg_qtm_epf

      sbmc_adt1       bal_epf

      sbmc_adt2       muse_adt

      sbmc_adt1       pharmacy_orders

      sbmc_adt1       adt_epf

      sbmc_adt1       medmined

      sbmc_adt2       aria_adt

      sbmc_adt1       emcare_adt

      sbmc_adt2       pyxis

      sbmc_adt2       pyxis_rx

      sbmc_adt1       adt_dump

      sbmc_adtIB      adt2_LH

      sbmc_adt2       quantim

      sbmc_adt2       pacs_adt

      Any other thoughts or ideas?  Thanks for all the suggestions.

      Sandy

    • #64897
      Gary Atkinson
      Participant

      When you run the perl script also output hciconnstatus.  What is the status of the thread in question?

    • #64898
      Michael Hertel
      Participant

      Start the threads then check the process log to see if the save failed.

      It’s possible the messages are not being saved in the first place.

    • #64899
      Sandy McQuay
      Participant

      Michael – The SMAT files continue to grow.  I have to manually cycle the output (when I remember to do it), so I assume the messages are being saved.

      Gary – Are you saying output hciconnstatus from within the hcicyclesavemsgs perl script?  I’m not too good with Perl.  Or could I do it before/after the perl script runs.

    • #64900
      Rob Abbott
      Keymaster

      The issue here is that hcicyclesavemsgs doesn’t think that OB saving is turned on for this particular thread.  It gets this information from hciconndump.

      What is the output from hciconndump -v emcare_adt (run this after a setroot to your production site)

      Rob Abbott
      Cloverleaf Emeritus

    • #64901
      Sandy McQuay
      Participant

      Here’s what I get:

      HCI root is /qdx/qdx5.2/integrator

      HCI site is sbmc_adt

      /home/hci>hciconndump -v emcare_adt

      Dump of connection(s): emcare_adt


       Process: sbmc_adt1            Connection: emcare_adt                    

       EO Proc:

      EO Config:

        EO Msg:

        Groups:

      Data Type: frl                               Options: AUTO

      RecoverDb: Yes               Hold: No       SendOnly: Yes

      Disk msgs: No

      Save Msgs:  in: No   Inbound File:

                out: Yes Outbound File: emcare_adt_OB

      Comm Type: fileset

             Mode: local-tps

      IB    style: nl               Scan time: 30        Read time: 5  

      IB max msgs: 1

      IB      dir:

      IB  dir TPS:

      IB  del TPS:

      OB    style: single           OB append: No  

      OB      dir: /usr/integrator/emcare/prod/adt/out

      OB     file: emcare.adt


    • #64902
      Gary Atkinson
      Participant

      I’ll fish again  ðŸ˜†

      What does hciconnstatus say for this thread when you run the perl script? Is it up?

      In sub ckconnStatus it has this line:

      Code:

      if (/^S+s+(S+)s+ups+S+.*$/)

    • #64903
      Rob Abbott
      Keymaster

      Here is the logic with some debugging added.  Sandy save this to your Cloverleaf system as “cycle-test”.  

      Code:



      $conn = “emcare_adt”;
      $proc = “sbmc_adt1”;
      local($filepath) = “”;
      $rootpath = $ENV{’HCIROOT’};
      $site = $ENV{’HCISITE’};

      $procpath = $rootpath . “/” . $site . “/exec/processes/” . $proc;
      print “procpath = ‘” . $procpath . “‘n”;

        open(CONNDUMP,”hciconndump -v $conn | grep ” out: ” |”)
           || warn “Cannot access hciconndump”;
        while () {
           chop;
           #; check OB flag
           $isOutbound = 0;
           if (m/s+out:s+Yess+(S+)s+File: (.*)/) {
              ($cycletype,$type,$stype,$saveFile) = (’out’,’Outbound’,’OB’,$2);
      print “match foundn”;
              local($filepath) = $procpath . “/” . $saveFile . “.idx”;
      print $cycletype . “, ” . $type . “, ” . $stype . “, ” . $saveFile . “n”;
      print “filepath = ‘$filepath’n”;
              #; cycle only if file is not empty
              if ( -s $filepath ) {
      print “file exists and is not emptyn”;
                 $isOutbound = 1;
                 &manageSaveFiles(0);# before cycle
                 &cycleSavemsgs if -s $filepath;
                 &manageSaveFiles(1);# after cycle
              } else {
      print “file does not exist or is emptyn”;
             }
           }
      }

      print “conndump completen”;
      print “isOutbound = ” . $isOutbound;

      Run perl cycle-test after a setroot and post the output.

      Rob Abbott
      Cloverleaf Emeritus

    • #64904
      Sandy McQuay
      Participant

      Here’s the output from Rob’s code:

      HCI root is /qdx/qdx5.2/integrator

      HCI site is sbmc_adt

      /usr/integrator/scripts>perl cycle-test

      procpath = ‘/qdx/qdx5.2/integrator/sbmc_adt/exec/processes/sbmc_adt1’

      match found

      out, Outbound, OB, emcare_adt_OB

      filepath = ‘/qdx/qdx5.2/integrator/sbmc_adt/exec/processes/sbmc_adt1/emcare_adt_OB .idx’file does not exist or is empty

      conndump complete

      isOutbound = 0

      Looks like a space in the file name.  I opened Netconfig and clicked in the filename field under Outbound on the Thread tab.  Sure enough there was a space after the B (i.e. “emcare_adt_OB “).  I deleted the extra space, saved Netconfig, bounced the thread and ran cycle-test again.  Here’s what I got this time:

      procpath = ‘/qdx/qdx5.2/integrator/sbmc_adt/exec/processes/sbmc_adt1’

      match found

      out, Outbound, OB, emcare_adt_OB

      filepath = ‘/qdx/qdx5.2/integrator/sbmc_adt/exec/processes/sbmc_adt1/emcare_adt_OB.idx’

      file exists and is not empty

      Undefined subroutine &main::manageSaveFiles called at cycle-test line 27, line 1.

      So, maybe the space was causing all this  :roll:.  I’ll let it cycle save normally tonight and update everyone tomorrow.  Thanks for all the suggestions (so far 🙂 ).

    • #64905
      Sandy McQuay
      Participant

      Woo Hoo!

Viewing 15 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,296
Replies
34,439
Topic Tags
287
Empty Topic Tags
10