OpenVMS mailbox - logging

Everything about buying, using, and managing OpenVMS systems not covered by other sections.

Topic author
garyrevell
Active Contributor
Posts: 38
Joined: Thu Nov 19, 2020 7:15 am
Reputation: 0
Location: Basingstoke, UK
Status: Offline
Contact:

OpenVMS mailbox - logging

Post by garyrevell » Wed Sep 15, 2021 1:25 pm

Hi all,

We've got a complex application that makes a lot of use of mailbox interprocess communication, there are many processes and differing messages.

My question are.... is there a way of seeing what messages & contents are in the mbx without actually reading them via a $QIO(W)? Perhaps there's a tool or example program that allows access to the data in an mbx via system services etc?

Thanks!

Gary

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: OpenVMS mailbox - logging

Post by volkerhalle » Thu Sep 16, 2021 1:51 am

Gary,

check out the MBMON - Mailbox Monitor - written by Ian Miller:

https://eisner.encompasserve.org/~miller/

There seem to be no hooks inside [SYS]SYSMAILBX for tracing or logging.

Volker.

Added in 3 hours 21 minutes 35 seconds:
Gary,

I did a quick test: downloaded and built MBMON010 on OpenVMS Alpha V8.3. Seems to work.

You need to build the help library and define a logical, so that MBMONCP> HELP does work:

$ LIBRARY/HELP/CREATE HELPLIB mbmon.hlp
$ DEFINE HELPLIB SYS$DISK:[]HELPLIB.HLB

Created a mailbox in one session:

CHAALP $ CREATE/MAILBOX/PERMANENT/MESSAGE_SIZE=512/LOG MY_MAILBOX
%CREATE-I-CREATED, MBA124: created
CHAALP $ open/write x mba124:
CHAALP $ write x "test"

In another session:

CHAALP $ RUN mbmoncp
MBMON> monitor mba124:
Press control-C to exit
Message from 000000d4 _RTA1:, length 4
74 65 73 74
Cancel

Exiting due to control-C
MBMON> exit

Read mailbox to allow writer to complete the write operation and exit

CHAALP $ open/read y mba124:
CHAALP $ read y line
CHAALP $ sho symb line
LINE = "test"
CHAALP $ close y

CHAALP$ delete/mailbox my_mailbox

Note that you can build and use SYS$EXAMPLES:MBX$SDA.C to find information about mailboxes in the system.

Volker.


Topic author
garyrevell
Active Contributor
Posts: 38
Joined: Thu Nov 19, 2020 7:15 am
Reputation: 0
Location: Basingstoke, UK
Status: Offline
Contact:

Re: OpenVMS mailbox - logging

Post by garyrevell » Fri Sep 17, 2021 7:43 am

Thanks Volker, this is very helpful.

I've had a look at this and managed to build a copy of MBU OK. The problem is, is that the VIEW command doesn't seem to work and so I can't see the messages queued up in the MBX.

I tried to build MBMON but get some compiler errors:

vp = refhdl.lid->ldrimg$l_nonpag_w_base;
.............................^
%CC-E-NEEDMEMBER, In this statement, "ldrimg$l_nonpag_w_base" is not a member of "refhdl.lid".
at line number 141 in file SYS$SYSDEVICE:[test.mbmon.src]mbmon_prv.c;1

vp = refhdl.lid->ldrimg$l_nonpag_w_base;
.....................^
%CC-E-NEEDMEMBER, In this statement, "ldrimg$l_nonpag_w_base" is not a member of "refhdl.lid".
at line number 239 in file SYS$SYSDEVICE:[test.mbmon.src]mbmon_prv.c;1

So a bit stuck here.

Thanks

Gary

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: OpenVMS mailbox - logging

Post by volkerhalle » Fri Sep 17, 2021 8:51 am

Gary,

I didn't try MBU...

Which version and architecture of OpenVMS are you trying to build these tools on ?

Volker.


shael_richmond
Member
Posts: 5
Joined: Fri Aug 06, 2021 4:22 pm
Reputation: 0
Status: Offline

Re: OpenVMS mailbox - logging

Post by shael_richmond » Fri Sep 17, 2021 5:54 pm

We have always used MBOX. It works on VAX, Alpha, and Itanium.

ISPPRB_SM30PDD2> type aaareadme.txt
MBOX V1.6 15-MAY-1995 Neill Clift (neill@macro.demon.co.uk)

It displays the mailbox messages without destroying them.

ISPPRB_SM30PDD2> mbox shael_mbx

Device: MBA23892: (SHAEL_MBX/LNM$SYSTEM_TABLE)

Channels: 0, Operations: 7, Creator: 00000000 (Nonexistent)

Total size: 50000, Remaining: 49987, Message size: 1000, Msgs: 1

Message number: 1, 13 bytes, Written by: 00000000 (Nonexistent) Waiting
33 5F325F31 5F676E69 74736574 testing_1_2_3....... 00000000


Shael Richmond

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: OpenVMS mailbox - logging

Post by volkerhalle » Sun Sep 19, 2021 1:51 am

Gary,

ldrimg$l_nonpag_w_base should be declared in module LDRIMGDEF in SYS$LIBRARY:SYS$LIB_C.TLB

I need more information about your OpenVMS version to try to find out, why the compile fails on your system.

Volker.


Topic author
garyrevell
Active Contributor
Posts: 38
Joined: Thu Nov 19, 2020 7:15 am
Reputation: 0
Location: Basingstoke, UK
Status: Offline
Contact:

Re: OpenVMS mailbox - logging

Post by garyrevell » Mon Sep 20, 2021 9:02 am

shael_richmond wrote:
Fri Sep 17, 2021 5:54 pm
We have always used MBOX. It works on VAX, Alpha, and Itanium.

ISPPRB_SM30PDD2> type aaareadme.txt
MBOX V1.6 15-MAY-1995 Neill Clift (neill@macro.demon.co.uk)

It displays the mailbox messages without destroying them.

ISPPRB_SM30PDD2> mbox shael_mbx

Device: MBA23892: (SHAEL_MBX/LNM$SYSTEM_TABLE)

Channels: 0, Operations: 7, Creator: 00000000 (Nonexistent)

Total size: 50000, Remaining: 49987, Message size: 1000, Msgs: 1

Message number: 1, 13 bytes, Written by: 00000000 (Nonexistent) Waiting
33 5F325F31 5F676E69 74736574 testing_1_2_3....... 00000000


Shael Richmond
Tried using MBOX, copied it over, built it, ran it and.... BANG, crashed our Dev server....

Back to the drawing board.

Gary
Last edited by garyrevell on Mon Sep 20, 2021 9:40 am, edited 1 time in total.


shael_richmond
Member
Posts: 5
Joined: Fri Aug 06, 2021 4:22 pm
Reputation: 0
Status: Offline

Re: OpenVMS mailbox - logging

Post by shael_richmond » Mon Sep 20, 2021 2:01 pm

garyrevell wrote:
Mon Sep 20, 2021 9:02 am

Tried using MBOX, copied it over, built it, ran it and.... BANG, crashed our Dev server....

Back to the drawing board.

Gary
; V01-007 Neill clift <neill@macro.demon.co.uk>␉␉15-MAY-1995
; Display creator of mailbox if its a temporary.
; V01-008 Neill clift <neill@macro.demon.co.uk>␉␉22-MaY-1996
; Update for 64 bit ACB fields. Truncate to 32 bits anyway!
; V01-009 Volker Halle <volker.halle@invenate.de> 14-Aug-2005
; Support new mailbox size > 64k (V7.3-1 or higher)

We also had to make a small change to deal with message size.


Shael

User avatar

volkerhalle
Master
Posts: 196
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: OpenVMS mailbox - logging

Post by volkerhalle » Tue Sep 21, 2021 2:58 am

Gary,

the full comment of my change V01-009 is:

Code: Select all

; V01-009       Volker Halle <volker.halle@invenate.de>         14-AUG-2005
;               Support new mailbox size > 64k (V7.3-1 or higher)
;               and also update old fields UCB$W_xxxQUO for consistency.
;               Disable undocumented /SIZE qualifier as it caused
;               a KRNLSTAKNV crash on OpenVMS I64 V8.2
What kind of MBOX commands did you use on your Dev server and what kind of crash did you get ? Have a look at the CLUE$COLLECT:CLUE$node_ddmmyy.LIS file.

Please provide more information, also on the MBMON compilation problem.

Volker.


Topic author
garyrevell
Active Contributor
Posts: 38
Joined: Thu Nov 19, 2020 7:15 am
Reputation: 0
Location: Basingstoke, UK
Status: Offline
Contact:

Re: OpenVMS mailbox - logging

Post by garyrevell » Tue Sep 21, 2021 4:30 am

Hi Volke,

I think I sent you a private message regarding the compilation problem, not sure if you received it?

Regards

Gary

Post Reply