msiGlobalInit

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf msiGlobalInit

  • Creator
    Topic
  • #47759
    Anonymous
    Participant

      My first experience with alerts and I’m trying to incorporate a TCL proc into it to interrogate the the thread’s information.

      All I’m trying to do for starters is make sure the thread name is valid.

      proc EOM_Alerts { args } {

         keylget args THREADNAME threadName

         msiAttach

         echo “*** MSIATTACH DONE ***”

         if {[msiTocEntry $threadName returnValue] == 0} {

             echo “*** $threadName DOES NOT EXIST FOR SITE mhpmitst ***”

             #exec /scripts/emclient -s minor -g IE_APP -o $threadName -a mphmitst -t

      “The thread name $threadName does not exist for site mhpmitst – check engine’s

      alert configuration”

             #return

         }

      }

      I get this error: [msi :msi :ERR /0:  hcimonitord] msiGlobalInit: Called more than once!

      I tried a couple different things but I’m missing something.

      Any ideas for this alert newbie?

      Thanks.

    Viewing 3 reply threads
    • Author
      Replies
      • #56639
        garry r fisher
        Participant

          Hi,

          I think I might be missing something – why use msiAttach?

          Regards

          Garry

        • #56640
          Anonymous
          Participant

            The error points out that there might be some problem.  You’re either running this procedure more than once or you’re running msiAttach in another proc also.  msiAttach only needs to be executed once per namespace.

            If you want to run this proc twice then just catch the msiAttach statement:

            catch { msiAttach }

            Or move the msiAttach statement to a place where it’s only executed once, like in the startup section of a TPS procedure.

          • #56641
            Anonymous
            Participant

              Thanks, Greg…I had forgotten about the catch command!

              I hadn’t thought of the startup mode as I assumed, for whatever reason, that procs called from an alert operated under different rules than a inbound or outbound TPS stack. But I suppose they’d be no different than any other TPS, correct?

              Thanks again!

            • #56642
              Anonymous
              Participant

                Actually, I haven’t considered namespaces in the monitor daemon (where alerts run).  If your tcl was running from an alert and there is a persistent namespace loaded at start time of the monitord then when the first alert ran that executed msiAttach, you wouldn’t get an error the first time but would everytime after that.  Since I haven’t tested it, it’s possible that each alert tcl is running in it’s own temporary namespace that goes away when the tcl ends.  My guess is that there is one persistent name space.

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