Path: utzoo!utgpu!watserv1!watmath!att!cbnewsl!clk From: clk@cbnewsl.att.com (christopher.l.kirby) Newsgroups: comp.unix.wizards Subject: Re: Help needed with System V message queues Keywords: SYSV messagequeue Message-ID: <1990Aug7.155226.18213@cbnewsl.att.com> Date: 7 Aug 90 15:52:26 GMT References: <1169@compel.UUCP> Sender: clk@attunix.att.com (Christopher L. Kirby) Followup-To: comp.unix.wizards Organization: AT&T Bell Laboratories Lines: 51 In article <1169@compel.UUCP> her@compel.UUCP (Helge Egelund Rasmussen) writes: > [...] >However, if I send a message with this length, I get return status -1 and >errno = EINVAL, indicating that the message size is too big. >My program works with a max length of 2000 bytes. > >I've found a tunable parameter called MSGMAX (current value 2048), which may >be the actual max message size. It is. > >The funny thing is that the max value that I can give MSGMAX is 8192, which >is greater than 'msg_qbytes' (4096). Does this mean that it is possible to >send messages that are bigger than the message queue??? The max value of MSGMAX, according to the AT&T SVR3.2 SysAdmin guide, is "64 kilobytes - 1". If you try to send a message which will cause the queue length to be > msg_qbytes, one of the following actions will be taken: - If you have specified flag IPC_NOWAIT, msgsnd() will return EAGAIN. - Otherwise, the call will block until one of a set of conditions is true. See the man page for msgop(2). > >I'm using Interactive Unix v.3.2. > >Questions: > - Is MSGMAX the size of the biggest message I can send? Yes. > - If so, what on earth do I use 'msg_qbytes' for? You should use the tunable MSGMNB to get the desired queue size. Or, you can run as super-user, and use msgctl() with IPC_SET to raise msg_qbytes for your particular queue. > - How do I get the current value of MSGMAX in my program? Not sure about that one. > >I've tried to RTFM, but it didn't help. So, PLEASE, help.... > >Helge ===================================================================== Chris Kirby AT&T Bell Laboratories, Summit, NJ 07901 clk@attunix.att.com