Statistic Database tool

Clovertech Forums Cloverleaf Statistic Database tool

Tagged: 

  • Creator
    Topic
  • #122220
    Tim Jipson
    Participant

      I’ve just turned on the Stats tool. Has anyone been able to loop through the smatdb files to build history?

    Viewing 2 reply threads
    • Author
      Replies
      • #122222
        Jim Vilbrandt
        Participant

          Hi Tim,

          I didn’t really do much with this, but as SMAT are SQLite Databases, you can query them.

          cd $HCIROOT/prod_oru_lab/exec/processes/ORU
          sqlite3 GlucoTab_ORU_ob.smatdb
          sqlite> .mode column
          sqlite> .header on
          sqlite> .table
          smat_info  smat_msgs
          select MessageContent from smat_msgs where MessageContent like ‘%94728999%GLU%’;
          select replace(MessageContent,X’0D’,’\r’) msg from smat_msgs where OrigSourceConn = ‘POCcelerator_ORU’ and MessageContent like ‘%94728999%GLU%’;

          The fields in the SMAT_MSGS table are basically what you see in the SMAT Database tool.

          Regards, Jim

           

        • #122223
          Tim Jipson
          Participant

            Thanks Jim, unfortunetly our smatdb files are encrypted so that won’t work. I was able to use Charlie’s hcismatdb script to get my counts. Aside from the code for looping through the directories, this is all the code I needed then I just parse what is returned in msgCount.

             

            msgCount=/hci-scripts/msgCount/hcismatdb.tcl -i $smatFile -orsf tempsmat -site ${site:1}

          • #122224
            Charlie Bursell
            Participant

              Glad to se the database tool has not exceeded its use by date. 🙂

          Viewing 2 reply threads
          • You must be logged in to reply to this topic.