2021-06-26 23:10:28 +02:00
|
|
|
.\" Manpage for mqrs
|
2021-07-07 19:19:19 +02:00
|
|
|
.TH man 1 "7 July 2021" "0.1.1" "mqrs man page"
|
2021-06-26 23:10:28 +02:00
|
|
|
.SH NAME
|
|
|
|
mqrs \- Handle POSIX message queues
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B mqrs [\-h] [\-\-help] [\-v] [\-\-verbose] [\-V] [\-\-version] [SUBCOMMAND]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B mqrs
|
2021-07-07 19:19:19 +02:00
|
|
|
is a small cli program to handle message queues. Depending on which
|
|
|
|
backend you want to use there are different subsets of
|
|
|
|
subcommands. Following backends are supported:
|
|
|
|
.B posix\
|
2021-06-26 23:10:28 +02:00
|
|
|
and
|
2021-07-07 19:19:19 +02:00
|
|
|
.B sysv\
|
2021-06-26 23:10:28 +02:00
|
|
|
.
|
2021-07-07 19:19:19 +02:00
|
|
|
|
|
|
|
If a command is clearly distinguishable from all the others, it does
|
|
|
|
not have to be completed further.
|
2021-06-26 23:10:28 +02:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
2021-07-07 17:13:08 +02:00
|
|
|
Produce verbose output, multiple -v options increase the verbosity
|
|
|
|
(max. 3)
|
2021-06-26 23:10:28 +02:00
|
|
|
.TP 8
|
|
|
|
.B \-V, \-\-version
|
|
|
|
Prints version information
|
2021-07-07 19:19:19 +02:00
|
|
|
.SH POSIX MESSAGE QUEUE SUBCOMMANDS
|
|
|
|
The POSIX backend supports six commands:
|
|
|
|
.B create\
|
|
|
|
,
|
|
|
|
.B info\
|
|
|
|
,
|
|
|
|
.B list\
|
|
|
|
,
|
|
|
|
.B unlink\
|
|
|
|
,
|
|
|
|
.B send
|
|
|
|
and
|
|
|
|
.B recv
|
|
|
|
.
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS posix create [FLAGS] [OPTIONS] \fI<QUEUE>\fP
|
2021-06-26 23:10:28 +02:00
|
|
|
Create a new POSIX message queue.
|
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<QUEUE>\fP
|
|
|
|
Name of the new queue
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.TP 8
|
|
|
|
.SS OPTIONS
|
|
|
|
.RS
|
2021-07-07 20:23:04 +02:00
|
|
|
.TP 8
|
2021-06-26 23:10:28 +02:00
|
|
|
.B \-c, \-\-capacity \fI<capacity>\fP
|
|
|
|
Maximum number of messages in the queue
|
|
|
|
.TP 8
|
|
|
|
.B \-s, \-\-msgsize \fI<msgsize>\fP
|
|
|
|
Message size in bytes
|
|
|
|
.TP 8
|
2021-07-07 20:23:04 +02:00
|
|
|
.B \-m, \-\-mode \fI<mode>\fP
|
2021-06-26 23:10:28 +02:00
|
|
|
Permissions (octal) to create the queue with
|
|
|
|
.RE
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS posix help [SUBCOMMAND]
|
2021-06-26 23:10:28 +02:00
|
|
|
Prints this message or the help of the given subcommand.
|
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<SUBCOMMAND>\fP
|
|
|
|
Show help for \fISUBCOMMAND\fP
|
|
|
|
.RE
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS posix info [FLAGS] \fI<QUEUE>\fP
|
2021-06-26 23:10:28 +02:00
|
|
|
Print further information about an existing message queue.
|
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<QUEUE>\fP
|
|
|
|
Name of the queue
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.RE
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS posix list [FLAGS]
|
2021-07-07 18:27:41 +02:00
|
|
|
Print a list of all existing POSIX message queues.
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.TP 8
|
|
|
|
.B \-a, \-\-all
|
|
|
|
Print all available information
|
|
|
|
.RE
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS posix recv [FLAGS] [OPTIONS] \fI<QUEUE>\fP
|
2021-06-26 23:10:28 +02:00
|
|
|
Receive and print one or more messages message from a message queue.
|
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<QUEUE>\fP
|
|
|
|
Name of the queue
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-f, \-\-follow
|
|
|
|
Print messages as they are received
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-n, \-\-non\-blocking
|
|
|
|
Do not block
|
|
|
|
.TP 8
|
|
|
|
.B \-t, \-\-timestamp
|
|
|
|
Print a timestamp before each message
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS OPTIONS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-d, \-\-deadline \fI<deadline>\fP
|
|
|
|
Deadline until messages are received (format: "%Y-%m-%d %H:%M:%S")
|
|
|
|
.TP 8
|
|
|
|
.B \-o, \-\-timeout \fI<timeout>\fP
|
2021-06-27 02:39:22 +02:00
|
|
|
Timeout as for example in "5h 23min 42ms"
|
2021-06-26 23:10:28 +02:00
|
|
|
.RE
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS posix send [FLAGS] [OPTIONS] \fI<QUEUE>\fP \fI<MESSAGE>\fP
|
2021-06-26 23:10:28 +02:00
|
|
|
Send a message to a message queue.
|
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<QUEUE>\fP
|
|
|
|
Name of the queue
|
|
|
|
.TP 8
|
|
|
|
.B \fI<MESSAGE>\fP
|
|
|
|
Message to be sent to the queue
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-n, \-\-non\-blocking
|
|
|
|
Do not block
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS OPTIONS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-d, \-\-deadline \fI<deadline>\fP
|
|
|
|
Deadline until messages are received (format: "%Y-%m-%d %H:%M:%S")
|
|
|
|
.TP 8
|
|
|
|
.B \-p, \-\-priority \fI<priority>\fP
|
2021-06-27 02:56:31 +02:00
|
|
|
Set a different priority than default, priority >= 0 [default: 0]
|
2021-06-26 23:10:28 +02:00
|
|
|
.TP 8
|
|
|
|
.B \-o, \-\-timeout \fI<timeout>\fP
|
2021-06-27 02:39:22 +02:00
|
|
|
Timeout as for example in "5h 23min 42ms"
|
2021-06-26 23:10:28 +02:00
|
|
|
.RE
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS posix unlink [FLAGS] \fI<QUEUE>\fP
|
2021-07-07 20:48:07 +02:00
|
|
|
Delete an existing POSIX message queue.
|
2021-06-26 23:10:28 +02:00
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<QUEUE>\fP
|
|
|
|
Name of the queue
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.RE
|
2021-07-07 19:19:19 +02:00
|
|
|
.SH SYSV IPC MESSAGE QUEUE SUBCOMMANDS
|
2021-07-08 17:44:46 +02:00
|
|
|
The SysV IPC backend supports four commands:
|
2021-07-07 20:23:04 +02:00
|
|
|
.B create\
|
2021-07-08 17:44:46 +02:00
|
|
|
,
|
|
|
|
.B info\
|
|
|
|
,
|
|
|
|
.B list
|
2021-07-07 20:48:07 +02:00
|
|
|
and
|
|
|
|
.B unlink\
|
2021-07-07 20:23:04 +02:00
|
|
|
.
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS sysv create [FLAGS] [OPTIONS] \fI<KEY>\fP
|
2021-07-07 20:23:04 +02:00
|
|
|
Create a new SysV IPC message queue.
|
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<KEY>\fP
|
|
|
|
Key of the new queue
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.TP 8
|
|
|
|
.SS OPTIONS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-m, \-\-mode \fI<mode>\fP
|
|
|
|
Permissions (octal) to create the queue with (default: 0644)
|
|
|
|
.RE
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS sysv help [SUBCOMMAND]
|
|
|
|
Prints this message or the help of the given subcommand.
|
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<SUBCOMMAND>\fP
|
|
|
|
Show help for \fISUBCOMMAND\fP
|
|
|
|
.RE
|
|
|
|
.SS sysv info [FLAGS] [OPTIONS]
|
|
|
|
Print further information about an existing message queue. Exactly of
|
|
|
|
the OPTION arguments is mandatory.
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS OPTIONS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-i, \-\-id \fI<id>\fP
|
|
|
|
Id of the queue
|
|
|
|
.TP 8
|
|
|
|
.B \-k, \-\-key \fI<key>\fP
|
|
|
|
Key of the queue
|
|
|
|
.RE
|
|
|
|
.SS sysv list [FLAGS]
|
2021-07-08 14:46:10 +02:00
|
|
|
Print a list of all existing SysV IPC message queues.
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.RE
|
2021-07-08 17:44:46 +02:00
|
|
|
.SS sysv unlink [FLAGS] [OPTIONS]
|
2021-07-07 20:48:07 +02:00
|
|
|
Delete an existing SysV IPC message queue. It is mandatory to pass
|
|
|
|
exactly one OPTION.
|
|
|
|
.TP 8
|
|
|
|
.SS ARGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \fI<KEY>\fP
|
|
|
|
Key of the new queue
|
|
|
|
.RE
|
|
|
|
.TP 8
|
|
|
|
.SS FLAGS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Prints help information
|
|
|
|
.TP 8
|
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Produce verbose output
|
|
|
|
.TP 8
|
|
|
|
.SS OPTIONS
|
|
|
|
.RS
|
|
|
|
.TP 8
|
|
|
|
.B \-i, \-\-id \fI<id>\fP
|
|
|
|
Id of the queue
|
|
|
|
.TP 8
|
|
|
|
.B \-k, \-\-key \fI<key>\fP
|
|
|
|
Key of the queue
|
|
|
|
.RE
|
2021-06-26 23:10:28 +02:00
|
|
|
.SH SEE ALSO
|
|
|
|
mq_overview(7)
|
|
|
|
.SH BUGS
|
|
|
|
No known bugs.
|
|
|
|
.SH AUTHOR
|
|
|
|
finga (mqrs@onders.org)
|