Usage and differences of omget

The following is essentially my understanding of several emails that Alex Johnson has put out regarding the use of omget vs. omgetimp. -*David

omget is a command line tool that let's you retrieve an object manager value. omget was superceded by omgetimp in I/A version 4.3. omgetimp makes use of the import tables to minimize nodebus traffic.

Alex Johnson recommends renaming omget and omset omgetBCAST and omsetBCAST respectively. Then you can copy omgetimp and omsetimp over the originals.


omget works by broadcasting a request to all the control stations on the nodebus network to see if they have a particular object manager variable. Each station will check to see if it has the om variable. The station that has the value will return it. All of the other stations will have wasted time processing a request for information that they do not have. omgetimp checks the host station's (the AW you ran the command from) import table to see if the om variable requested (or at least the COMPOUND requested) is already there. If so the request is sent only to the control station that has the variable. If not, one broadcast message is sent and the control station that responds is put on the import table to prevent future broadcasts. This reduces broadcast messages, and minimizes the amount of nodebus traffic and wasted processing on control stations that do not have the value. It is possible to fill the IMPORT TABLES on an AW, but the default number of slots is fairly large and typically COMPOUNDS (top level names) are stored and not entire the C:B.P .


You can monitor the IMPORT table by running /usr/local/show_params.


The size of the IMPORT table can be increased by following the procedure described either of the following manuals:

 

  • B0193MJ - 50 Series Configurable Operating System and 
  • B0193ND - System Administration Guide for 50 Series Systems (Solaris 2.X)


I cannot think of any situation where omget is preferred over omgetimp.

omget is located in /opt/fox/bin/tools on 50 and 70 series workstations.

The man page for omget follows.


      OMGET                                                          OMGET

 

      NAME          omget - get the values of OM global objects
      SYNOPSIS      omget [-av] {<name>}
      DESCRIPTION   omget can get the values of OM global objects of  type
                    alias  (-a)  and variable (-v). The -av options define
                    the type of object.  The options are mutual exclusive.
                    The default type is variable (-v).
                    The value of more than one object can be retrieved  at
                    a time by specifying more than one name at the command
                    line. omget reports the data type of each  object  and
                    its value.
      SEE ALSO      SDS 1430: Object Manager: Section 8.1.1 - Get Value
      LIMITATIONS   You can only retrieve the values  of  objects  of  the
                    same  type  at  a  time.  If  you need to retrieve the
                    values of different object types you should use  omget
                    repeatedly.  The maximum number of objects that can be
                    specified on the command line is 30.

 


So let's see an example or two.

getting a real value
AW51D1# /opt/fox/bin/tools/omget TEST2:AIN_1.PNT 
TEST2:AIN_1.PNT (f): 10 

getting a hex value
AW51D1# /opt/fox/bin/tools/omget TEST2:AIN_1.BLKSTA
TEST2:AIN_1.BLKSTA (pl): 0x00008800 

getting a boolean value
AW51D1# /opt/fox/bin/tools/omget TEST2:AIN_1.MA
TEST2:AIN_1.MA (b): TRUE 

getting an integer
AW51D1# /opt/fox/bin/tools/omget TEST2:X1.II0001
TEST2:X1.II0001 (l): 0 

getting a string
AW51D1# /opt/fox/bin/tools/omget TEST2:AIN_1.ANM
TEST2:AIN_1.ANM (s): [ALARM NAME] 


Hope that helps.

David

>added string get - Brad Wilson