HP OpenVMS Systems

ask the wizard
Content starts here

Performance of Mailbox Communications?

» close window

The Question is:

We have many processes the communicate with each other via Mailboxes.  One
 reader, one writer.
I would like to monitor these mailboxes, to see the number of records that have
 been read in a mailbox, and those not read.   That way we can obtain summary
 info for enquiries.
I dont see how to read a mailbox without removing the record from it, which
 would of course mean that the normal reading process would not read it.  It
 also doesnt answer the problem of how to access the total number of records
 processed so far.
Is what i want possible ?
Many Thanks

The Answer is :

  The device I/O operation count is an option here, and this is available
  using $getdvi[w].
  Alternatively, there are $qio function codes such as IO$_SENSEMODE that
  can be of interest.  From the OpenVMS I/O user's reference manual:
    4.3.7 Get Mailbox Information
    The get mailbox information function allows the user to find out the
    number of unread messages and bytes in the mailbox. The following
    function code is provided:
    IO$_SENSEMODE---Get mailbox contents information
  Also please see SYS$EXAMPLES:MBX$SDA.C for another potential approach.
  Also see topics (1661) for general programming information, and please
  see topics (1937), (5045), (5199) and (7359) for previous discussions
  of mailbox-related programming and considerations -- as was stated in
  topic (5199), the OpenVMS Wizard prefers to use only uni-directional
  mailboxes, with exactly one reader and zero or more writers.  This
  greatly simplifies the programming and the debugging effort, as there
  is no need to "turn around" the message traffic.  It also means that
  inserting additional mailboxes and message monitors into the message
  traffic is easier.
  The OpenVMS Wizard would tend to compartment the communications
  traffic into a set of subroutines, as this makes maintenance and
  support and debugging and monitoring easier.  Most any reasonable
  and thoughtful design for this application-specific API can also
  ease the effort involved in adding new communications transports
  into the application.

answer written or last revised on ( 30-OCT-2002 )

» close window