POSIXMQCONTROL(1)
π POSIXMQCONTROL(1) π
okay bestie, so we're in the General Commands Manual section, and this is the page for posixmqcontrol π
β¨ NAME β¨
posixmqcontrol β control POSIX mqueuefs message queues π¦
πΈ SYNOPSIS πΈ
posixmqcontrol create -q queue -s size -d depth [-m mode] [-g group]
[-u user]
posixmqcontrol info -q queue
posixmqcontrol recv -q queue
posixmqcontrol rm -q queue
posixmqcontrol send -q queue -c content [-p priority]
π DESCRIPTION π
so posixmqcontrol is that girl who handles all your POSIX message queue admin separately from your application stack β like, she does not want to be tangled up in your app code, she has her own thing going on β¨ Defining and adjusting queue attributes can be done without touching application code, which is honestly iconic. She'll create queues, inspect queue metadata, fiddle with group and user access to queues, dump queue contents, and unlink queues. Whole package π
Unlinking removes the name from the system and frees underlying memory. gone, but make it functional π
The maximum message size, maximum queue size, and current queue size are all displayed by the info subcommand. This output is similar to running cat on a mqueuefs queue mounted under a mount point. This utility requires the mqueuefs kernel module to be loaded but does not require mqueuefs to be mounted as a file system. little queen of convenience π
The following subcommands are provided:
createβ create the named queues, if they do not already exist. More than one queue name may be created. The same maximum queue depth and maximum message size are used to create all queues. If a queue exists, then depth and size are optional.
The required size and depth arguments specify the maximum message size (bytes per message) and maximum queue size (depth or number of messages in the queue). The optional numerical mode argument specifies the initial access mode. If the queue exists but does not match the requested size and depth, this utility will attempt to recreate the queue by first unlinking and then creating it. This will fail if the queue is not empty or is opened by other processes. π
rmβ unlink the queues specified β one attempt per queue. Failure to unlink one queue does not stop this sub-command from attempting to unlink the others. she does not give up, she moves on π«Άinfoβ for each named queue, display the maximum message size, maximum queue size, current queue depth, user owner id, group owner id, and mode permission bits. the full receipts, no cap π₯recvβ wait for a message from a single named queue and display the message to standard output.sendβ send messages to one or more named queues. If multiple messages and multiple queues are specified, the utility attempts to send all messages to all queues. The optional-ppriority, if omitted, defaults toMQ_PRIO_MAX / 2or medium priority.
π¦ NOTES π¦
A change of queue geometry (maximum message size and/or maximum number of messages) requires destroying and re-creating the queue. it's giving "you have to break up to glow up" π
As a safety feature, the create subcommand refuses to destroy a non-empty queue. periodt. she will not do it.
If you use the rm subcommand to destroy a queue, any queued messages are lost. fr fr, those messages are gone gone.
To avoid down-time when altering queue attributes, consider creating a new queue and configure reading applications to drain both new and old queues. Retire the old queue once all writers have been updated to write to the new queue. smooth transition, main character energy π
π EXIT STATUS π
The posixmqcontrol utility exits 0 on success, and >0 if an error occurs.
EX_NOTAVAILABLEusually means the mqueuefs kernel module is not loaded. πEX_USAGEreports one or more incorrect parameters. check ur syntax bestie π
β EXAMPLES β
- To retrieve the current message from a named queue,
/1, use the command
posixmqcontrol recv -q /1
- To create a queue with the name
/2with maximum message size100and maximum queue depth10, use the command
posixmqcontrol create -q /2 -s 100 -d 10
- To send a message to a queue with the name
/3use the command
posixmqcontrol send -q /3 -c 'some choice words.'
- To examine attributes of a queue named
/4use the command
posixmqcontrol info -q /4
π SEE ALSO π
mq_getattr(2), mq_open(2), mq_receive(2), mq_send(2), mq_setattr(2), mq_unlink(2), mqueuefs(4)
go read the extended universe, iykyk πβ¨
π BUGS π
mq_timedsend and mq_timedrecv are not implemented. not me finding out the hard way π
info reports a worst-case estimate for QSIZE. so like, an estimate-estimate, not the vibes-accurate number πΈ
π§ HISTORY π§
The posixmqcontrol command appeared in FreeBSD 14.1. she's new here and already slaying π
π AUTHORS π
The posixmqcontrol command and this manual page were written by Rick Parrish <unitrunker@unitrunker.net.> β thank u for ur service king π«Άπ
and that's the whole page bestie!! this beauty came to u from Debian, dated February 19, 2024 β mwah, go forth and manage ur message queues π β¨π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2024 Rick Parrish <unitrunker@unitrunker.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms