An easy way to display enqueued messages and their number

Sometimes, the network administrator needs to display all the messages from the queue and information about each of them, as well as the number of enqueued messages.


In order to display the number of messages enqueued by AXIGEN, you can type:
find /var/opt/axigen/queue/ -name 'S*' | wc -l
To display information about each enqueued message for all messages, you can use the command:
find /var/opt/axigen/queue/ -name 'S*' -exec /opt/axigen/bin/mqview {} \;

If the system AXIGEN is installed on uses bash as the shell application, you can use the alias bash builtin command to define some short aliases for the longer ones:

# alias to display the number of enqueued messages:
alias axigen-queuen="find /var/opt/axigen/queue/ -name 'S*' | wc -l"

# alias to display information about all the enqueued messages
alias axigen-queuel="find /var/opt/axigen/queue/ -name 'S*' -exec /opt/axigen/bin/mqview {} \\;"
Then, you can display the number of messages using simply axigen-queuen from the command line prompt, or axigen-queuel to display the list of messages and information about each one of them.
The aliases defined above may be inserted into the user bash startup file, usually ~/.bashrc, in order to be loaded everytime you login.

NOTE: If AXIGEN's mqview tool is stored in a different location than the default one, you must modify the corresponding command, accordingly. Also, the examples above assume that the queue is stored in /var/opt/axigen/queue (the queuePath parameter from the Processing module).