Linux command to check POSIX message queue

ipclinuxposix

We can check the details of system V message queue with the help of ipcscommand. Is there any command to check POSIX message queue in Linux?

Best Answer

There is no command I know of but there exists a libc function call which can get the statistics:

man 3 mq_getattr

   mq_getattr() returns an mq_attr structure  in  the  buffer  pointed  by
   attr.  This structure is defined as:

       struct mq_attr {
           long mq_flags;       /* Flags: 0 or O_NONBLOCK */
           long mq_maxmsg;      /* Max. # of messages on queue */
           long mq_msgsize;     /* Max. message size (bytes) */
           long mq_curmsgs;     /* # of messages currently in queue */
       };
Related Question