mqrs/README.md

62 lines
2.3 KiB
Markdown
Raw Normal View History

2021-06-20 17:12:05 +02:00
# mqrs
`mqrs` is a small cli application to handle POSIX message queues.
## Install `mqrs`
For information about how to build, install and run `mqrs` please see
[`INSTALL.md`](INSTALL.md).
2021-06-20 17:12:05 +02:00
## Using `mqrs`
Depending on which backend you want to use there are different subsets
of subcommands. Following backends are supported:
- `posix`: Uses POSIX message queues
- `sysv`: Uses SysV IPC message queues
If a command is clearly distinguishable from all the others,
it does not have to be completed further.
### POSIX message queues
The POSIX backend supports six commands: `create`, `info`, `list`,
`unlink`, `send` and `recv`.
#### Create a message queue
Use the `create` command to create a new POSIX message queue. Following
optional arguments are supported:
- `-c`, `--capacity`: Maximum number of messages in the queue
- `-p`, `--permissions`: Permissions (octal) to create the queue with
- `-s`, `--msgsize`: Message size in bytes
#### Print information about a message queue
Use the `info` command to print further information about a message
queue.
#### List all message queues
Use the `list` command to print a list of all message
queues. Following option argument is supported:
- `-a`, `--all`: Print all available information
#### Delete a message queue
Use the `unlink` command to delete a message queue.
#### Send a message to a queue
Use the `send` command to send a message to a message queue. Following
optional arguments are supported:
- `-n`, `--non-blocking`: Do not block
- `-d`, `--deadline <deadline>`: Deadline until messages are sent
(format: `%Y-%m-%d %H:%M:%S`)
2021-06-27 02:56:31 +02:00
- `-p`, `--priority <priority>`: Set a different priority than
default, priority >= 0 [default: 0]
- `-o`, `--timeout <timeout>`: As for example in "5h 23min 42ms"
#### Receive a message from a queue
Use the `recv` command to receive one or more messages from a message
queue. Following optional arguments are supported:
- `-f`, `--follow`: Print messages as they are received
- `-n`, `--non-blocking`: Do not block
- `-t`, `--timestamp`: Print a timestamp before each message
- `-d`, `--deadline <deadline>`: Deadline until messages are received
(format: `%Y-%m-%d %H:%M:%S`)
- `-o,` `--timeout <timeout>`: As for example in "5h 23min 42ms"
### SysV IPC message queues
The SysV IPC backend supports no commands yet.